yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #53690
[Bug 1575055] Re: check_instance_id() error on reboots when using config-drive
** Changed in: ubuntu-z-systems
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/1575055
Title:
check_instance_id() error on reboots when using config-drive
Status in cloud-init:
Fix Committed
Status in Ubuntu on IBM z Systems:
Fix Released
Status in cloud-init package in Ubuntu:
Fix Released
Status in cloud-init source package in Xenial:
Fix Released
Bug description:
Problem Description
=================================
When using a config-drive to provide meta-data to cloud-init on ubuntu (for Linux guest running in KVM for z Systems) we get a check_instance_id() error whenever we soft reboot after the (successful) initial boot.
The error shows:
[ 5.283203] cloud-init[1637]: Cloud-init v. 0.7.7 running 'init-local' at Sat, 23 Apr 2016 00:50:58 +0000. Up 5.25 seconds.
[ 5.283368] cloud-init[1637]: 2016-04-22 20:50:58,839 - util.py[WARNING]: failed of stage init-local
[ 5.286659] cloud-init[1637]: failed run of stage init-local
[ 5.286770] cloud-init[1637]: ------------------------------------------------------------
[ 5.286849] cloud-init[1637]: Traceback (most recent call last):
[ 5.286924] cloud-init[1637]: File "/usr/bin/cloud-init", line 520, in status_wrapper
[ 5.286998] cloud-init[1637]: ret = functor(name, args)
[ 5.287079] cloud-init[1637]: File "/usr/bin/cloud-init", line 250, in main_init
[ 5.287152] cloud-init[1637]: init.fetch(existing=existing)
[ 5.287225] cloud-init[1637]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 322, in fetch
[ 5.287298] cloud-init[1637]: return self._get_data_source(existing=existing)
[ 5.287371] cloud-init[1637]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 229, in _get_data_source
[ 5.287445] cloud-init[1637]: ds.check_instance_id(self.cfg)):
[ 5.287518] cloud-init[1637]: TypeError: check_instance_id() takes 1 positional argument but 2 were given
[ 5.287592] cloud-init[1637]: ------------------------------------------------------------
[FAILED] Failed to start Initial cloud-init job (pre-networking).
The failure of the init-local pre-networking does seem to lead to a boot up delay as cloud-init tries to search for networking outside of the already saved networking data.
Otherwise the error is purely cosmetic as later init modules find (or
let existing IP configuration take over) and bring up the correct
interfaces.
The original problem was found outside of openstack with stand-alone
cloud-config iso images. But have been able to reproduce the problem
within an openstack ICM environment.
Team has had some success getting around the problem by patching the
check_instance_id function in /usr/lib/python3/dist-
packages/cloudinit/sources/DataSourceConfigDrive.py so that it
accepted an extra argument, ex:
ubuntu@markvercd:~$ sudo cat check_instance_id.patch
--- /usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py 2016-04-06 15:29:59.000000000 +0000
+++ /usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py.new 2016-04-11 22:53:47.799867139 +0000
@@ -155,7 +155,7 @@
return True
- def check_instance_id(self):
+ def check_instance_id(self,somecfg):
# quickly (local check only) if self.instance_id is still valid
return sources.instance_id_matches_system_uuid(self.get_instance_id())
ubuntu@markvercd:~$
---uname output---
Linux k6mpathcl.pokprv.stglabs.ibm.com 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:31:26 UTC 2016 s390x s390x s390x GNU/Linux
Machine Type = KVM guest on a z13 (2827-732) LPAR
Steps to Reproduce
=============================
1) set up ubuntu guest image with cloud-init
2) pass in iso image with cloud-config data in cdrom device
3) boot up successfully with cloud-config data
4) attempt a soft reboot.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1575055/+subscriptions