Age | Commit message (Collapse) | Author |
|
that removes some of the code in apt_update_upgrade
to do upgrades and installs and places it in a
generic package module and adjusts some of the
reboot backoffs and log flushing/sleeping that
was happening there.
|
|
setup properly.
|
|
to ensure that even if they are found that they
are also valid, before they are assumed to be
the correct device name.
|
|
Also fix the extraction of the metadata key name
since it actually uses 'dashes' instead of being
a single word.
|
|
translate the device name to a actual device using
logic that will try the ec2 metadata (if avail) or
will try using 'blkid' to find a corresponding label.
LP: #1062540
|
|
|
|
we map 'hostname' to 'local-hostname'
so that the modules work correctly with
the cfgdrive style of data.
|
|
This fixes (tested) bug 978127. The server was actually returning a 401
not a 403. As such, the fix here was insufficient. This will now take
either of those 2 error codes. I've also tested it by changing the clock
in the cloud-init upstart job with a stanza like below, and verifying
that we do see the problem and then it resolve itself:
pre-start script
offset="10 minutes ago"
past=$(date -R --date "$offset")
date --set "$past" &&
echo ===== "set date to $past [$offset]" ===== ||
echo ===== "failed to set date to $past [$offset]" ====
end script
LP: #978127
|
|
Rework the rest of the locations that used the previous 'user' and make
those locations go through the new distros functions to select the default
user or the user list (depending on usage).
Adjust the tests to check the new 'default' field that signifies the
default user + test the new method to extract just the default user from a
normalized user dictionary.
"default" user is now marked in the user dict and get_default_user uses
that.
|
|
|
|
|
|
located and warn when it is not found + only
run the shell command when actual contents
exist to run.
|
|
imported without being renamed due to
previous usage of the attribute 'distros'
|
|
|
|
the previous 'user' and make those locations
go through the new distros functions to select
the default user or the user list (depending on usage).
Adjust the tests to check the new 'default' field
that signifies the default user + test the new method
to extract just the default user from a normalized
user dictionary.
|
|
|
|
In 0.7.0 we started using yaml.safe_load to load data rather than
yaml.load. Some producers (namely, ubuntu MAAS created) have produced
cloud-config data in the past that included python unicode types.
This creates a specialized safe_loader that is basically safe_load +
support for python unicode.
|
|
|
|
before we start iterating over it (it could
be sent is as none).
|
|
|
|
Packages on debian/ubuntu should start on installation. As a result, if we
want to get config changes we've inserted to be read, we need to restart.
Note one interesting thing here.
upstart considers 'restart' as "restart only if currently running", while
'service' considers restart to be "stop if running, then start". So the use of
'service' here is important, rather than just 'restart'
|
|
The primary utility here is normalize_user_groups, which would
be called by config modules to get a list of users or groups.
This centralizes what was copied code into this one location.
|
|
|
|
|
|
user normalization function instead of
the previous 'user' extraction.
|
|
|
|
|
|
device name, throw an error since rhel can not currently
handle this case.
|
|
|
|
and produce a user and group list. Clean this up to
be simpler as well as handle the old 'user' case when
it exists in configuration.
|
|
Rework the rhel sysconfig writing/updating so that it goes through a
single function which helps ensure correctness. Also write to
/etc/sysconfig/network when we have written out devices to ensure that
networking is on.
|
|
|
|
|
|
|
|
Fix the ifup so that if a list of devices is provided then each interface is
brought up individually instead of using the '--all' which isn't on rhel.
The default debian behavior will be to use this still though as it overrides
the new bring up interfaces function for this case.
|
|
In the event of a 403 (Unauthorized) in oauth, try set a 'oauth_clockskew'
variable. In future headers, use a time created by 'time.time() +
self.oauth_clockskew'. The idea here is that if the local time is bad (or even
if the server time is bad) we will essentially use something that should be
similar to the remote clock.
This fixes LP: #978127.
LP: #978127
|
|
|
|
|
|
|
|
since it has little dependence on the distros
class itself. Readjust the using code to use
this new module level function instead.
|
|
|
|
|
|
separated list so that its types match more of
what the group list can be.
|
|
responsible only for creating users and groups and
normalizing a input configuration into a normalized
format that splits up the user list, the group list
and the default user listsand let the add user/group config
module handle calling those methods to add its own users/groups
and the default user (if any).
2. Also add in tests for this normalization process to ensure
that it is pretty bug free and works with the different types
of formats that users/groups/defaults + options can take.
|
|
we are going to check for the 'all' entry
and if that exists then only fire off one
call (since debian supports this).
|
|
to avoid duplicating the same code in
this file.
|
|
so that it goes through a single function
which helps ensure correctness. Also write
to /etc/sysconfig/network when we have written
out devices to ensure that networking is on.
|
|
then each interface is brought up individually instead
of using the '--all' which isn't on rhel. The default
debian behavior will be to use this still though as it
overrides the new bring up interfaces function for this
case.
|
|
This most commonly occurs if a user-data script does '/sbin/poweroff'
where syslog was being used. Once poweroff is invoked, syslog gets killed
and logging would start to show stack traces.
This generally tries to continue working instead, but log to stderr.
|
|
|