docs: user-groups uses - instead of _
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Low
|
do3meli |
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,
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/
util.
File "/usr/lib/
cmd=args)
ProcessExecutio
Command: ['useradd', 'docker', '--shell', '/bin/bash', '--comment', 'Docker Administrator', '--groups', 'adm,audio,
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
Related branches
- Chad Smith: Abstain
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper: Approve
-
Diff: 398 lines (+96/-55)14 files modifiedcloudinit/config/cc_resizefs.py (+2/-0)
cloudinit/config/cc_users_groups.py (+14/-14)
cloudinit/util.py (+9/-1)
debian/changelog (+9/-3)
doc/examples/cloud-config-user-groups.txt (+12/-12)
doc/rtd/topics/datasources/openstack.rst (+2/-2)
integration-requirements.txt (+2/-2)
tests/cloud_tests/platforms/lxd/instance.py (+1/-1)
tests/cloud_tests/testcases/examples/including_user_groups.yaml (+1/-1)
tests/cloud_tests/testcases/modules/user_groups.yaml (+1/-1)
tests/data/merge_sources/expected7.yaml (+8/-8)
tests/data/merge_sources/source7-1.yaml (+5/-5)
tests/data/merge_sources/source7-2.yaml (+3/-3)
tests/unittests/test_util.py (+27/-2)
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper: Approve
-
Diff: 398 lines (+96/-55)14 files modifiedcloudinit/config/cc_resizefs.py (+2/-0)
cloudinit/config/cc_users_groups.py (+14/-14)
cloudinit/util.py (+9/-1)
debian/changelog (+9/-3)
doc/examples/cloud-config-user-groups.txt (+12/-12)
doc/rtd/topics/datasources/openstack.rst (+2/-2)
integration-requirements.txt (+2/-2)
tests/cloud_tests/platforms/lxd/instance.py (+1/-1)
tests/cloud_tests/testcases/examples/including_user_groups.yaml (+1/-1)
tests/cloud_tests/testcases/modules/user_groups.yaml (+1/-1)
tests/data/merge_sources/expected7.yaml (+8/-8)
tests/data/merge_sources/source7-1.yaml (+5/-5)
tests/data/merge_sources/source7-2.yaml (+3/-3)
tests/unittests/test_util.py (+27/-2)
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper: Approve
- Ryan Harper: Pending requested
-
Diff: 396 lines (+99/-52)14 files modifiedcloudinit/config/cc_resizefs.py (+2/-0)
cloudinit/config/cc_users_groups.py (+14/-14)
cloudinit/util.py (+9/-1)
debian/changelog (+12/-0)
doc/examples/cloud-config-user-groups.txt (+12/-12)
doc/rtd/topics/datasources/openstack.rst (+2/-2)
integration-requirements.txt (+2/-2)
tests/cloud_tests/platforms/lxd/instance.py (+1/-1)
tests/cloud_tests/testcases/examples/including_user_groups.yaml (+1/-1)
tests/cloud_tests/testcases/modules/user_groups.yaml (+1/-1)
tests/data/merge_sources/expected7.yaml (+8/-8)
tests/data/merge_sources/source7-1.yaml (+5/-5)
tests/data/merge_sources/source7-2.yaml (+3/-3)
tests/unittests/test_util.py (+27/-2)
- Server Team CI bot: Approve (continuous-integration)
- Chad Smith: Approve
-
Diff: 242 lines (+44/-44)7 files modifiedcloudinit/config/cc_users_groups.py (+14/-14)
doc/examples/cloud-config-user-groups.txt (+12/-12)
tests/cloud_tests/testcases/examples/including_user_groups.yaml (+1/-1)
tests/cloud_tests/testcases/modules/user_groups.yaml (+1/-1)
tests/data/merge_sources/expected7.yaml (+8/-8)
tests/data/merge_sources/source7-1.yaml (+5/-5)
tests/data/merge_sources/source7-2.yaml (+3/-3)
description: | updated |
Changed in cloud-init: | |
assignee: | nobody → do3meli (d-info-e) |
Changed in cloud-init: | |
status: | Confirmed → In Progress |
Finally, the no_user_group works as expected.
From http:// bazaar. launchpad. net/~cloud- init-dev/ cloud-init/ trunk/view/ head:/cloudinit /distros/ __init_ _.py :
}
However, the doc at http:// bazaar. launchpad. net/~cloud- init-dev/ cloud-init/ trunk/view/ head:/doc/ examples/ cloud-config- user-groups. txt speaks of no-user-group which does not work. The same would apply to no-log-init and no-create-home which should be no_log_init and no_create_home in the doc.
Am I missing something? Maybe this is expected to work with both underscores and dashes.