sshd is reloaded immediately after start in the google 18.04 image

Bug #1976436 reported by nicholasC

This bug report will be marked for expiration in 52 days if no further activity occurs. (find out why)

8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
Incomplete
Undecided
Unassigned
google-guest-agent (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

In recent published 18.04 images for Google Cloud, sshd is reloaded by systemd immediately after it is started.

The images I'm using are sourced from https://cloud-images.ubuntu.com/locator/.
I've found this issue in ubuntu-1804-bionic-v20220505 and ubuntu-1804-bionic-v20220419.
The image ubuntu-1804-bionic-v20210129 does not have the issue (sshd is not reloaded).
I have not tested intermediate versions.

The specific version attributes are:
Cloud=Google Compute Engine
Zone=us-west2
Name=bionic
Version=18.04
Arch=amd64
Instance Type=kvm

Here's a snippet from the syslog of an image affected by this bug:

=================================
systemd[1]: Starting Login Service...
systemd-logind[2057]: Watching system buttons on /dev/input/event0 (Power Button)
systemd-logind[2057]: Watching system buttons on /dev/input/event1 (Sleep Button)
systemd-logind[2057]: Watching system buttons on /dev/input/event2 (AT Translated Set 2 keyboard)
systemd-logind[2057]: New seat seat0.
systemd[1]: Started Login Service.
systemd[1]: Stopping Regular background program processing daemon...
systemd[1]: Stopped Regular background program processing daemon.
systemd[1]: Started Regular background program processing daemon.
cron[2066]: (CRON) INFO (pidfile fd = 3)
cron[2066]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
GCEGuestAgent[1899]: 2022-06-01T01:09:28.4626Z GCEGuestAgent Error oslogin.go:109: Error restarting service: Failed to try-restart crond.service: Unit crond.service not found.
                     .
google_guest_agent[1899]: 2022/06/01 01:09:28 logging client: rpc error: code = Unauthenticated desc = transport: metadata: GCE metadata "instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Flogging.write" not defined
pollinate[2093]: [1.0K blob data]
systemd[1]: Started Pollinate to seed the pseudo random number generator.
systemd[1]: Starting OpenBSD Secure Shell server...
sshd[2108]: Server listening on 0.0.0.0 port 22.
sshd[2108]: Server listening on :: port 22.
systemd[1]: Started OpenBSD Secure Shell server.
systemd[1]: Reloading OpenBSD Secure Shell server.
sshd[2108]: Received SIGHUP; restarting.
systemd[1]: Reloaded OpenBSD Secure Shell server.
sshd[2108]: Server listening on 0.0.0.0 port 22.
sshd[2108]: Server listening on :: port 22.
systemd[1]: Reloading.
systemd[1]: Reloading.
================================

The line of importance to me is "systemd[1]: Reloading OpenBSD Secure Shell server."
This is in contrast to the first boot of an older, unaffected image, where no reloading is observed:

================================
google-accounts[1795]: INFO Creating a new user account for admin.
google_accounts_daemon[1795]: useradd: group admin exists - if you want to add this user to that group, use -g.
useradd[1893]: failed adding user 'admin', data deleted
google-accounts[1795]: WARNING Could not create user admin. Command '['useradd', '-m', '-s', '/bin/bash', '-p', '*', 'admin']' returned non-zero exit status 9..
google-clock-skew[1791]: INFO Synced system time with hardware clock.
pollinate[1923]: [1.0K blob data]
systemd[1]: Started Pollinate to seed the pseudo random number generator.
systemd[1]: Starting OpenBSD Secure Shell server...
sshd[1945]: Server listening on 0.0.0.0 port 22.
sshd[1945]: Server listening on :: port 22.
systemd[1]: Started OpenBSD Secure Shell server.
systemd[1]: Reloading.
systemd[1]: Reloading.
================================

Note that the new image has swapped to using google_guest_agent instead of google_accounts_daemon, and that google_guest_agent prints an error message directly before the reload. I don't know if that is related.

This bug is impactful to me as I cannot safely "just" wait for SSH to be online in scripts before proceeding.

This bug should be observable in the aforementioned images on first boot with no modifications.

Revision history for this message
nicholasC (njc093) wrote :

I have not seen this behavior in the equivalent AWS images. It seems GCP specific.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1976436/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Paul White (paulw2u) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to review all reported bugs in a timely manner.

Ubuntu 18.04 (bionic) reached end-of-standard-support on May 31, 2023.

I'm setting the status of this bug to 'Incomplete' as it's not seen any activity for some time. If this is still an issue when using a currently maintained release of Ubuntu then please let us know which one(s) otherwise this bug report can be left to expire in approximately 60 days time.

tags: added: bionic
Changed in ubuntu:
status: New → Incomplete
Changed in google-guest-agent (Ubuntu):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.