-
7b13279...
by
Scott Moser
on 2017-07-13
-
tests: fix usage of mock in GCE test.
The usage of mock in this test was simply invalid and only worked by
happenstance.
-
812c368...
by
Chad Smith
on 2017-07-13
-
test_gce: Fix invalid mock of platform_reports_gce to return False
The mock of platform_reports_gce is created with a True return value in
tests/unittests/test_datasource/test_gce.py:TestDataSourceGCE.setUp().
But, the final test_get_data_returns_false_if_not_on_gce incorrectly
attempts to override the mocked return_value of True to False by setting
self.m_platform_gce.return_value = False. But, since the mock is already
initialized, the updated False is not honored. Instead we should use the
patch decorator on the specific unit test to override the return_value of
DataSourceGCE.platform_reports_gce to False.
A False from platform_reports_gce allows DataSourceGCE.get_data to
immediately return False instead of trying to contact
metadata.google.internal as the related bug references.
-
0677216...
by
Joshua Powers
on 2017-07-06
-
test: fix incorrect keyid for apt repository.
The test is currently importing the incorrect keyid. It specifies
the curtin developers ppa, rather than the cloud-init ppa. On
Artful this causes failures as a check is made to verify the
correct key is imported for the ppa, whereas on previous releases
only a warning was issued.
Also, change to use a full key fingerprint.
LP: #1702717
-
32e9a4d...
by
Joshua Powers
on 2017-07-10
-
tests: Update version of pylxd
With the upgrade to lxd 2.15, pylxd version 2.2.3 broke.
Upgrading to version 2.2.4 fixes issues with missing attributes.
-
4330a98...
by
Andrew Jorgensen
on 2017-06-16
-
write_files: Remove log from helper function signatures.
Instead of passing around a 'log' reference to functions, just import
logging and use that. This is the pattern that is now more common in
cloud-init.
-
a703c6a...
by
Brian Candler
on 2017-07-08
-
doc: document the cmdline options to NoCloud
Add permitted keys to documentation on seeding NoCloud.
-
4d9f24f...
by
Scott Moser
on 2017-06-29
-
read_dmi_data: always return None when inside a container.
This fixes stacktrace and warning message that would be printed
to the log if running inside a container and read_dmi_data tried
to access a key that was not present.
In a container, the /sys/class/dmi/id data is not relevant to the
but to the host. Additionally an unpriviledged container might see
strange behavior:
# cd /sys/class/dmi/id/
# id -u
0
# ls -l chassis_serial
-r-------- 1 nobody nogroup 4096 Jun 29 16:49 chassis_serial
# cat chassis_serial
cat: /sys/class/dmi/id/chassis_serial: Permission denied
The solution here is to just always return None when running in a
container.
LP: #1701325
-
17bad42...
by
Scott Moser
on 2017-06-29
-
requirements.txt: remove trailing white space.
The 'jsonschema' line had trailing white space. Remove it.
-
ebc9ecb...
by
Ryan Harper
on 2017-06-20
-
Azure: Add network-config, Refactor net layer to handle duplicate macs.
On systems with network devices with duplicate mac addresses, cloud-init
will fail to rename the devices according to the specified network
configuration. Refactor net layer to search by device driver and device
id if available. Azure systems may have duplicate mac addresses by
design.
Update Azure datasource to run at init-local time and let Azure datasource
generate a fallback networking config to handle advanced networking
configurations.
Lastly, add a 'setup' method to the datasources that is called before
userdata/vendordata is processed but after networking is up. That is
used here on Azure to interact with the 'fabric'.
-
10e5195...
by
Joshua Powers
on 2017-06-26
-
Tests: Simplify the check on ssh-import-id
I want to be able to add additional SSH keys to my account, therefore I
should not be limiting these tests to look for one specific key. Instead
we confirm that the comment in authorized_users has the specified users.