a networking service snap like xkcd doesn't wait for the server to be listening
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Won't Fix
|
High
|
Unassigned |
Bug Description
I think that installing a service that listens on a port should return until the server is ready listening on that port.
For example, on snappy install xkcd-webserver, after the command finishes we should be able to access the webserver immediately.
According to http://
Then, if we put in a script a install followed by a get it will fail. We need to add a sleep or poll until the server is running.
IMO, the systemd service file for a network service should wait until the server has been fully started.
Changed in snappy: | |
status: | New → Triaged |
importance: | Undecided → High |
This is still the case in Ubuntu Core 16:
$ sudo snap remove xkcd-webserver ; sudo snap install xkcd-webserver ; printf "GET / HTTP/1.0\n\n" |nc -v localhost 80
xkcd-webserver removed
xkcd-webserver (stable) 16.04-6 from 'canonical' installed
nc: connect to localhost port 80 (tcp) failed: Connection refused
nc: connect to localhost port 80 (tcp) failed: Connection refused