Last commit made on 2018-05-03
Get this branch:
git clone -b jocha-reboot-bugfix-2 https://git.launchpad.net/~jocha/cloud-init
Only Joshua Chan can upload to this branch. If you are Joshua Chan please log in for upload directions.

Branch merges

Branch information


Recent commits

40962b6... by Joshua Chan

patching chad's suggestions to limit scope of marker file and flakes

60bccb9... by Joshua Chan

refactored unit test into seperate focussed test classes

e549839... by Joshua Chan

rephrased a log and moved report ready after writing marker file

94ad936... by Joshua Chan

fix string formatting and split up unit tests

736daeb... by Joshua Chan

moved deletion of marker file after it is safe from reboot

88fb2bf... by Joshua Chan

fixing pylint import warning

dac2e76... by Joshua Chan

Don't report ready after reboot during poll imds

4ed1645... by Mike Gerdts

DataSourceSmartOS: add locking of serial device.

cloud-init and mdata-get each have their own implementation of the
SmartOS metadata protocol. If cloud-init and other services that call
mdata-get are run concurrently, crosstalk on the serial port can cause
them both to become confused.

This change makes it so that cloud-init uses the same cooperative
locking scheme that's used by mdata-get, thus preventing cross-talk
between mdata-get and cloud-init.

For testing, a VM running on a SmartOS host and pyserial are required.
If the tests are run on a platform other than SmartOS, those that use a
real serial port are skipped. pyserial remains commented in
requirements.txt because most testers will not be running atop SmartOS.

LP: #1746605

2347988... by Mike Gerdts

DataSourceSmartOS: sdc:hostname is ignored

There are three potential sources of the hostname, one of which is
documented SmartOS's vmadm(1M) via the hostname property. That
property's value is retrieved via the sdc:hostname key. The other
two sources for the hostname are a hostname key in customer_metadata
and the VM's uuid (sdc:uuid). Of these three, the sdc:hostname value
is not used in a meaningful way by DataSourceSmartOS.

This fix changes the fallback mechanism when hostname is not
specified in customer_metadata. The order of precedence for setting
the hostname is now 1) hostname in customer_metadata,
2) sdc:hostname, then 3) sdc:uuid.

LP: #1765085

8e11150... by Mike Gerdts

DataSourceSmartOS: list() should always return a list

If customer_metadata has no keys, the KEYS request returns an empty
string. Callers of the list() method expect a list to be returned and
will give a stack trace if this expectation is not met.

LP: #1763480