2015-02-20 17:04:10 |
Ben Howard |
bug |
|
|
added bug |
2015-02-20 17:46:23 |
Ben Howard |
summary |
Azure default user creation fails on Vivid |
cloud-init skips cloud-config modules on 15.04 Azure |
|
2015-02-20 18:03:48 |
Ben Howard |
description |
Cloud-init is not creating the fabric defined user. The root cause appears that the "users-groups" cloud-config module is not being run.
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.032275] init: cloud-init main process (603) terminated with status 1
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.139874] init: Error while reading from descriptor: Broken pipe
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.152660] init: failsafe main process (838) killed by TERM signal
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] util.py[DEBUG]: Running module ssh-authkey-fingerprints (<module 'cloudinit.config.cc_s
sh_authkey_fingerprints' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py'>) failed#012Traceback (m
ost recent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 664, in _run_modules#012 cc.run(run_name
, mod.handle, func_args, freq=freq)#012 File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 63, 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 198, in run
#012 results = functor(*args)#012 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py", line 103,
in handle#012 (key_fn, key_entries) = ssh_util.extract_authorized_keys(user_name)#012 File "/usr/lib/python3/dist-packages/cloudini
t/ssh_util.py", line 211, in extract_authorized_keys#012 (ssh_dir, pw_ent) = users_ssh_info(username)#012 File "/usr/lib/python3/di
st-packages/cloudinit/ssh_util.py", line 204, in users_ssh_info#012 pw_ent = pwd.getpwnam(username)#012KeyError: 'getpwnam(): name n
ot found: utlemming'
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] stages.py[DEBUG]: Running module keys-to-console (<module 'cloudinit.config.cc_keys_to_
console' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_keys_to_console.py'>) with frequency once-per-instance
Snippet on the user
{'cfg': {'_pubkeys': [{'fingerprint': '8ECDF2795861824ADBE631CF8FF016B85D2A0B04',
'path': '/home/utlemming/.ssh/authorized_keys'}],
'cloud_config_modules': [ ... ],
'disk_setup': {'ephemeral0': {'layout': [100],
'overwrite': True,
'table_type': 'gpt'}},
'fs_setup': [{'device': 'ephemeral0.1',
'filesystem': 'ext4',
'replace_fs': 'ntfs'}],
'ssh_pwauth': False,
'system_info': {'default_user': {'lock_passwd': False,
'name': 'utlemming',
'passwd': '...'}}},
In |
Cloud-init is skipping the init modules on Azure. The Azure Datasource is run and then cloud-config modules are run. This prevents user-creation, default SSH keys, etc.
[ORIGINAL REPORT]
Cloud-init is not creating the fabric defined user. The root cause appears that the "users-groups" cloud-config module is not being run.
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.032275] init: cloud-init main process (603) terminated with status 1
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.139874] init: Error while reading from descriptor: Broken pipe
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.152660] init: failsafe main process (838) killed by TERM signal
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] util.py[DEBUG]: Running module ssh-authkey-fingerprints (<module 'cloudinit.config.cc_s
sh_authkey_fingerprints' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py'>) failed#012Traceback (m
ost recent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 664, in _run_modules#012 cc.run(run_name
, mod.handle, func_args, freq=freq)#012 File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 63, 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 198, in run
#012 results = functor(*args)#012 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py", line 103,
in handle#012 (key_fn, key_entries) = ssh_util.extract_authorized_keys(user_name)#012 File "/usr/lib/python3/dist-packages/cloudini
t/ssh_util.py", line 211, in extract_authorized_keys#012 (ssh_dir, pw_ent) = users_ssh_info(username)#012 File "/usr/lib/python3/di
st-packages/cloudinit/ssh_util.py", line 204, in users_ssh_info#012 pw_ent = pwd.getpwnam(username)#012KeyError: 'getpwnam(): name n
ot found: utlemming'
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] stages.py[DEBUG]: Running module keys-to-console (<module 'cloudinit.config.cc_keys_to_
console' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_keys_to_console.py'>) with frequency once-per-instance
Snippet on the user
{'cfg': {'_pubkeys': [{'fingerprint': '8ECDF2795861824ADBE631CF8FF016B85D2A0B04',
'path': '/home/utlemming/.ssh/authorized_keys'}],
'cloud_config_modules': [ ... ],
'disk_setup': {'ephemeral0': {'layout': [100],
'overwrite': True,
'table_type': 'gpt'}},
'fs_setup': [{'device': 'ephemeral0.1',
'filesystem': 'ext4',
'replace_fs': 'ntfs'}],
'ssh_pwauth': False,
'system_info': {'default_user': {'lock_passwd': False,
'name': 'utlemming',
'passwd': '...'}}},
In |
|
2015-02-20 20:20:17 |
Ubuntu Foundations Team Bug Bot |
tags |
|
bot-comment |
|
2015-02-20 20:46:03 |
Ben Howard |
tags |
bot-comment |
apport-collected bot-comment uec-images vivid |
|
2015-02-20 20:46:04 |
Ben Howard |
description |
Cloud-init is skipping the init modules on Azure. The Azure Datasource is run and then cloud-config modules are run. This prevents user-creation, default SSH keys, etc.
[ORIGINAL REPORT]
Cloud-init is not creating the fabric defined user. The root cause appears that the "users-groups" cloud-config module is not being run.
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.032275] init: cloud-init main process (603) terminated with status 1
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.139874] init: Error while reading from descriptor: Broken pipe
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.152660] init: failsafe main process (838) killed by TERM signal
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] util.py[DEBUG]: Running module ssh-authkey-fingerprints (<module 'cloudinit.config.cc_s
sh_authkey_fingerprints' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py'>) failed#012Traceback (m
ost recent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 664, in _run_modules#012 cc.run(run_name
, mod.handle, func_args, freq=freq)#012 File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 63, 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 198, in run
#012 results = functor(*args)#012 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py", line 103,
in handle#012 (key_fn, key_entries) = ssh_util.extract_authorized_keys(user_name)#012 File "/usr/lib/python3/dist-packages/cloudini
t/ssh_util.py", line 211, in extract_authorized_keys#012 (ssh_dir, pw_ent) = users_ssh_info(username)#012 File "/usr/lib/python3/di
st-packages/cloudinit/ssh_util.py", line 204, in users_ssh_info#012 pw_ent = pwd.getpwnam(username)#012KeyError: 'getpwnam(): name n
ot found: utlemming'
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] stages.py[DEBUG]: Running module keys-to-console (<module 'cloudinit.config.cc_keys_to_
console' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_keys_to_console.py'>) with frequency once-per-instance
Snippet on the user
{'cfg': {'_pubkeys': [{'fingerprint': '8ECDF2795861824ADBE631CF8FF016B85D2A0B04',
'path': '/home/utlemming/.ssh/authorized_keys'}],
'cloud_config_modules': [ ... ],
'disk_setup': {'ephemeral0': {'layout': [100],
'overwrite': True,
'table_type': 'gpt'}},
'fs_setup': [{'device': 'ephemeral0.1',
'filesystem': 'ext4',
'replace_fs': 'ntfs'}],
'ssh_pwauth': False,
'system_info': {'default_user': {'lock_passwd': False,
'name': 'utlemming',
'passwd': '...'}}},
In |
Cloud-init is skipping the init modules on Azure. The Azure Datasource is run and then cloud-config modules are run. This prevents user-creation, default SSH keys, etc.
[ORIGINAL REPORT]
Cloud-init is not creating the fabric defined user. The root cause appears that the "users-groups" cloud-config module is not being run.
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.032275] init: cloud-init main process (603) terminated with status 1
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.139874] init: Error while reading from descriptor: Broken pipe
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.152660] init: failsafe main process (838) killed by TERM signal
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] util.py[DEBUG]: Running module ssh-authkey-fingerprints (<module 'cloudinit.config.cc_s
sh_authkey_fingerprints' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py'>) failed#012Traceback (m
ost recent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 664, in _run_modules#012 cc.run(run_name
, mod.handle, func_args, freq=freq)#012 File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 63, 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 198, in run
#012 results = functor(*args)#012 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py", line 103,
in handle#012 (key_fn, key_entries) = ssh_util.extract_authorized_keys(user_name)#012 File "/usr/lib/python3/dist-packages/cloudini
t/ssh_util.py", line 211, in extract_authorized_keys#012 (ssh_dir, pw_ent) = users_ssh_info(username)#012 File "/usr/lib/python3/di
st-packages/cloudinit/ssh_util.py", line 204, in users_ssh_info#012 pw_ent = pwd.getpwnam(username)#012KeyError: 'getpwnam(): name n
ot found: utlemming'
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] stages.py[DEBUG]: Running module keys-to-console (<module 'cloudinit.config.cc_keys_to_
console' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_keys_to_console.py'>) with frequency once-per-instance
Snippet on the user
{'cfg': {'_pubkeys': [{'fingerprint': '8ECDF2795861824ADBE631CF8FF016B85D2A0B04',
'path': '/home/utlemming/.ssh/authorized_keys'}],
'cloud_config_modules': [ ... ],
'disk_setup': {'ephemeral0': {'layout': [100],
'overwrite': True,
'table_type': 'gpt'}},
'fs_setup': [{'device': 'ephemeral0.1',
'filesystem': 'ext4',
'replace_fs': 'ntfs'}],
'ssh_pwauth': False,
'system_info': {'default_user': {'lock_passwd': False,
'name': 'utlemming',
'passwd': '...'}}},
In
---
ApportVersion: 2.16.1-0ubuntu2
Architecture: amd64
DistroRelease: Ubuntu 15.04
Package: cloud-init 0.7.7~bzr1060-0ubuntu1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 3.18.0-13.14-generic 3.18.5
Tags: vivid uec-images
Uname: Linux 3.18.0-13-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
_MarkForUpload: True |
|
2015-02-20 20:46:04 |
Ben Howard |
attachment added |
|
Dependencies.txt https://bugs.launchpad.net/bugs/1423972/+attachment/4323532/+files/Dependencies.txt |
|
2015-02-20 20:46:06 |
Ben Howard |
attachment added |
|
ProcEnviron.txt https://bugs.launchpad.net/bugs/1423972/+attachment/4323533/+files/ProcEnviron.txt |
|
2015-02-20 20:56:49 |
Ben Howard |
attachment added |
|
/var/log and /var/lib/cloud from affected instance https://bugs.launchpad.net/ubuntu/+bug/1423972/+attachment/4323549/+files/bug-1423972.tar.xz |
|
2015-02-20 21:52:07 |
Ben Howard |
attachment added |
|
Potential patch https://bugs.launchpad.net/ubuntu/+bug/1423972/+attachment/4323594/+files/lp1423972.patched |
|
2015-02-20 21:53:49 |
Ben Howard |
bug task added |
|
cloud-init |
|
2015-02-20 22:13:00 |
Ben Howard |
description |
Cloud-init is skipping the init modules on Azure. The Azure Datasource is run and then cloud-config modules are run. This prevents user-creation, default SSH keys, etc.
[ORIGINAL REPORT]
Cloud-init is not creating the fabric defined user. The root cause appears that the "users-groups" cloud-config module is not being run.
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.032275] init: cloud-init main process (603) terminated with status 1
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.139874] init: Error while reading from descriptor: Broken pipe
Feb 20 16:35:33 utl-vivid-en-200932 kernel: [ 34.152660] init: failsafe main process (838) killed by TERM signal
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] util.py[DEBUG]: Running module ssh-authkey-fingerprints (<module 'cloudinit.config.cc_s
sh_authkey_fingerprints' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py'>) failed#012Traceback (m
ost recent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 664, in _run_modules#012 cc.run(run_name
, mod.handle, func_args, freq=freq)#012 File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 63, 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 198, in run
#012 results = functor(*args)#012 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py", line 103,
in handle#012 (key_fn, key_entries) = ssh_util.extract_authorized_keys(user_name)#012 File "/usr/lib/python3/dist-packages/cloudini
t/ssh_util.py", line 211, in extract_authorized_keys#012 (ssh_dir, pw_ent) = users_ssh_info(username)#012 File "/usr/lib/python3/di
st-packages/cloudinit/ssh_util.py", line 204, in users_ssh_info#012 pw_ent = pwd.getpwnam(username)#012KeyError: 'getpwnam(): name n
ot found: utlemming'
Feb 20 16:12:47 utl-vivid-en-200910 [CLOUDINIT] stages.py[DEBUG]: Running module keys-to-console (<module 'cloudinit.config.cc_keys_to_
console' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_keys_to_console.py'>) with frequency once-per-instance
Snippet on the user
{'cfg': {'_pubkeys': [{'fingerprint': '8ECDF2795861824ADBE631CF8FF016B85D2A0B04',
'path': '/home/utlemming/.ssh/authorized_keys'}],
'cloud_config_modules': [ ... ],
'disk_setup': {'ephemeral0': {'layout': [100],
'overwrite': True,
'table_type': 'gpt'}},
'fs_setup': [{'device': 'ephemeral0.1',
'filesystem': 'ext4',
'replace_fs': 'ntfs'}],
'ssh_pwauth': False,
'system_info': {'default_user': {'lock_passwd': False,
'name': 'utlemming',
'passwd': '...'}}},
In
---
ApportVersion: 2.16.1-0ubuntu2
Architecture: amd64
DistroRelease: Ubuntu 15.04
Package: cloud-init 0.7.7~bzr1060-0ubuntu1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 3.18.0-13.14-generic 3.18.5
Tags: vivid uec-images
Uname: Linux 3.18.0-13-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
_MarkForUpload: True |
Cloud-init's conversion of user-data to mime fails when the user-data is base64 encoded due to the Python2 to Python3 switch.
Consider:
import base64
hi = "aGkK"
if 'hi' in str(base64.b64decode(hi)):
print("works")
if 'hi' in base64.b64decode(hi):
print("works on Py2")
ben@prongs:~$ python /tmp/proof.py
works
works on Py2
ben@prongs:~$ python3 /tmp/proof.py
works
Traceback (most recent call last):
File "/tmp/proof.py", line 8, in <module>
if 'hi' in base64.b64decode(hi):
TypeError: Type str doesn't support the buffer API |
|
2015-02-20 22:13:36 |
Ben Howard |
summary |
cloud-init skips cloud-config modules on 15.04 Azure |
cloud-init user-data mime conversion fails on base64 encoded data |
|
2015-02-20 22:18:14 |
Ben Howard |
cloud-init: assignee |
|
Ben Howard (utlemming) |
|
2015-02-20 22:20:32 |
Ben Howard |
branch linked |
|
lp:~utlemming/cloud-init/lp1423972 |
|
2015-02-20 22:26:32 |
Ben Howard |
description |
Cloud-init's conversion of user-data to mime fails when the user-data is base64 encoded due to the Python2 to Python3 switch.
Consider:
import base64
hi = "aGkK"
if 'hi' in str(base64.b64decode(hi)):
print("works")
if 'hi' in base64.b64decode(hi):
print("works on Py2")
ben@prongs:~$ python /tmp/proof.py
works
works on Py2
ben@prongs:~$ python3 /tmp/proof.py
works
Traceback (most recent call last):
File "/tmp/proof.py", line 8, in <module>
if 'hi' in base64.b64decode(hi):
TypeError: Type str doesn't support the buffer API |
Cloud-init's conversion of user-data to mime fails when the user-data is base64 encoded due to the Python2 to Python3 switch. base64.b64decode in Python 2 returns a string, whilst Python3 returns a byte stream.
Consider:
import base64
hi = "aGkK"
print(type(base64.b64decode(hi)).__name__)
if 'hi' in str(base64.b64decode(hi)):
print("works")
if 'hi' in base64.b64decode(hi):
print("works on Py2")
ben@prongs:~$ python /tmp/proof.py
str
works
works on Py2
ben@prongs:~$ python3 /tmp/proof.py
bytes
works
Traceback (most recent call last):
File "/tmp/proof.py", line 10, in <module>
if 'hi' in base64.b64decode(hi):
TypeError: Type str doesn't support the buffer API |
|
2015-02-20 22:36:00 |
Ben Howard |
ubuntu: status |
New |
In Progress |
|
2015-02-20 22:36:08 |
Ben Howard |
ubuntu: milestone |
|
ubuntu-15.03 |
|
2015-02-21 00:17:26 |
Ubuntu Foundations Team Bug Bot |
tags |
apport-collected bot-comment uec-images vivid |
apport-collected bot-comment patch uec-images vivid |
|
2015-02-24 17:02:01 |
Launchpad Janitor |
branch linked |
|
lp:cloud-init |
|
2015-02-26 19:18:15 |
Scott Moser |
cloud-init: status |
New |
Fix Committed |
|
2015-02-26 19:18:20 |
Scott Moser |
cloud-init: importance |
Undecided |
High |
|
2015-02-26 19:22:18 |
Launchpad Janitor |
branch linked |
|
lp:ubuntu/cloud-init |
|
2015-02-27 21:30:23 |
Launchpad Janitor |
branch linked |
|
lp:~smoser/ubuntu/vivid/cloud-init/snappy |
|
2015-12-01 16:12:44 |
Mathew Hodson |
affects |
ubuntu |
cloud-init (Ubuntu) |
|
2015-12-01 16:12:44 |
Mathew Hodson |
cloud-init (Ubuntu): milestone |
ubuntu-15.03 |
|
|
2016-01-27 16:36:36 |
David Duncan |
bug |
|
|
added subscriber David Duncan |
2016-03-17 22:36:10 |
Ben Howard |
cloud-init (Ubuntu): status |
In Progress |
Fix Released |
|
2016-03-17 22:36:13 |
Ben Howard |
cloud-init: status |
Fix Committed |
Fix Released |
|
2023-05-10 06:16:25 |
James Falcon |
bug watch added |
|
https://github.com/canonical/cloud-init/issues/2524 |
|