~smoser/cloud-init:feature/usermod-if-no-passwd

Last commit made on 2019-03-06
Get this branch:
git clone -b feature/usermod-if-no-passwd https://git.launchpad.net/~smoser/cloud-init
Only Scott Moser can upload to this branch. If you are Scott Moser please log in for upload directions.

Branch merges

Branch information

Name:
feature/usermod-if-no-passwd
Repository:
lp:~smoser/cloud-init

Recent commits

1a58426... by Scott Moser

Move comment per review.

83abba0... by Scott Moser

pycodestyle

4b28d46... by Scott Moser

address feedback: Do not call util.which on second option if first exists.

solution came from:

https://stackoverflow.com/questions/8534256/find-first-element-in-a-sequence-that-matches-a-predicate

6073ce0... by Scott Moser

add docstrings to tests.

78aa089... 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.

f2f530e... by Dan Watkins

cc_apt_pipelining: stop disabling pipelining by default

This was introduced due to Ubuntu using S3 mirrors, and S3 having a
buggy pipelining implementation. Those Ubuntu mirrors are no longer in
production and, furthremore, apt has also grown the ability to handle
servers with broken pipelining.

As such, we can stop disabling pipelining, which should result in
improved apt download speeds.

LP: #1794982

1182ad5... by Dan Watkins

tests: fix some slow tests and some leaking state

In test_ds_identify, don't mutate otherwise-static test data. When
running tests in a random order, this was causing failures due to
breaking preconditions for other tests.

In tests/helpers, reset logging level in tearDown. Some of the CLI
tests set the level of the root logger in a way that isn't correctly
reset.

For test_poll_imds_re_dhcp_on_timeout and
test_dhcp_discovery_run_in_sandbox_warns_invalid_pid, mock out
time.sleep; this saves ~11 seconds (or ~40% of previous test time!).

f278a8a... by Dan Watkins

util: don't determine string_types ourselves

six already provides this for us, and we're already paying the cost to
determine it there; no need to do it twice.

f0f0962... by Dan Watkins

cc_rsyslog: Escape possible nested set

Under Python 3.7, we are seeing `FutureWarning: Possible nested set at
position 23`; escaping this bracket causes that warning to disappear.

LP: #1816967

8cfcc28... by Eric Williams

Enable encrypted_data_bag_secret support for Chef

Encrypted data bags require a secrets file to be present to
decrypt, and the location of the file must be configured the
Chef client configuration file, client.rb.

This update enables cloud-init's chef module to update that
setting in client.rb.

LP: #1817082