getty.target starts before cloud-config is done
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
High
|
Unassigned | ||
cloud-init (Ubuntu) |
Won't Fix
|
High
|
Unassigned |
Bug Description
On targets that are normally accessed via serial console (i.e. Subiquity, Ubuntu Classic/Core on RPi, etc) cloud-init often does not complete before getty spawns login shell.
This creates subpar user experience, as it appears as if one can login, and should be able to login using cloud-init provided credentials, but in practice cannot.
To mitigate this we have started to add the following override on some of our images:
See: http://
+ mkdir -p /etc/systemd/
+ cat << EOF > /etc/systemd/
+# Wait for cloud-init to finish (creating users, etc.) before running getty
+
+[Unit]
+Before=
+EOF
Instead, cloud-config.
Use case is monitoring RPi booting on serial console, and loging in once getty is up. With expectation that login succeeds.
Currently login fails, more cloud-config spew appears on screen, then one has to hit enter to realise that login is up, realize that one is now trying to login with empty username, hit enter again, and now type in username & password to finally login.
Changed in cloud-init: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in cloud-init (Ubuntu): | |
status: | Triaged → Won't Fix |
While the user is created earlier, other modules such as:
locale, set-password, and ssh-import-id
should be run before getty.target for login to be successful.
So I think this is the right change for now; however, if the image also were to need to seed snaps, we're also then blocking login until after snaps have seeded as well.