Last commit made on 2018-04-20
Get this branch:
git clone -b lp1763480 https://git.launchpad.net/~mgerdts/cloud-init
Only Mike Gerdts can upload to this branch. If you are Mike Gerdts please log in for upload directions.

Branch merges

Branch information


Recent commits

7fa6eef... by Mike Gerdts

feedback from smoser: no more magic 16 or 17

f9ec995... 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

4c573d0... by Mike Gerdts

DataSourceSmartOS: fix hang when metadata service is down

If the metadata service in the host is down while a guest that uses
DataSourceSmartOS is booting, the request from the guest falls into the
bit bucket. When the metadata service is eventually started, the guest
has no awareness of this and does not resend the request. This results in
cloud-init hanging forever with a guest reboot as the only recovery

This fix updates the metadata protocol to implement the initialization
phase, just as is implemented by mdata-get and related utilities. The
initialization phase includes draining all pending data from the serial
port, writing an empty command and getting an expected error message in
reply. If the initialization phase times out, it is retried every five
seconds. Each timeout results in a warning message: "Timeout while
initializing metadata client. Is the host metadata service running?" By
default, warning messages are logged to the console, thus the reason for a
hung boot is readily apparent.

LP: #1667735

025ddc0... by Mike Gerdts

DataSourceSmartOS: change default fs on ephemeral disk from ext3 to ext4.

ext3 is not able to support file system sizes that are needed in Joyent's
cloud. For the default block size of 4k, the maximum filesystem size
for ext3 is 2^32 * 4096 = 16 TiB.

This changes the default file system type from ext3 to ext4.

LP: #1763511

acca826... by Scott Moser

pycodestyle: Fix invalid escape sequences in string literals.

Python has deprecated these invalid string literals now
and pycodestyle is identifying them with a W605 warning.

So basically, any use of \ not followed by one of [\'"abfnrtv]
or \ooo (octal) \xhh (hex) or a newline is invalid. This is most
comomnly seen for us in regex. To solve, you either:
 a.) use a raw string r'...'
 b.) correctly escape the \ that was not intended to be interpreted.

6a979bb... by Ryan Harper

Implement bash completion script for cloud-init command line

In bash shells with bash_completion enabled, now the cloud-init
sub commands and parameters/flags will be shown.

49b562c... by Chad Smith

tools: Fix make-tarball cli tool usage for development

This tool is used to assist during the creation of ubuntu packages for
release testing. Address the following on the command-line:
 * --help option now print usage
 * Add --orig-tarball which creates named output file
 * drop unused --verbose option

4b86ab9... by Scott Moser

renderer: support unicode in render_from_file.

If a file passed to render_from_file had non-ascii text then
jinja in python2 would decode as ascii, which would cause
UnicodeDecodeError. This issue can be re-created in python2
with just:

The solution here is to explicitly pass in unicode supporting
type (py3 str, py2 unicode). Those are six.text_type.
Then jinja does not try to decode.

The reason we hit this is that load_file calls decode_binary.
decode_binary believes it has no work to do if it got a six.string_types.
  isinstance('can\xe2\x80\x99t', six.string_types) == True
So it returns the original string which will blow up for jinja.

Our fix here then is to load the file in binary mode and explicitly
decode it to utf-8. Then in python2 we'll have a unicode type
and in python3 we'll have a string type.

c6dff58... by Ryan Harper

Implement ntp client spec with auto support for distro selection

Add a base NTP client configuration dictionary and allow Distro
specific changes to be merged. Add a select client function which
implements logic to preferr installed clients over clients which
need to be installed. Also allow distributions to override the
cloud-init defaults.

LP: #1749722

0f77456... by Scott Moser

Apport: add Brightbox, IBM, LXD, and OpenTelekomCloud to list of clouds.

When filing a bug with apport, this allows the user to choose
Brightbox, IBM, LXD, or OpenTelekomCloud as their cloud.