Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Problem Problem description is in issue #1539 ## Solution Implement sd_notify for agama-web-service to notify systemd when web service is ready to serve requests. Improve systemd dependencies to better reflect dependencies. For agama-auto adapt dependencies to reflect that CLI switch from direct systemd communication to HTTP API. related PR is #1438 ## Testing - *Tested manually* ## Screenshots snippet from log before change ( truncated, but to demonstrate that agama-auto runs too soon): ``` Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: Started Agama Installer Service. Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: Started Agama Web Server. Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: Started Agama automatic profile runner. Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: Starting Postpone login prompt after the SSL fingerprint issue is generated... Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2689]: + export YAST_SKIP_XML_VALIDATION=1 Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2689]: + YAST_SKIP_XML_VALIDATION=1 Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2689]: + '[' -z '' ']' Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2691]: ++ awk -F agama.auto= '{sub(/ .*$/, "", $2); print $2}' Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2689]: + url= Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2689]: + '[' -z '' ']' Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2689]: + echo 'no autoinstallation profile' Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2689]: no autoinstallation profile Aug 14 13:10:47 dhcp118.suse.cz agama-auto[2689]: + exit 0 Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: agama-auto.service: Deactivated successfully. Aug 14 13:10:47 dhcp118.suse.cz sshd-gen-keys-start[2683]: ssh-keygen: generating new host keys: RSA ECDSA ED25519 Aug 14 13:10:47 dhcp118.suse.cz sshd[2702]: Server listening on 0.0.0.0 port 22. Aug 14 13:10:47 dhcp118.suse.cz sshd[2702]: Server listening on :: port 22. Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: Started OpenSSH Daemon. Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: Starting Generate issue file for SSH host keys... Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: agama-ssh-issue.service: Deactivated successfully. Aug 14 13:10:47 dhcp118.suse.cz systemd[1]: Finished Generate issue file for SSH host keys. Aug 14 13:10:47 dhcp118.suse.cz agama-web-server[2688]: registering event source with poller: token=Token(94923250365696), interests=READABLE | WRITABLE Aug 14 13:10:47 dhcp118.suse.cz agama-web-server[2688]: Initializing Aug 14 13:10:47 dhcp118.suse.cz agama-web-server[2688]: Waiting for DATA or OK from server Aug 14 13:10:47 dhcp118.suse.cz agama-web-server[2688]: Received OK from server Aug 14 13:10:47 dhcp118.suse.cz agama-web-server[2688]: Waiting for Unix FD passing agreement from server Aug 14 13:10:47 dhcp118.suse.cz agama-web-server[2688]: Unix FD passing agreed by server ``` and now after change: ``` Aug 15 10:19:15 dhcp118.suse.cz systemd[1]: Started Agama Web Server. Aug 15 10:19:15 dhcp118.suse.cz agama-web-server[12467]: Starting Agama web server at :::80 Aug 15 10:19:15 dhcp118.suse.cz agama-web-server[12467]: Starting Agama web server at :::443 ... Aug 15 10:19:15 dhcp118.suse.cz agama-web-server[12467]: Waiting for message on the socket.. ... Aug 15 10:19:15 dhcp118.suse.cz agama-web-server[12467]: Listening for property changes on org.freedesktop.NetworkManager.Device... Aug 15 10:19:15 dhcp118.suse.cz systemd[1]: Started Agama automatic profile runner. Aug 15 10:19:15 dhcp118.suse.cz agama-web-server[12467]: Message received on the socket: Msg { type: Signal, sender: UniqueName(Str(Borrowed(":1.2"))), path: ObjectPath("/org/freedesktop/systemd1/unit/agama_2dauto_2eservice"), iface: InterfaceName(Str(Borrowed("org.freedesktop.DBus.Properties"))), member: MemberName(Str(Borrowed("PropertiesChanged"))), body: Signature("sa{sv}as") } Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12479]: + export YAST_SKIP_XML_VALIDATION=1 Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12479]: + YAST_SKIP_XML_VALIDATION=1 Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12479]: + '[' -z '' ']' ... Aug 15 10:19:15 dhcp118.suse.cz agama-web-server[12467]: Waiting for message on the socket.. Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12482]: ++ awk -F agama.auto= '{sub(/ .*$/, "", $2); print $2}' Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12479]: + url= Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12479]: + '[' -z '' ']' Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12479]: + echo 'no autoinstallation profile' Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12479]: no autoinstallation profile Aug 15 10:19:15 dhcp118.suse.cz agama-auto[12479]: + exit 0 Aug 15 10:19:15 dhcp118.suse.cz systemd[1]: agama-auto.service: Deactivated successfully. ```
- Loading branch information