~oddbloke/cloud-init/+git/cloud-init:ds_update_events

Last commit made on 2019-03-14
Get this branch:
git clone -b ds_update_events https://git.launchpad.net/~oddbloke/cloud-init/+git/cloud-init
Only Dan Watkins can upload to this branch. If you are Dan Watkins please log in for upload directions.

Branch merges

Branch information

Name:
ds_update_events
Repository:
lp:~oddbloke/cloud-init/+git/cloud-init

Recent commits

c7032e5... by Dan Watkins

DataSource: move update_events from a class to an instance attribute

Currently, DataSourceAzure updates self.update_events in __init__. As
update_events is a class attribute on DataSource, this updates it for
all instances of classes derived from DataSource including those for
other clouds. This means that if DataSourceAzure is even instantiated,
its behaviour is applied to whichever data source ends up being used for
boot.

To address this, update_events is moved from a class attribute to an
instance attribute (that is therefore populated at instantiation time).
This retains the defaults for all DataSource sub-class instances, but
avoids them being able to mutate the state in instances of other
DataSource sub-classes.

update_events is only ever referenced on an instance of DataSource (or a
sub-class); no code relies on it being a class attribute. (In fact,
it's only used within methods on DataSource or its sub-classes, so it
doesn't even _need_ to remain public, though I think it's appropriate
for it to be public.)

DataSourceScaleway is also updated to move update_events from a
class attribute to an instance attribute, as the class attribute would
now be masked by the DataSource instance attribute.

LP: #1819913

3acaacc... by Robert Schweikert

net/sysconfig: Handle default route setup for dhcp configured NICs

When the network configuration has a default route configured and
another network device that is configured with dhcp, SUSE sysconfig
output should not accept the default route provided by the dhcp
server.

LP: #1812117

1e6a72b... by Dan Watkins

DataSourceEc2: update RELEASE_BLOCKER to be more accurate

Our previous understanding of the upgrade issue was incomplete; it turns
out the only change we need is the one now outlined.

3554ffe... by Ryan Harper

cloud-init-per: POSIX sh does not support string subst, use sed

cloud-init-per is run via /bin/sh which requires POSIX shell
compliance and does not implement string substitution like
bash. Replace these calls with use of sed.

LP: #1819222

7c07af2... by Scott Moser

Support locking user with usermod if passwd is not available.

In some cases, the 'passwd' command might not be available, but
'usermod' might be. In debian systems both are provided by the
'passwd' package. In Redhat/Centos passwd comes from 'passwd' package
while 'usermod' comes from `shadow-utils`

This should just support either one with no real cost other than
the check.

43f5850... by zolti

Example for Microsoft Azure data disk added.

109772c... by Dan Watkins

clean: correctly determine the path for excluding seed directory

Previously, init.paths.cloud_dir has a trailing slash, which meant that
"/var/lib/cloud//seed" was being compared to "/var/lib/cloud/seed" and
(of course), never matching.

In this commit, switch to using os.path.join to avoid this case (and
update the tests to catch it in future).

LP: #1818571

5352dd9... by Dan Watkins

helpers/openstack: Treat unknown link types as physical

Some deployments of OpenStack expose link types to the guest which
cloud-init doesn't recognise. These will almost always be physical, so
we can operate more robustly if we assume that they are (whilst warning
the user that we're seeing something unexpected).

LP: #1639263

edf052c... by Dan Watkins

drop Python 2.6 support and our NIH version detection

- Remove the last few places that use `if PY26`
- Replace our Python version detection logic with six's (which we were
  already using in most places)

eee0e09... by Ryan Harper

tip-pylint: Fix assignment-from-return-none errors

pylint now complains about assignment of None from a
return of a function call. This does not account for subclassing
so we resolve this issue by removing the assignment in the unittest.