locked
'useradd' in "config-users-groups" cloud-init config stage failing sometimes with the DSVM Ubuntu Image RRS feed

  • Question

  • Customer reported that the user provided in the portal while creating the VM was not getting added sometimes.

    Issue occurred randomly on some VMs, not all.

    Image details :

    ImagePublisher microsoft-dsvm

    ImageOffer linux-data-science-vm-ubuntu

    ImageSku linuxdsvmubuntu

    ImageVersion 18.09.01

    Cloud-init logs in working VM :

    2018-11-13 14:10:14,365 - __init__.py[DEBUG]: Adding user azureuser

    2018-11-13 14:10:14,365 - util.py[DEBUG]: Running hidden command to protect sensitive input/output logstring: ['useradd', 'azureuser', '--comment', 'Ubuntu', '--groups', 'adm,audio,cdrom,dialout,dip,floppy,lxd,netdev,plugdev,sudo,video', '--password', 'REDACTED', '--shell', '/bin/bash', '-m']

    2018-11-13 14:10:37,797 - util.py[DEBUG]: Reading from /etc/sudoers (quiet=False)

    2018-11-13 14:10:37,799 - util.py[DEBUG]: Read 755 bytes from /etc/sudoers

    2018-11-13 14:10:37,801 - util.py[DEBUG]: Writing to /etc/sudoers.d/90-cloud-init-users - wb: [440] 157 bytes

    As we can see above, the useradd command succeeds without any issues.

    Cloud-init logs from problem VM :

    2018-11-13 14:10:10,192 - __init__.py[DEBUG]: Adding user azureuser

    2018-11-13 14:10:10,192 - util.py[DEBUG]: Running hidden command to protect sensitive input/output logstring: ['useradd', 'azureuser', '--comment', 'Ubuntu', '--groups', 'adm,audio,cdrom,dialout,dip,floppy,lxd,netdev,plugdev,sudo,video', '--password', 'REDACTED', '--shell', '/bin/bash', '-m']

    2018-11-13 14:10:46,603 - util.py[DEBUG]: Cloud-init 18.3-9-g2e62cb8a-0ubuntu1~16.04.2 received SIGTERM, exiting...

      Filename: /usr/lib/python3.5/selectors.py

      Function: select

      Line number: 376

        Filename: /usr/lib/python3.5/subprocess.py

        Function: _communicate

        Line number: 1715

          Filename: /usr/lib/python3.5/subprocess.py

          Function: communicate

          Line number: 1072

    2018-11-13 14:10:46,603 - handlers.py[DEBUG]: finish: init-network/config-users-groups: FAIL: running config-users-groups with frequency once-per-instance

    useradd command was initiated as we saw above. Soon after that we can cloud-init terminating.

    init-network/config-users-groups which was performing the useradd failed.

    Issue is reproducible on internal test subscription too for same data science VM.

    Need inputs on the above. 

    Tuesday, November 20, 2018 5:40 AM