groups added with a user list must have all users present.

Bug #1724634 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

$ cat my.yaml
#cloud-config
groups:
  - basic
  - group1: [foobar]
users:
  - name: foobar
    groups: basic

$ lxc launch ubuntu-daily:artful "--config=user.user-data=$(cat my.yaml)" a2
...
$ lxc exec a2 -- grep WARN /var/log/cloud-init.log

2017-10-18 17:18:27,034 - __init__.py[WARNING]: Unable to add group member 'foobar' to group 'group1'; user does not exist.

I found this bug when looking at intergration test WARNINGs per bug 1724354.

I'm not sure what the right change is, options include:
 * document this
 * move user creation before groups creation. This will probably work, since we now create groups by default that do not already exist when creating users.
 * run 2 passes, or otherwise read group content before adding groups.

Related bugs:
 * bug 1724354: WARNING in logs due to missing python-jsconschema

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: cloud-init 17.1-18-gd4f70470-0ubuntu1
ProcVersionSignature: Ubuntu 4.13.0-15.16-generic 4.13.4
Uname: Linux 4.13.0-15-generic x86_64
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
CloudName: None
Date: Wed Oct 18 17:18:30 2017
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
cloud-init-log-warnings: 2017-10-18 17:18:27,034 - __init__.py[WARNING]: Unable to add group member 'foobar' to group 'group1'; user does not exist.

Revision history for this message
Scott Moser (smoser) wrote :
Scott Moser (smoser)
Changed in cloud-init (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.