This bug is believed to be fixed in cloud-init in version 18.3. If this
is still a problem for you, please make a comment and set the state back
to New

Thank you.

** Changed in: cloud-init
       Status: Fix Committed => Fix Released

-- 
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/1420018

Title:
  docs: user-groups uses - instead of _

Status in cloud-init:
  Fix Released

Bug description:
  I am trying to add a user with a primary group that already exists
  with the same name as the user.

     default_user:
       name: docker
       lock_passwd: True
       gecos: Docker Administrator
       no-user-group: true
       primary-group: docker
       groups: [adm, audio, cdrom, dialout, dip, floppy, netdev, plugdev, sudo, 
video]
       sudo: ["ALL=(ALL) NOPASSWD:ALL"]
       shell: /bin/bash

  2015-02-09 21:37:29,285 - __init__.py[DEBUG]: Adding user docker
  2015-02-09 21:37:29,285 - util.py[DEBUG]: Running hidden command to protect 
sensitive input/output logstring: ['useradd', 'docker', '--shell', '/bin/bash', 
'--comment', 'Docker Administrator', '--groups', 
'adm,audio,cdrom,dialout,dip,floppy,netdev,plugdev,sudo,video', '-m']
  2015-02-09 21:37:29,312 - util.py[WARNING]: Failed to create user docker
  2015-02-09 21:37:29,312 - util.py[DEBUG]: Failed to create user docker
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/cloudinit/distros/__init__.py", line 
360, in add_user
      util.subp(adduser_cmd, logstring=log_adduser_cmd)
    File "/usr/lib/python2.7/dist-packages/cloudinit/util.py", line 1539, in 
subp
      cmd=args)
  ProcessExecutionError: Unexpected error while running command.
  Command: ['useradd', 'docker', '--shell', '/bin/bash', '--comment', 'Docker 
Administrator', '--groups', 
'adm,audio,cdrom,dialout,dip,floppy,netdev,plugdev,sudo,video', '-m']
  Exit code: 9
  Reason: -
  Stdout: ''
  Stderr: 'useradd: group docker exists - if you want to add this user to that 
group, use -g.\n'

  backdoor@docker:~$ dpkg -l | grep cloud-init
  ii  cloud-init                          0.7.5-0ubuntu1.3              all     
     Init scripts for cloud instances

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to