Activity log for bug #1041384

Date Who What changed Old value New value Message
2012-08-24 21:43:13 Ben Howard bug added bug
2012-08-24 21:43:21 Ben Howard cloud-init: status New Confirmed
2012-08-24 21:43:56 Ben Howard summary userless configuration fails due to default configuration userless conf fails assign user[0] as the default user
2012-08-24 21:48:20 Ben Howard description The userless merge fails to work with the default configuration. Currently the cloud images are configured with: cloud-init/config/cloud.cfg 4 # Implement for Ubuntu only: create the default 'ubuntu' user 5 users: 6 default: true 7 If a user launches with the cloud config of: users: foo: True The expected behavior is that user foo would be configured equivalent to the parameter "user: foo". However, due to this code: cloud-init/cloudinit/stages.py 164 165 def _read_cfg(self, extra_fns): 166 no_cfg_paths = helpers.Paths({}, self.datasource) 167 merger = helpers.ConfigMerger(paths=no_cfg_paths, 168 datasource=self.datasource, 169 additional_fns=extra_fns, 170 base_cfg=self._read_base_cfg()) 171 return merger.cfg Any option which is overridden via the cloud-config is _merged_ into the base configuration. So if a user launched with a cloud config of: users: foo: True cloud-init will act on: users: default: True foo: True The userles merge fails to properly assign user[0] as the default user due to default configuration and the way that cloud-init merges the ondisk configuration with the cloud-config sent by the user. cloud-init/config/cloud.cfg (Default configuration)   4 # Implement for Ubuntu only: create the default 'ubuntu' user   5 users:   6 default: true   7 If a user launches with the cloud config of: users:     foo: True The expected behavior is that user foo would be configured equivalent to the parameter "user: foo". However, due to this code and the default configuration: cloud-init/cloudinit/stages.py 164 165 def _read_cfg(self, extra_fns): 166 no_cfg_paths = helpers.Paths({}, self.datasource) 167 merger = helpers.ConfigMerger(paths=no_cfg_paths, 168 datasource=self.datasource, 169 additional_fns=extra_fns, 170 base_cfg=self._read_base_cfg()) 171 return merger.cfg cloud-init generates the user lists as: users: default: True foo: True So what is happening is the default configuratoin is merged with the cloud-config. Effectively this means that regardless of the user configuration send in the cloud-config: - The ubuntu user will always be created on a Ubuntu systems - The ubuntu user is always user[0] - Any configured user is user[n+1], and therefore will not be uzer[0]
2012-08-24 21:49:33 Ben Howard description The userles merge fails to properly assign user[0] as the default user due to default configuration and the way that cloud-init merges the ondisk configuration with the cloud-config sent by the user. cloud-init/config/cloud.cfg (Default configuration)   4 # Implement for Ubuntu only: create the default 'ubuntu' user   5 users:   6 default: true   7 If a user launches with the cloud config of: users:     foo: True The expected behavior is that user foo would be configured equivalent to the parameter "user: foo". However, due to this code and the default configuration: cloud-init/cloudinit/stages.py 164 165 def _read_cfg(self, extra_fns): 166 no_cfg_paths = helpers.Paths({}, self.datasource) 167 merger = helpers.ConfigMerger(paths=no_cfg_paths, 168 datasource=self.datasource, 169 additional_fns=extra_fns, 170 base_cfg=self._read_base_cfg()) 171 return merger.cfg cloud-init generates the user lists as: users: default: True foo: True So what is happening is the default configuratoin is merged with the cloud-config. Effectively this means that regardless of the user configuration send in the cloud-config: - The ubuntu user will always be created on a Ubuntu systems - The ubuntu user is always user[0] - Any configured user is user[n+1], and therefore will not be uzer[0] The userles merge fails to properly assign user[0] as the default user due to default configuration and the way that cloud-init merges the ondisk configuration with the cloud-config sent by the user. cloud-init/config/cloud.cfg (Default configuration)   4 # Implement for Ubuntu only: create the default 'ubuntu' user   5 users:   6 default: true   7 If a user launches with the cloud config of: users:     foo: True The expected behavior is that user foo would be configured equivalent to the parameter "user: foo". However, due to this code and the default configuration: cloud-init/cloudinit/stages.py 164 165 def _read_cfg(self, extra_fns): 166 no_cfg_paths = helpers.Paths({}, self.datasource) 167 merger = helpers.ConfigMerger(paths=no_cfg_paths, 168 datasource=self.datasource, 169 additional_fns=extra_fns, 170 base_cfg=self._read_base_cfg()) 171 return merger.cfg cloud-init generates the user lists as: users:     default: True     foo: True So what is happening is the default configuratoin is merged with the cloud-config. Effectively this means that regardless of the user configuration send in the cloud-config:   - The ubuntu user will always be created on a Ubuntu systems   - The ubuntu user is always user[0]   - Any configured user is user[n+1], and therefore will not be uzer[0] - A cloud-config of "user: default: false" will be ignored. IMHO, this is a pretty serious bug.
2012-08-24 21:52:27 Ben Howard description The userles merge fails to properly assign user[0] as the default user due to default configuration and the way that cloud-init merges the ondisk configuration with the cloud-config sent by the user. cloud-init/config/cloud.cfg (Default configuration)   4 # Implement for Ubuntu only: create the default 'ubuntu' user   5 users:   6 default: true   7 If a user launches with the cloud config of: users:     foo: True The expected behavior is that user foo would be configured equivalent to the parameter "user: foo". However, due to this code and the default configuration: cloud-init/cloudinit/stages.py 164 165 def _read_cfg(self, extra_fns): 166 no_cfg_paths = helpers.Paths({}, self.datasource) 167 merger = helpers.ConfigMerger(paths=no_cfg_paths, 168 datasource=self.datasource, 169 additional_fns=extra_fns, 170 base_cfg=self._read_base_cfg()) 171 return merger.cfg cloud-init generates the user lists as: users:     default: True     foo: True So what is happening is the default configuratoin is merged with the cloud-config. Effectively this means that regardless of the user configuration send in the cloud-config:   - The ubuntu user will always be created on a Ubuntu systems   - The ubuntu user is always user[0]   - Any configured user is user[n+1], and therefore will not be uzer[0] - A cloud-config of "user: default: false" will be ignored. IMHO, this is a pretty serious bug. The userles merge fails to properly assign user[0] as the default user due to default configuration and the way that cloud-init merges the ondisk configuration with the cloud-config sent by the user. cloud-init/config/cloud.cfg (Default configuration)   4 # Implement for Ubuntu only: create the default 'ubuntu' user   5 users:   6 default: true   7 If a user launches with the cloud config of: users:     foo: True The expected behavior is that user foo would be configured equivalent to the parameter "user: foo". However, due to this code and the default configuration: cloud-init/cloudinit/stages.py 164 165.....def _read_cfg(self, extra_fns): 166.........no_cfg_paths = helpers.Paths({}, self.datasource) 167.........merger = helpers.ConfigMerger(paths=no_cfg_paths, 168.......................................datasource=self.datasource, 169.......................................additional_fns=extra_fns, 170.......................................base_cfg=self._read_base_cfg()) 171........return merger.cfg cloud-init generates the user lists as: users:     default: True     foo: True So what is happening is the default configuratoin is merged with the cloud-config. Effectively this means that regardless of the user configuration send in the cloud-config:   - The ubuntu user will always be created on a Ubuntu systems   - The ubuntu user is always user[0]   - Any configured user is user[n+1], and therefore will not be uzer[0]   - A cloud-config of "user: default: false" will be ignored. IMHO, this is a pretty serious bug.
2012-08-24 22:11:53 Ben Howard branch linked lp:~utlemming/cloud-init/merge_config.1041384
2012-08-29 14:33:45 Scott Moser cloud-init: importance Undecided High
2012-08-29 14:33:54 Scott Moser cloud-init: assignee Ben Howard (utlemming)
2012-08-31 19:41:13 Launchpad Janitor branch linked lp:cloud-init
2012-08-31 21:08:25 Launchpad Janitor branch linked lp:ubuntu/cloud-init
2012-09-19 21:08:58 Ben Howard cloud-init: status Confirmed Fix Released
2023-05-09 21:31:32 James Falcon bug watch added https://github.com/canonical/cloud-init/issues/2286