Age | Commit message (Collapse) | Author |
|
This replaces the use of SharedConfig.xml in both the walinuxagent case,
and the case where we communicate with the Azure fabric ourselves.
|
|
Azure has or will be offering shortly the ability to directly define the SSH
key value instead of a fingerprint in the ovf-env.xml file. This patch
favors defined SSH keys over the fingerprint method (LP: #1506244).
|
|
if 'condition' is provided to config in power_state, then
consult it before powering off.
This allows the user to shut down only if a condition is met, and
leave the system in a debuggable state otherwise.
An example is as simple as:
power_state:
mode: poweroff
condition: ['sh', '-c', '[ -f /disable-poweroff ]']
|
|
the content of vendordata was was being assigned to vendordata,
rather than vendordata_raw. The result was that it is not processed
for includes or part handlers or other things as it is in other
datasources.
LP: #1493453
|
|
|
|
This adds 'timestamp' and 'origin' to events.
The timestamp is simply that, a floating point timestamp of when
the event occurred.
The origin indicates the source / reporter of this. It is useful
to have a single endpoint with multiple different things reporting
to it. For example, MAAS will configure cloud-init and curtin
to report to the same endpoint and then it can differenciate who
made the post. Admittedly, they could use multiple endpoints, but
this this seems sane.
Also, add support for posting files at the close of an event.
This is utilized in curtin to post a log file when the install is
done. files are posted on success or fail of the event.
|
|
this just separates events from other things that could conceivably
be reported.
|
|
|
|
|
|
|
|
|
|
|
|
change ReportStack to ReportEventStack
change default ReportEventStack to be status.SUCCESS instead of None
|
|
|
|
|
|
This allows user to specify the following to overwrite a previously
declared entry without warnings.
rsyslog: {'remotes': {'foo': None}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reasonable test of reworked rsyslog module
|
|
|
|
Azure's ephemeral disks are not guaranteed to be assigned the same name by
the kernel every boot. This causes problems on ~2% of Azure instances, and
can be fixed by using udev rules to give us a deterministic path to mount;
this patch introduces those udev rules and modifies the Azure data source
to use them.
Changes to a couple of config modules were also required. In some places,
they just needed to learn to dereference symlinks. In cc_mounts this
wasn't sufficient because the dereferenced device would have been put in
/etc/fstab (rather defeating the point of using the udev rules in the
first place). A fairly hefty refactor was required to separate "is this a
valid block device?" from "what shall I put in fstab?".
LP: #1411582
|
|
|
|
|
|
these tests were previously passing, but doing so erroneously.
I believe that an update to mock caused them to start failing.
I've updated the tests now. The simple change is
replacing 'assert_called_with_once' with 'assert_called_once_with'.
The second set of changes is seemingly a correction of the following tests
expectations:
test_normal_version_2 : was not expecting to get frequency passed into
handle_part, but should have been.
test_no_handle_when_modfreq_once: was expecting to have handle_part
called even though the test implies otherwise.
test_exception_is_caught: this test just looked broken.
Now, we're testing that the part handler is called and that no
exception is raised past handle_part
|
|
The ephemeral disk will not necessarily be assigned the same name at
each boot (LP: #1411582), so we use some udev rules to ensure we always
get the right one.
|
|
|
|
|
|
|
|
Different versions of the CloudStack password server respond
differently; wget handles these nicely for us, so it's easier to just
use wget.
LP: #1440263, #1464253
|
|
RHEL-based systems.
This patch adds a cloud-init plugin for helping users register and subscribe
their RHEL based systems. As inputs, it can take:
- user and password OR activation key and org | requires on of the two pair
- auto-attach: True or False | optional
- service-level: <string> | optional
- add-pool [list, of, pool, ids] | optional
- enable-repos [list, of, yum, repos, to, enable] | optional
- disable-repos [list, of, yum, repos, to, disable] | optional
You can also pass the following to influence your registration via rhsm.conf:
- rhsm-baseurl | optional
- server-hostname | optional
|
|
This adds the following tests in test_distros.test_generic:
- test_systemd_in_use
Test the situation in which /run/systemd/system exists.
- test_systemd_not_in_use
Test the situation in which /run/systemd/system does not exists.
- test_systemd_symlink
This tests the situation in which /run/systemd/system exists but is a
*symlink* to a directory, which according to sd_booted() should return
false.
|
|
Patch FilesystemMockingTestcase.patchOS to support methods taking more
than a single path argument. This is required in order to properly mock
`os.symlink`, which takes two path arguments.
|
|
|
|
|
|
The fabric provides the user password in plain text via the CDROM,
and cloud-init has previously wrote the ovf-env.xml in /var/lib/waagent
with the password in plain text. This change redacts the password.
|
|
cc_rh_subscription: Use of self.log.info limited, uses the util.subp for subprocesses, removed full path for subscription-manager
cloud-config-rh_subscription.txt: A heavily commented example file on how to use rh_subscription and its main keys
test_rh_subscription.py: a set of unittests for rh_subscription
|
|
the tests of bin/cloud-init would fail in a package build environment.
so, temporariliy skip them in that environment.
|
|
|
|
This takes away our dependency on walinux-agent, by providing a builtin
path for doing cloud-init had delegated to it.
Currently the default is to still use the old path, but adding this code
in will allow us to move to the new code path with more confidence.
|
|
read_seeded was assuming a Response object back from load_tfile_or_url
but load_tfile_or_url was returning string.
since the only other user of this was a test, move load_tfile_or_url to
a test, and just do the right thing in read_seeded.
LP: #1455233
|
|
|
|
|
|
|
|
|
|
|
|
|