[Bug 1562918] [NEW] cloud-init does not create defined users

Leander Janssen 1562918 at bugs.launchpad.net
Mon Mar 28 15:47:43 UTC 2016


Public bug reported:

When cloud-init tries to create the defined user a python error occurs:

# /var/log/cloud-init.log

Mar 28 17:27:25 ubuntu [CLOUDINIT] helpers.py[DEBUG]: Running config-users-groups using lock (<FileLock using file '/var/lib/cloud/instances/nocloud/sem/config_users_groups'>)
Mar 28 17:27:25 ubuntu [CLOUDINIT] util.py[DEBUG]: Running command ['groupadd', 'sysop'] with allowed return codes [0] (shell=False, capture=True)
Mar 28 17:27:25 ubuntu [CLOUDINIT] __init__.py[INFO]: Created new group sysop
Mar 28 17:27:25 ubuntu [CLOUDINIT] util.py[DEBUG]: Running command ['groupadd', 'ansible'] with allowed return codes [0] (shell=False, capture=True)
Mar 28 17:27:25 ubuntu [CLOUDINIT] __init__.py[INFO]: Created new group ansible
Mar 28 17:27:25 ubuntu [CLOUDINIT] handlers.py[DEBUG]: finish: init-network/config-users-groups: FAIL: running config-users-groups with frequency once-per-instance
Mar 28 17:27:25 ubuntu [CLOUDINIT] util.py[WARNING]: Running module users-groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_users_groups.py'>) failed
Mar 28 17:27:25 ubuntu [CLOUDINIT] util.py[DEBUG]: Running module users-groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_users_groups.py'>) failed#012Traceback (most recent call last):#012  File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 729, in _run_modules#012    freq=freq)#012  File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 70, in run#012    return self._runners.run(name, functor, args, freq, clear_on_fail)#012  File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 199, in run#012    results = functor(*args)#012  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_users_groups.py", line 34, in handle#012    cloud.distro.create_user(user, **config)#012  File "/usr/lib/python3/dist-packages/cloudinit/distros/__init__.py", line 419, in create_user#012    self.add_user(name, **kwargs)#012  File "/usr/lib/python3/dist-packages/cloudinit/distros/__init__.py", line 373, in add_user#012    for group in kwargs.get('groups').split(","):#012AttributeError: 'NoneType' object has no attribute 'split'

#cloud-config
groups:
  - sysop
  - ansible

users:
  - name: sysop
    gecos: System Operator
    shell: /bin/bash
    lock-passwd: false
    sudo: ALL=(ALL) NOPASSWD:ALL
    passwd: $6$rounds=4096$y8sPi6ZhIVRN$bxASp.uEcBf3JjJvrYOZrU1hUHJrdlkdJCX9W0.fkNKi.i/qy6iTqmlcnr5s8VOwOomddbXIXVKkQ9C3wTzSr/

# lsb_release -rd
Description:	Ubuntu Xenial Xerus (development branch)
Release:	16.04

# apt-cache policy cloud-init
cloud-init:
  Installed: 0.7.7~bzr1189-0ubuntu1
  Candidate: 0.7.7~bzr1189-0ubuntu1
  Version table:
 *** 0.7.7~bzr1189-0ubuntu1 500
        500 http://nl.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://nl.archive.ubuntu.com/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status

** Affects: cloud-init (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1562918

Title:
  cloud-init does not create defined users

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



More information about the Ubuntu-server-bugs mailing list