public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* Race condition with pasta COMMAND...
@ 2023-01-30 18:08 Paul Holzinger
  2023-01-31 13:02 ` Stefano Brivio
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Holzinger @ 2023-01-30 18:08 UTC (permalink / raw)
  To: passt-dev

Hi all,

while debugging some things I used `./pasta --config-net -- nslookup 
google.com 1.1.1.1` to test dns.
The problem is that does not work because the nslookup process will be 
executed before pasta is
ready with the netns setup, i.e. compare `./pasta --config-net -- ip a`.

So a workaround is to spawn a shell and sleep: `sh -c "sleep 1; nslookup 
google.com 1.1.1.1"`
However this is ugly and does not ensure that the netns is ready after 
one second. As a user
I would expect pasta to wait until the setup is finished before it calls 
exec().
I can send a patch if you agree and I find some time.

---
Paul


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-31 18:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 18:08 Race condition with pasta COMMAND Paul Holzinger
2023-01-31 13:02 ` Stefano Brivio
2023-01-31 18:00   ` Paul Holzinger
2023-01-31 18:43     ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).