~dbungert/ubuntu/+source/cloud-init:maybe-fix-rtd

Last commit made on 2023-08-17
Get this branch:
git clone -b maybe-fix-rtd https://git.launchpad.net/~dbungert/ubuntu/+source/cloud-init
Only Dan Bungert can upload to this branch. If you are Dan Bungert please log in for upload directions.

Branch merges

Branch information

Name:
maybe-fix-rtd
Repository:
lp:~dbungert/ubuntu/+source/cloud-init

Recent commits

9d5cde0... by Dan Bungert

rtd: python version to 3 ("latest stable")

RTD builds currently fail. RTD is using asdf to install a python
version that is natively present on Ubuntu 22.04.

Testing this change to see if it helps.

f69a6f3... by James Falcon

integration tests: Pass username to pycloudlib (#4324)

This enables running cloud-init integration tests from distros other
than Ubuntu.

90b0159... by James Falcon

Bump pycloudlib to 1!5.1.0 (#4353)

1!5.0.0 removed 'wait' on launch along with a cloud 'clean' method, so
update our integration testing code appropriately.

cda82fe... by Dermot Bradley

cloud.cfg.tmpl: reorganise, minimise/reduce duplication (#4272)

Simplify the cloud.cfg.tmpl file. There is a lot of duplication
(e.g. the same sudo rule specified multiple times).

This also addresses #4267 and aligns Debian-specific template
configuration with Debian's own packaged cloud.cfg, located here:
https://salsa.debian.org/cloud-team/cloud-init/-/blob/master/debian/cloud.cfg

Use uniform YAML indentation.

Modify jinja template to avoid duplicate blank lines.

4f09548... by =?utf-8?q?Mina_Gali=C4=87?= <email address hidden>

analyze: fix (unexpected) timestamp parsing (#4347)

In case of very unexpected timestamps, we pass them on to date.
Unfortunately, only GNU date is able to perform this level of deduction
(guess work).

Rework the code and tests to look for GNU date on non-Linux platforms.
Only fail, and loudly! if GNU date cannot be found.

Sponsored by: The FreeBSD Foundation

Fixes GH-4333

1e1624f... by =?utf-8?q?Mina_Gali=C4=87?= <email address hidden>

cc_growpart: fix tests to run on FreeBSD (#4351)

Because /etc/rc.d/growfs exists on FreeBSD, we need to be selective
about when to allow tests access to it, so that they will pass.

Sponsored by: The FreeBSD Foundation

0c17a34... by =?utf-8?q?Mina_Gali=C4=87?= <email address hidden>

subp: Fix spurious test failure on FreeBSD (#4355)

Fix a test failure that only seemed to occur when running the full test
suite. Probably due to something not being cleaned up properly.

This adds an env={"LANG": "C"} to simplify the test execution, and
makes the failure go away.

Sponsored by: The FreeBSD Foundation

Fixes GH-4354

10d6f30... by =?utf-8?q?Mina_Gali=C4=87?= <email address hidden>

cmd/clean: fix tests on non-Linux platforms (#4352)

change clean_script to use `#!/bin/sh` which is guaranteed to exist on
pretty much any Unix (like) system, unlike `/bin/bash`, which could be
anywhere in the PATH.

Sponsored by: The FreeBSD Foundation

8a70dbc... by =?utf-8?q?Mina_Gali=C4=87?= <email address hidden>

util: Fix get_proc_ppid() on non-Linux systems (#4348)

`/proc/$pid/environ` and `/proc/$pid/stat` don't exist on BSD.
procfs on BSDs is highly limited, and its use very discourged.

While FreeBSD has procstat(1), which could reasonably read a process
environment, that use-case in the code is Linux specific and doesn't map
on FreeBSD.

Guard get_proc_env() tests with is_Linux().
The code already mostly uses this as a fallback, when all else fails.

implement get_proc_ppid() with `ps(1)`.
This should work on most platforms that have `ps(1)`.

Sponsored by: The FreeBSD Foundation

Fixes GH-4332

0cfc5c6... by =?utf-8?q?Mina_Gali=C4=87?= <email address hidden>

cc_wireguard: make tests pass on FreeBSD (#4346)

These tests relied on the SUT to provide sensible return values for
util.kernel_version(). On FreeBSD, those values are 14.0-CURRENT for my
development machine, which doesn't work well with when split at '.' and
compared against a pair of integers (14, '0-CURRENT') < (5, 4) doesn't
make much sense.

This patch adds `@mock`s for util.kernel_version wherever it is used.
That way, test_cc_wireguard.py tests passes on a FreeBSD system.

Sponsored by: The FreeBSD Foundation