Code review comment for ~lvoytek/ubuntu/+source/open-isns:open-isns-101-update-jammy

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hmm,
I've found that the socket integration of open-isnsd isn't perfect.
For example the following common init phase (from the man page of isnsadm) breaks it.

root@j-proposed:~# isnsd --init
root@j-proposed:~# isnsadm --local --keyfile=control.key --enroll isns.control node-type=ALL functions=ALL object-type=ALL
No key given, generating one
Stored DSA private key in control.key
socket disconnect, killing socket
Warning: Timed out while waiting for reply
Warning: Failed to register object(s): Internal error

If we now look at the service/socket we see

root@j-proposed:~# systemctl status isnsd.socket isnsd.service
× isnsd.socket
     Loaded: loaded (/lib/systemd/system/isnsd.socket; enabled; vendor preset: enabled)
     Active: failed (Result: service-start-limit-hit) since Thu 2021-12-16 06:50:15 UTC; 4s ago
   Triggers: ● isnsd.service
     Listen: /run/isnsctl (Stream)
             [::]:3205 (Stream)

Dec 16 06:45:07 j-proposed systemd[1]: Listening on isnsd.socket.
Dec 16 06:50:15 j-proposed systemd[1]: isnsd.socket: Failed with result 'service-start-limit-hit'.

× isnsd.service - iSNS server
     Loaded: loaded (/lib/systemd/system/isnsd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-12-16 06:50:15 UTC; 4s ago
TriggeredBy: × isnsd.socket
       Docs: man:isnsd(8)
             man:isnsd.conf(5)
    Process: 108821 ExecStart=/usr/sbin/isnsd (code=exited, status=0/SUCCESS)
   Main PID: 108822 (code=exited, status=1/FAILURE)

Dec 16 06:50:15 j-proposed systemd[1]: Starting iSNS server...
Dec 16 06:50:15 j-proposed systemd[1]: isnsd.service: New main PID 108821 does not exist or is a zombie.
Dec 16 06:50:15 j-proposed isnsd[108822]: Unable to bind socket: Address already in use
Dec 16 06:50:15 j-proposed isnsd[108822]: Unable to create server socket
Dec 16 06:50:15 j-proposed systemd[1]: Started iSNS server.
Dec 16 06:50:15 j-proposed systemd[1]: isnsd.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 06:50:15 j-proposed systemd[1]: isnsd.service: Failed with result 'exit-code'.
Dec 16 06:50:15 j-proposed systemd[1]: isnsd.service: Start request repeated too quickly.
Dec 16 06:50:15 j-proposed systemd[1]: isnsd.service: Failed with result 'exit-code'.
Dec 16 06:50:15 j-proposed systemd[1]: Failed to start iSNS server.

That means isnsadm reaches the socket in a way to start it, but then the service is blocked by the socket itself. As if there are multiple paths to start it and only one is transitioning, but the other one is blocking it.

A later start gets it running:
root@j-proposed:~# systemctl start isnsd.service
root@j-proposed:~# systemctl status isnsd.socket isnsd.service
× isnsd.socket
     Loaded: loaded (/lib/systemd/system/isnsd.socket; enabled; vendor preset: enabled)
     Active: failed (Result: service-start-limit-hit) since Thu 2021-12-16 06:50:15 UTC; 5min ago
   Triggers: ● isnsd.service
     Listen: /run/isnsctl (Stream)
             [::]:3205 (Stream)

Dec 16 06:45:07 j-proposed systemd[1]: Listening on isnsd.socket.
Dec 16 06:50:15 j-proposed systemd[1]: isnsd.socket: Failed with result 'service-start-limit-hit'.

● isnsd.service - iSNS server
     Loaded: loaded (/lib/systemd/system/isnsd.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-12-16 06:55:39 UTC; 1s ago
TriggeredBy: × isnsd.socket
       Docs: man:isnsd(8)
             man:isnsd.conf(5)
    Process: 108836 ExecStart=/usr/sbin/isnsd (code=exited, status=0/SUCCESS)
   Main PID: 108837 (isnsd)
      Tasks: 1 (limit: 38266)
     Memory: 920.0K
     CGroup: /system.slice/isnsd.service
             └─108837 /usr/sbin/isnsd

Dec 16 06:55:39 j-proposed systemd[1]: Starting iSNS server...
Dec 16 06:55:39 j-proposed systemd[1]: isnsd.service: New main PID 108836 does not exist or is a zombie.
Dec 16 06:55:39 j-proposed isnsd[108837]: SLP support disabled in this build
Dec 16 06:55:39 j-proposed systemd[1]: Started iSNS server.

*Sigh*
We could - but probably not should - spend quite some extra time checking how this is meant to work. But since - for there overall of Ubuntu server - this only plays a minor role I'd suggest to revert the addition of the socket until there is more time or a real request for it.

Thank you Lena for trying it though, and the script and man page are fine and can stay.

review: Needs Fixing

« Back to merge proposal