← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1861128] Re: getty.target starts before cloud-config is done

 

** Also affects: cloud-init
   Importance: Undecided
       Status: New

** Changed in: cloud-init
       Status: New => Triaged

** Changed in: cloud-init
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1861128

Title:
  getty.target starts before cloud-config is done

Status in cloud-init:
  Triaged
Status in cloud-init package in Ubuntu:
  Triaged

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://launchpadlibrarian.net/461986467/livecd-
  rootfs_2.636_2.637.diff.gz

  +    mkdir -p /etc/systemd/system/cloud-config.service.d
  +    cat << EOF > /etc/systemd/system/cloud-config.service.d/getty-wait.conf
  +# Wait for cloud-init to finish (creating users, etc.) before running getty
  +
  +[Unit]
  +Before=getty.target
  +EOF

  Instead, cloud-config.service itself should declare
  `Before=getty.target`

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1861128/+subscriptions