Age | Commit message (Collapse) | Author |
|
|
|
This allows it to be used outside of cloudinit
more easily in the future.
|
|
|
|
|
|
Instead of aborting all serial using tests instead just
create a serial module in cloudinit that will create a fake
and broken serial class when pyserial is not actually installed.
This allows for using the datasource and tests that exist in
a more functional and tested manner (even when pyserial is not
found).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If the datasource's instance id contained a '/' then the instance_id path
would not be as expected under /var/lib/cloud/instances/instance_id.
LP: #1575938
|
|
when reading the initramfs configurewd devices and turning them
into network config, we change to not have 'auto' control (or allow=auto).
The reason for this is that if the device was still up:
a.) it would try to bring it up again (due to bug 1570142)
b.) it would be brought down.
'b' is problematic if there is an iscsi or network root filesystem.
Note, that ifupdown does now support 'no-auto-down' which means
that the nic should not be brought down on 'ifdown -a'.
LP: #1568637
|
|
Now, validation_key is always a path to a file, as it is in
chef's client.rb syntax.
validation_cert is always the *content* of that file that should
be written. However, if validation_cert is the string "system",
then we do not write that value, but rather assume the file exists.
LP: #1568940
|
|
The rh_subscription config module would attempt to connect to the RHN servers
even when no config is provided.
Now, instead check to make sure that valid config is provided first.
That consists of username and password or a activation key.
LP: #1536706
|
|
Now, validation_key is always a path to a file, as it is in
chef's client.rb syntax.
validation_cert is always the *content* of that file that should
be written. However, if validation_cert is the string "system",
then we do not write that value, but rather assume the file exists.
LP: #1568940
|
|
|
|
Instead of passing the raw object and expecting the write_file to work
automatically make sure we explicitly pass the string version of it so
that the write_file routine can correctly encode/decode it as needed.
LP: #1479988
|
|
|
|
When provided with gzipped data, an exception would be raised
because of a conversion to string.
This fixes the issue and adds a test for write_files.
LP: #1565638
|
|
This adds support for suppling network configuration on the
kernel command line in 2 ways:
a.) kernel command line includes 'network-config=<base64>'
value of that parameter is base64 encoded json (or yaml)
it is taken as network config yaml.
In order to save space on kernel command line, it can be
base64 encoded gzipped json also.
b.) ip= paired with files authored by klibc's ipconfig tool
When network devices are brought up in the initramfs, klibc's
ipconfig tool writes files are named /run/net-<DEVNAME>.conf.
The best documentation available on that tool is
/usr/share/doc/libklibc/README.ipconfig.gz.
Also changes util.get_cmdline() to return the command line of
pid 1 if it is in a container. That is to make it consistent with
The systemd generator, and allow passing a command line to lxd,
as lxd does not mask /proc/cmdline.
|
|
|
|
add tests to show this functional.
|
|
|
|
|
|
Introduced a new path in configdrive, openstack/2015-10-15/, needed
to add bogus data in that path as well to ensure config reader didn't
find good data when testing for exception thrown.
|
|
|
|
|
|
Previously we returned a string of "." the same length as the dmi field.
That seems confusing to the user as "." would seem like a valid response
when in fact this value should not be considered valid.
So now, in this case, return empty string.
|
|
Previously we returned a string of "." the same length as the dmi field.
That seems confusing to the user as "." would seem like a valid response
when in fact this value should not be considered valid.
So now, in this case, return empty string.
|
|
it is not uncommon to find dmi data in /sys full of 'ff'. utf-8
decoding of those would fail, causing warning and stacktrace.
Return '.' instead of \xff. This is what dmidecode would return.
$ dmidecode --string system-product-name
|
|
it is not uncommon to find dmi data in /sys full of 'ff'. utf-8
decoding of those would fail, causing warning and stacktrace.
Return '.' instead of \xff. This maps to what dmidecode would return
$ dmidecode --string system-product-name
.................................
|
|
The user can still choose to run pollinate here to seed their
random data. And in an environment with network datasource, that
would be expected to work. However, we do not want to run it any
more from cloud-init because
a.) pollinate's own init system jobs should get it ran before ssh,
which is the primary purpose of wanting cloud-init to run it.
b.) with a local datasource, there is no network guarantee when
init_modules run, so pollinate -q would often cause issues then.
c.) cloud-init would run pollinate and log the failure causing
many cloud-init specific failures that it could do nothing about.
LP: #1554152
|
|
make check fails in a trusty sbuild due to different rules on older pep8.
Fix formatting to pass in older and newer pep8.
|
|
Update make check target to run pep8 and run pyflakes or pyflakes3
depending on the value of 'PYVER'. This way the python3 build
environment does not need python2 and vice versa.
Also have make check run the 'yaml' test.
tox: have tox run pep8 in the pyflakes
|
|
Update make check target to use pep8, pyflakes, pyflakes3.
|
|
Now we can run make check to assess pep8, pyflakes for python2 or 3
And execute unittests via nosetests (2 and 3).
|
|
|
|
|
|
this makes 'make' run pyflakes, so failures there will stop a build.
also adds it to tox.
|
|
This is the first changeset submitted as a part of project to
add cloud-init support for VMware vSphere Hypervisor. This changeset
contains _only_ the changes for a simple python parser for a
Image Customization Specification file pushed by VMware vSphere
hypervisor into the guest VMs. In a later changeset, will be submitting
another patch to actually detect the underlying VMware vSphere hypervisor
and do the necessary customization.
|
|
A few changes:
a.) change to using '--name=value' rather than '--name' 'value'
b.) make sure only strings are passed to command
(useful for storage_create_loop: which is likely an integer)
c.) document simple working example
d.) support installing zfs if not present and storage_backedn has it.
|
|
|
|
- Implemented the 'search_file' function using 'os.walk()'
- Fixed few variable names.
- Removed size() function in config_file.py
- Updated the test_config_file.py to use len() instead of .size()
|
|
LP: #1488891
|
|
|
|
|
|
|
|
LX-brand zones on Joyent's SmartOS use a different metadata source
(socket file) than the KVM-based SmartOS virtualization (serial port).
This patch adds support for recognizing the different flavors of
virtualization on SmartOS and setting up a metadata source file object.
After the file object is created, the rest of the code for the datasource
LP: #1540965
|
|
If lxd key is present in cfg, then run 'lxd init' with values from the 'init'
entry in lxd configuration as flags.
|