diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000000..58796591419 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,4 @@ +# Automatically apply to git blame with `git config blame.ignorerevsfile .git-blame-ignore-revs` + +# Apply black and isort formatting +bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 00000000000..e2c32ad8054 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,21 @@ +--- +name: Bug +about: Submit a bug report +labels: bug, new +--- + +# Bug report + + +## Steps to reproduce the problem + + +## Environment details +- Cloud-init version: +- Operating System Distribution: +- Cloud provider, platform or installer type: + +## cloud-init logs + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..83161a3ee21 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,4 @@ +contact_links: + - name: "Get Help" + about: "Links to documentation and community support" + url: "https://docs.cloud-init.io/en/latest/#project-and-community" diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md new file mode 100644 index 00000000000..b51bd667f4b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -0,0 +1,9 @@ +--- +name: Documentation +about: Give feedback, make a suggestion/request, or report a problem with the documentation +title: "[docs]: " +labels: documentation, new +--- + +# Documentation request + diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 00000000000..9cf882f2ac8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,9 @@ +--- +name: Enhancement +about: Functionality to improve cloud-init +title: "[enhancement]: " +labels: enhancement, new +--- + +# Enhancement + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 017e82e4854..adcac6442a7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,18 +1,47 @@ + + + ## Proposed Commit Message - + ``` -summary: no more than 70 characters +(optional scope): # no more than 72 characters A description of what the change being made is and why it is being -made, if the summary line is insufficient. The blank line above is -required. This should be wrapped at 72 characters, but otherwise has -no particular length requirements. +made if the summary line is insufficient. This should be wrapped at +72 characters. If you need to write multiple paragraphs, feel free. -LP: #NNNNNNN (replace with the appropriate bug reference or remove -this line entirely if there is no associated bug) +Fixes GH-NNNNN (GitHub Issue number. Remove line if irrelevant) +LP: #NNNNNN (Launchpad bug number. Remove line if irrelevant) ``` ## Additional Context @@ -24,9 +53,8 @@ this is a bug fix) this change on a live deployed system, including any necessary configuration files, user-data, setup, and teardown. Scripts used may be attached directly to this PR. --> -## Checklist: - - - [ ] My code follows the process laid out in [the documentation](https://cloudinit.readthedocs.io/en/latest/topics/contributing.html) - - [ ] I have updated or added any unit tests accordingly - - [ ] I have updated or added any documentation accordingly + +## Merge type + +- [x] Squash merge using "Proposed Commit Message" +- [ ] Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#) diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000000..4b8e9af3fc3 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,18 @@ +# Changes to labeler do not run in pull requests because this only runs against +# the base branch by default +# +# https://github.com/actions/labeler/tree/main?tab=readme-ov-file#initial-set-up-of-the-labeler-action +documentation: +- all: + - changed-files: + - any-glob-to-any-file: + - 'doc/**' + - 'cloudinit/config/schemas/**' + - base-branch: ['main'] +packaging: +- any: + - changed-files: + - any-glob-to-any-file: + - 'debian/**' + - base-branch: ['ubuntu/*'] + diff --git a/.github/workflows/alpine-unittests.yml b/.github/workflows/alpine-unittests.yml new file mode 100644 index 00000000000..a525415eee7 --- /dev/null +++ b/.github/workflows/alpine-unittests.yml @@ -0,0 +1,72 @@ + +name: Alpine Unittests + +on: + pull_request: + branches-ignore: + - 'ubuntu/**' + push: + branches: + - main + +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true + +defaults: + run: + shell: sh -ex {0} + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: "Checkout" + uses: actions/checkout@v4 + with: + # Fetch all tags for tools/read-version + fetch-depth: 0 + + - name: Setup LXD + uses: canonical/setup-lxd@v0.1.2 + + - name: Create alpine container + # the current shell doesn't have lxd as one of the groups + # so switch groups to run lxd commands + run: lxc launch images:alpine/edge alpine + + - name: Check networking (for debugging) + run: | + lxc exec alpine -- ping -c 1 google.com || true + lxc exec alpine -- ping -c 1 dl-cdn.alpinelinux.org || true + lxc exec alpine -- nslookup www.google.com || true + lxc exec alpine -- ping -c 1 dl-cdn.alpinelinux.org || true + + - name: Install dependencies + run: lxc exec alpine -- apk add py3-tox git tzdata + + - name: Mount source into container directory + run: lxc config device add alpine gitdir disk source=$(pwd) path=/root/cloud-init-ro + + - name: Create a r/w directory to run tests in + # without this, tox fails during package install + run: | + lxc exec alpine -- git config --global --add safe.directory /root/cloud-init-ro/.git + lxc exec alpine -- git clone cloud-init-ro cloud-init-rw + + - name: Set a timezone + # test for regression of GH-5158 + # https://github.com/canonical/cloud-init/issues/5158 + run: lxc exec alpine -- ln -s /usr/share/zoneinfo/Europe/Brussels /etc/localtime + + - name: Set up tox environment + # Setup the environment and then tell pytest to do essentially nothing + run: lxc exec alpine --cwd /root/cloud-init-rw -- tox -e py3 -- --cache-show= + + - name: Stop network + # Take down network interfaces to ensure tests don't use network + run: lxc exec alpine -- ifdown -a + + - name: Run unittests + run: lxc exec alpine --cwd /root/cloud-init-rw -- sh -c 'tox -e py3 -- --color=yes' diff --git a/.github/workflows/check_format.yml b/.github/workflows/check_format.yml new file mode 100644 index 00000000000..3b77b2371db --- /dev/null +++ b/.github/workflows/check_format.yml @@ -0,0 +1,106 @@ +name: Lint Tests +on: + pull_request: + push: + branches: + - main + +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true +defaults: + run: + shell: sh -ex {0} + +jobs: + check_format: + strategy: + fail-fast: false + matrix: + env: [ruff, mypy, pylint, black, isort] + name: Check ${{ matrix.env }} + runs-on: ubuntu-latest + steps: + - name: "Checkout #1" + uses: actions/checkout@v4 + + - name: "Checkout #2 (for tools/read-version)" + run: | + git fetch --unshallow + git remote add upstream https://git.launchpad.net/cloud-init + + - name: Dependencies + run: | + sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update + sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox + + - name: Print version + run: python3 --version + + - name: Test + env: + # matrix env: not to be confused w/environment variables or testenv + TOXENV: ${{ matrix.env }} + run: tox + schema-format: + strategy: + fail-fast: false + name: Check json format + runs-on: ubuntu-24.04 + steps: + - name: "Checkout #1" + uses: actions/checkout@v4 + + - name: "Test format" + run: | + tools/check_json_format.sh cloudinit/config/schemas/schema-cloud-config-v1.json + tools/check_json_format.sh cloudinit/config/schemas/schema-network-config-v1.json + tools/check_json_format.sh cloudinit/config/schemas/versions.schema.cloud-config.json + + doc: + strategy: + fail-fast: false + name: Check docs + runs-on: ubuntu-24.04 + steps: + - name: "Checkout #1" + uses: actions/checkout@v4 + + - name: "Checkout #2 (for tools/read-version)" + run: | + git fetch --unshallow + git remote add upstream https://git.launchpad.net/cloud-init + - name: "Install Python 3.10" + uses: actions/setup-python@v5 + with: + python-version: '3.11.9' + - name: "Install dependencies" + run: | + sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update + sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox + - name: "Spellcheck" + run: | + tox + env: + TOXENV: doc-spelling + - name: "Build docs" + env: + TOXENV: doc + run: | + tox + + shell-lint: + name: Shell Lint + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install ShellCheck + run: | + sudo apt-get update + sudo apt install shellcheck + + - name: Run ShellCheck + run: | + shellcheck ./tools/ds-identify diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 8a0b2c0702f..66bfb0f15a5 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -1,40 +1,10 @@ -name: Verify Contributor License Agreement +name: CLA Check on: [pull_request] jobs: - cla-validate: - + cla-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Check CLA signing status for ${{ github.event.pull_request.user.login }} - run: | - cat > unsigned-cla.txt < /dev/null \ + | tr '\n' ' ' \ + ) + - name: Build package + run: | + DEB_BUILD_OPTIONS=nocheck ./packages/bddeb -d --release ${{ env.RELEASE }} + cp cloud-init_all.deb ${{ runner.temp }} + - name: Archive debs as artifacts + uses: actions/upload-artifact@v4 + with: + name: 'cloud-init-${{ env.RELEASE }}-deb' + path: '${{ runner.temp }}/cloud-init*.deb' + retention-days: 3 + - name: Setup LXD + uses: canonical/setup-lxd@v0.1.2 + with: + channel: 6/stable + - name: Verify deb package + run: | + ls -hal '${{ runner.temp }}' + echo ${{ runner.temp }}/cloud-init*.deb || true + ls -hal ${{ runner.temp }}/cloud-init*.deb || true + - name: Set up Pycloudlib + run: | + ssh-keygen -P "" -q -f ~/.ssh/id_rsa + echo "[lxd]" > /home/$USER/.config/pycloudlib.toml + - name: Run integration Tests + run: | + CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls ${{ runner.temp }}/cloud-init*.deb)" CLOUD_INIT_OS_IMAGE=${{ env.RELEASE }} tox -e integration-tests-ci -- --color=yes tests/integration_tests/ diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 00000000000..a47c5a338e2 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,9 @@ +name: PR Labeler +on: +- pull_request_target + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 00000000000..8a6ecb06767 --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,39 @@ +name: scheduled-linkcheck +on: + schedule: + - cron: '3 14 * * *' +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true + +jobs: + linkcheck: + runs-on: ubuntu-24.04 + continue-on-error: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.failOnError == 'true') }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: "Install Python 3.10" + uses: actions/setup-python@v5 + with: + python-version: '3.10.8' + + - name: Install tox + run: pip install tox + + - name: Run Sphinx linkcheck + run: tox -e linkcheck | tee output.txt + + - name: Check for broken links below threshold + run: | + broken_count=$(grep -c "broken" output.txt) + if [[ $broken_count -ge 5 ]]; then + echo "Too many broken links detected: $broken_count" + broken_matches=$(grep "broken" output.txt) + echo "Broken links \n$broken_matches" + exit 1 + else + echo "Number of broken links is below threshold: $broken_count" + fi diff --git a/.github/workflows/packaging-tests.yml b/.github/workflows/packaging-tests.yml new file mode 100644 index 00000000000..cbd2249e97b --- /dev/null +++ b/.github/workflows/packaging-tests.yml @@ -0,0 +1,81 @@ +# This test runs against packaging PRs and verifies that +# patches apply and unit tests pass. +# +# TODO: add full build-package / sbuild test +name: "Packaging (downstream branch) - patches apply cleanly unit tests pass" + +on: + pull_request: + branches: + - 'ubuntu/**' + +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true + +defaults: + run: + shell: sh -ex {0} + +jobs: + patch-conflicts-upstream: + runs-on: ubuntu-24.04 + name: Check patches apply cleanly and unit tests pass + steps: + + - name: Setup - checkout branch + uses: actions/checkout@v4 + + - name: Setup - install dependencies + run: | + # This stage is slow, and unnecessecary when no series exists, so + # only run it if necessary to save some cycles. + # GitHub Actions doesn't appear to have a simple mechanism for + # early exit without failure + if [ ! -f debian/patches/series ]; then + echo "no patches, skipping" + exit 0 + fi + sudo DEBIAN_FRONTEND=noninteractive apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get -y install tox quilt + + - name: Setup - Configure quilt + run: | + # GitHub Actions doesn't appear to have a simple mechanism for + # early exit without failure + if [ ! -f debian/patches/series ]; then + echo "no patches, skipping" + exit 0 + fi + # The quilt default setting is --fuzz=2, but debian packaging has + # stricter requirements + sudo sed -i 's/QUILT_PUSH_ARGS=.*$/QUILT_PUSH_ARGS="--fuzz=0"/g' /etc/quilt.quiltrc + # Standardize patches to use this format. Sorted patches reduce patch size. + sudo sed -i 's/QUILT_REFRESH_ARGS=.*$/QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index --sort"/g' /etc/quilt.quiltrc + # quilt defaults to QUILT_PATCHES=patches, but debian uses debian/patches + sudo sed -i 's|.*QUILT_PATCHES=.*$|QUILT_PATCHES=debian/patches|g' /etc/quilt.quiltrc + + - name: Run test - apply patches and run unit tests + run: | + # GitHub Actions doesn't appear to have a simple mechanism for + # early exit without failure + if [ ! -f debian/patches/series ]; then + echo "no patches, skipping" + exit 0 + fi + quilt push -a + tox -e py3 + quilt pop -a --refresh + - name: Enforce sorted patches + run: | + # GitHub Actions doesn't appear to have a simple mechanism for + # early exit without failure + if [ ! -f debian/patches/series ]; then + echo "no patches, skipping" + exit 0 + fi + # check for any changes from the refresh above + if [ -n "$(git diff)" ]; then + # if patches were refreshed then they weren't sorted + exit 1 + fi diff --git a/.github/workflows/packaging-upstream.yml b/.github/workflows/packaging-upstream.yml new file mode 100644 index 00000000000..9e446f6791d --- /dev/null +++ b/.github/workflows/packaging-upstream.yml @@ -0,0 +1,69 @@ +# This test runs after merging PRs into upstream to notify maintainers when +# a new PR has caused a patch to not apply against the merged branch. +name: "Packaging (main branch) - patches apply cleanly and unit tests pass (after merging)" + +on: + push: + branches: + - main + +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true + +defaults: + run: + shell: bash -ex {0} + +jobs: + patch-conflicts-ubuntu: + runs-on: ubuntu-24.04 + name: Check patches + steps: + + - name: Setup - checkout branches + uses: actions/checkout@v4 + with: + # Fetch all history for merging + fetch-depth: 0 + ref: main + + - name: Setup - install dependencies + run: | + sudo DEBIAN_FRONTEND=noninteractive apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get -y install tox quilt + + - name: Setup - configure quilt + run: | + # The quilt default setting is --fuzz=2, but debian packaging has + # stricter requirements. + sudo sed -i 's/QUILT_PUSH_ARGS=.*$/QUILT_PUSH_ARGS="--fuzz=0"/g' /etc/quilt.quiltrc + # quilt defaults to QUILT_PATCHES=patches, but debian uses debian/patches + sudo sed -i 's|.*QUILT_PATCHES=.*$|QUILT_PATCHES=debian/patches|g' /etc/quilt.quiltrc + + - name: Setup - configure git + run: | + git config user.name "GitHub Actions" + git config user.email "noreply@github.com" + + - name: Run test - apply patches and run unit tests for each series + run: | + # Modify the following line to add / remove ubuntu series + for BRANCH in ubuntu/devel ubuntu/plucky ubuntu/noble ubuntu/jammy; do + # merge - this step is not expected to fail + git merge "origin/$BRANCH" + if [ ! -f debian/patches/series ]; then + echo "no patches, skipping $BRANCH" + # undo merge - this step is not expected to fail + git reset --hard origin/main + continue + fi + # did patches apply cleanly? + quilt push -a + # run unit tests + tox -e py3 + # a patch didn't un-apply cleanly if this step fails + quilt pop -a + # undo merge - this step is not expected to fail + git reset --hard origin/main + done diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml new file mode 100644 index 00000000000..1d1fcf01cbe --- /dev/null +++ b/.github/workflows/scheduled.yml @@ -0,0 +1,61 @@ +name: scheduled-daily +on: + schedule: + - cron: '3 14 * * *' +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: false + +jobs: + hypothesis: + name: unittest / hypothesis-slow + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install dependencies + env: + DEBIAN_FRONTEND: noninteractive + run: | + sudo apt-get -qy update + sudo apt-get -qy install tox + - name: Run fuzztest + env: + PYTEST_ADDOPTS: -v + HYPOTHESIS_PROFILE: ci + run: tox -e hypothesis-slow + devel_tests: + name: unittest / 3.14-dev + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Python 3.14-dev + uses: actions/setup-python@v5 + with: + # select latest version here: + # https://github.com/actions/python-versions/blob/main/versions-manifest.json + python-version: 3.14-dev + check-latest: true + - name: Install tox + run: pip install tox + - name: Run unittest + run: tox -e py3 + format_tip: + strategy: + fail-fast: false + matrix: + env: [tip-ruff, tip-mypy, tip-pylint, tip-black, tip-isort] + name: format-tip + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get -qy update + sudo apt-get -qy install tox + - name: Run Linters tip + env: + TOXENV: ${{ matrix.env }} + run: tox diff --git a/.github/workflows/shellcheck-debian-scripts.yml b/.github/workflows/shellcheck-debian-scripts.yml new file mode 100644 index 00000000000..eb79a5deb05 --- /dev/null +++ b/.github/workflows/shellcheck-debian-scripts.yml @@ -0,0 +1,60 @@ +name: ShellCheck Debian package scripts + +env: + # This is a space separated string for multiple globs + # Do not use curly braces as they will be treated as literal string in `git ls-files ${GLOBS_TO_SHELLCHECK}` + # If you decide to use globstar, make sure to use the bash shell and to `shopt -s globstar` + # Assumption in this workflow: the resolved filepaths do not contain spaces. + GLOBS_TO_SHELLCHECK: "debian/cherry-pick debian/*.config debian/*.postinst debian/*.postrm debian/*.preinst debian/*.prerm packages/debian/*.postrm" + +on: + pull_request: + # There is a known bug in GitHub but it will most probably not affect out use case + # https://github.com/orgs/community/discussions/118623#discussioncomment-9087833 + # When there are 2 PRs using the same source branch (actually the same head SHA to be more specific), with the base branch in one PR matching + # on.pull_request.branches and thee base branch in the second PR not matching this key, + # then the second PR will show these checks that were triggered by the first PR but not the second PR. + branches: + - 'ubuntu/**' + - main + +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true + +# Note: No need to specify the shell option in the shellcheck command +# as shellcheck reads and uses the shebang at the top of the linted scripts. +jobs: + shellcheck-on-matching-and-changed-files: + name: ShellCheck on matching files that have changed + runs-on: ubuntu-24.04 + steps: + - name: Repository checkout + uses: actions/checkout@v4 + + - name: Get all matching changed files + id: matching-changed-files + # For security, make sure to use a SHA not a version + uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 + with: + files: ${{ env.GLOBS_TO_SHELLCHECK }} + files_separator: " " + + - name: Run shellcheck on the matching changed files + env: + ALL_CHANGED_FILES: ${{ steps.matching-changed-files.outputs.all_changed_and_modified_files }} + run: | + if [ -z "${ALL_CHANGED_FILES}" ] + then + echo "There are no changed files in the repo which match the glob pattern \'${GLOBS_TO_SHELLCHECK}\' so shellcheck will not run" + else + RETAINED_CHANGED_FILES=$(git ls-files ${ALL_CHANGED_FILES} | tr '\n' ' ') #filter out deleted files + if [ -z "${RETAINED_CHANGED_FILES}" ] + then + echo "There are no changed files remaining in the repo which match the glob pattern \'${GLOBS_TO_SHELLCHECK}\' so shellcheck will not run" + else + echo "shellcheck will run on the remaining changed files: ${RETAINED_CHANGED_FILES}" + shellcheck ${RETAINED_CHANGED_FILES} + echo "shellcheck succeeded running on the remaining changed files" + fi + fi diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3b71ba288e9..b0dee899e2f 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,15 +10,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/stale@v1 + - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-stale: 14 - days-before-close: 7 + days-before-issue-stale: -1 + days-before-issue-close: -1 + days-before-pr-stale: 14 + days-before-pr-close: 7 stale-pr-message: | Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. - If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon. + If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging blackboxsw, and he will ensure that someone takes a look soon. - (If the pull request is closed and you would like to continue working on it, please do tag mitechie to reopen it.) + (If the pull request is closed and you would like to continue working on it, please do tag blackboxsw to reopen it.) stale-pr-label: 'stale-pr' diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml new file mode 100644 index 00000000000..a24765a209c --- /dev/null +++ b/.github/workflows/unit.yml @@ -0,0 +1,47 @@ +name: Unit Tests +on: + pull_request: + push: + branches: + - main +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true +defaults: + run: + shell: sh -ex {0} +jobs: + unittests: + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + toxenv: [py3] + slug: [""] + experimental: [false] + check-latest: [false] + continue-on-error: [false] + include: + - python-version: "3.8" + toxenv: lowest-supported + slug: (lowest-supported) + continue-on-error: false + check-latest: false + experimental: false + name: Python ${{matrix.python-version}} ${{ matrix.slug }} + runs-on: ubuntu-24.04 + continue-on-error: ${{ matrix.experimental }} + steps: + - name: "Checkout" + uses: actions/checkout@v4 + with: + # Fetch all tags for tools/read-version + fetch-depth: 0 + - name: Install Python ${{matrix.python-version}} + uses: actions/setup-python@v5 + with: + python-version: ${{matrix.python-version}} + check-latest: ${{matrix.check-latest}} + - name: Install tox + run: pip install tox + - name: Run unittest + run: tox -e ${{ matrix.toxenv }} -- --color=yes diff --git a/.gitignore b/.gitignore index 1be358d288b..13032535c79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,36 +1,40 @@ -build -cloud_init.egg-info -dist +*.asc +*.build +*.buildinfo +*.builddir +*.changes +*.cover +*.deb +*.dsc +*.egg-info *.pyc -__pycache__ -.tox -.coverage -doc/rtd_html -parts -prime -stage *.snap -*.cover -.idea/ -.venv/ -.pc/ +*.tar.gz +*.tar.xz +*.upload .cache/ +.coverage +.coverage.* +.hypothesis/ +.idea/ .mypy_cache/ +.pc/ .pytest_cache/ +.python-version +.tox +.venv/ .vscode/ +__pycache__ +build +changelog-file +dist +doc/rtd_html htmlcov/ +parts +prime +releasenotes-file +srpm/ +stage tags - -# Ignore packaging artifacts -cloud-init.dsc -cloud-init_*.build -cloud-init_*.buildinfo -cloud-init_*.changes -cloud-init_*.deb -cloud-init_*.dsc -cloud-init_*.orig.tar.gz -cloud-init_*.tar.xz -cloud-init_*.upload - -# user test settings tests/integration_tests/user_settings.py + diff --git a/.pylintrc b/.pylintrc index 3edb0092a7c..38a47cb6581 100644 --- a/.pylintrc +++ b/.pylintrc @@ -6,8 +6,7 @@ jobs=4 [MESSAGES CONTROL] -# Errors and warings with some filtered: -# W0201(attribute-defined-outside-init) +# Errors and warnings with some filtered: # W0212(protected-access) # W0221(arguments-differ) # W0222(signature-differs) @@ -25,8 +24,9 @@ jobs=4 # W0703(broad-except) # W1401(anomalous-backslash-in-string) # W1514(unspecified-encoding) +# E0012(bad-option-value) -disable=C, F, I, R, W0201, W0212, W0221, W0222, W0223, W0231, W0311, W0511, W0602, W0603, W0611, W0613, W0621, W0622, W0631, W0703, W1401, W1514 +disable=C, F, I, R, W0212, W0221, W0222, W0223, W0231, W0311, W0511, W0602, W0603, W0611, W0613, W0621, W0622, W0631, W0703, W1401, W1514, E0012 [REPORTS] @@ -65,4 +65,3 @@ ignored-classes=argparse.Namespace,optparse.Values,thread._local,ImageManager,Co # system, and so shouldn't trigger E1101 when accessed. Python regular # expressions are accepted. generated-members=types,http.client,command_handlers,m_.*,enter_context - diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 46af8ee72b0..edbc723ed28 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,8 +1,17 @@ version: 2 +build: + os: "ubuntu-22.04" + tools: + python: "3.11" + +sphinx: + configuration: doc/rtd/conf.py formats: all python: - install: - - requirements: doc-requirements.txt - - path: . + install: + - requirements: doc-requirements.txt + +sphinx: + configuration: doc/rtd/conf.py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1582e8294ac..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,141 +0,0 @@ -language: python -dist: bionic - -# We use two different caching strategies. The default is to cache pip -# packages (as most of our jobs use pip packages), which is configured here. -# For the integration tests, we instead want to cache the lxd images and -# package build schroot. -# -# We cache the lxd images because this saves a few seconds in the general -# case, but provides substantial speed-ups when cloud-images.ubuntu.com, the -# source of the images, is under heavy load. The directory in which the lxd -# images are stored (/var/snap/lxd/common/lxd/images/) is not -# readable/writeable by the default user (which is a requirement for caching), -# so we instead cache the `lxd_images/` directory. We move lxd images out of -# there before we run tests and back in once tests are complete. We _move_ the -# images out and only copy the most recent lxd image back into the cache, to -# avoid our cache growing without bound. (We only need the most recent lxd -# image because the integration tests only use a single image.) -# -# We cache the package build schroot because it saves 2-3 minutes per build. -# Without caching, we have to perform a debootstrap for every build. We update -# the schroot before storing it back in the cache, to ensure that we aren't -# just using an increasingly-old schroot as time passes. The cached schroot is -# stored as a tarball, to preserve permissions/ownership. -cache: pip - -install: - # Required so `git describe` will definitely find a tag; see - # https://github.com/travis-ci/travis-ci/issues/7422 - - git fetch --unshallow - - pip install tox - -script: - - tox - -env: - TOXENV=py3 - PYTEST_ADDOPTS=-v # List all tests run by pytest - -matrix: - fast_finish: true - include: - - python: 3.6 - - name: "Integration Tests" - if: NOT branch =~ /^ubuntu\// - env: {} - cache: - - directories: - - lxd_images - - chroots - before_cache: - - | - # Find the most recent image file - latest_file="$(sudo ls -Art /var/snap/lxd/common/lxd/images/ | tail -n 1)" - # This might be .rootfs or , normalise - latest_file="$(basename $latest_file .rootfs)" - # Find all files with that prefix and copy them to our cache dir - sudo find /var/snap/lxd/common/lxd/images/ -name $latest_file* -print -exec cp {} "$TRAVIS_BUILD_DIR/lxd_images/" \; - install: - - git fetch --unshallow - - sudo apt-get install -y --install-recommends sbuild ubuntu-dev-tools fakeroot tox debhelper - - pip install . - - pip install tox - # bionic has lxd from deb installed, remove it first to ensure - # pylxd talks only to the lxd from snap - - sudo apt remove --purge lxd lxd-client - - sudo rm -Rf /var/lib/lxd - - sudo snap install lxd - - sudo lxd init --auto - - sudo mkdir --mode=1777 -p /var/snap/lxd/common/consoles - # Move any cached lxd images into lxd's image dir - - sudo find "$TRAVIS_BUILD_DIR/lxd_images/" -type f -print -exec mv {} /var/snap/lxd/common/lxd/images/ \; - - sudo usermod -a -G lxd $USER - - sudo sbuild-adduser $USER - - cp /usr/share/doc/sbuild/examples/example.sbuildrc /home/$USER/.sbuildrc - script: - # Ubuntu LTS: Build - - ./packages/bddeb -S -d --release xenial - - | - needs_caching=false - if [ -e "$TRAVIS_BUILD_DIR/chroots/xenial-amd64.tar" ]; then - # If we have a cached chroot, move it into place - sudo mkdir -p /var/lib/schroot/chroots/xenial-amd64 - sudo tar --sparse --xattrs --preserve-permissions --numeric-owner -xf "$TRAVIS_BUILD_DIR/chroots/xenial-amd64.tar" -C /var/lib/schroot/chroots/xenial-amd64 - # Write its configuration - cat > sbuild-xenial-amd64 << EOM - [xenial-amd64] - description=xenial-amd64 - groups=sbuild,root,admin - root-groups=sbuild,root,admin - # Uncomment these lines to allow members of these groups to access - # the -source chroots directly (useful for automated updates, etc). - #source-root-users=sbuild,root,admin - #source-root-groups=sbuild,root,admin - type=directory - profile=sbuild - union-type=overlay - directory=/var/lib/schroot/chroots/xenial-amd64 - EOM - sudo mv sbuild-xenial-amd64 /etc/schroot/chroot.d/ - sudo chown root /etc/schroot/chroot.d/sbuild-xenial-amd64 - # And ensure it's up-to-date. - before_pkgs="$(sudo schroot -c source:xenial-amd64 -d / dpkg -l | sha256sum)" - sudo schroot -c source:xenial-amd64 -d / -- sh -c "apt-get update && apt-get -qqy upgrade" - after_pkgs=$(sudo schroot -c source:xenial-amd64 -d / dpkg -l | sha256sum) - if [ "$before_pkgs" != "$after_pkgs" ]; then - needs_caching=true - fi - else - # Otherwise, create the chroot - sudo -E su $USER -c 'mk-sbuild xenial' - needs_caching=true - fi - # If there are changes to the schroot (or it's entirely new), - # tar up the schroot (to preserve ownership/permissions) and - # move it into the cached dir; no need to compress it because - # Travis will do that anyway - if [ "$needs_caching" = "true" ]; then - sudo tar --sparse --xattrs --xattrs-include=* -cf "$TRAVIS_BUILD_DIR/chroots/xenial-amd64.tar" -C /var/lib/schroot/chroots/xenial-amd64 . - fi - # Use sudo to get a new shell where we're in the sbuild group - - sudo -E su $USER -c 'sbuild --nolog --no-run-lintian --verbose --dist=xenial cloud-init_*.dsc' - - ssh-keygen -P "" -q -f ~/.ssh/id_rsa - - sg lxd -c 'CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls *.deb)" tox -e integration-tests-ci' - - python: 3.5 - env: - TOXENV=xenial - PYTEST_ADDOPTS=-v # List all tests run by pytest - dist: xenial - - python: 3.6 - env: TOXENV=flake8 - - python: 3.6 - env: TOXENV=pylint - - python: 3.7 - env: TOXENV=doc - # Test all supported Python versions (but at the end, so we schedule - # longer-running jobs first) - - python: 3.9 - - python: 3.8 - - python: 3.7 - - python: 3.5 diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..6098b6ebccf --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "redhat.vscode-yaml" + ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..c27c862530b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# How to contribute to cloud-init + +Thank you for wanting to help us improve cloud-init! There are a variety of +ways you can contribute to this project, including no-code and low-code options. +This documentation will help orient you with our processes. + +Please make sure that you read this guide before starting to contribute. It +contains all the details you need to know to give your contribution the best +chance of being accepted. + +Cloud-init is hosted and managed on [GitHub](https://github.com). If you're not +familiar with how GitHub works, their +[quickstart documentation](https://docs.github.com/en/get-started/quickstart) +provides an excellent introduction to all the tools and processes you'll need +to know. + +## Prerequisites + +Before you can begin, you will need to: + +* Read and agree to abide by our + [Code of Conduct](https://ubuntu.com/community/code-of-conduct). + +* Sign the Canonical + [contributor license agreement](https://ubuntu.com/legal/contributors). This + grants us your permission to use your contributions in the project. + +* Create (or have) a GitHub account. We will refer to your GitHub username as + `GH_USER`. + +## Getting help + +We use Matrix and have a dedicated `#cloud-init` channel where you can contact +us for help and guidance. This link will take you directly to our +[Matrix room](https://matrix.to/#/#cloud-init:ubuntu.com). +Please don't be afraid to reach out if you need help constructing your pull +request. + +## Instructions for contributors + +The best way to get started is by checking out the +["Development" section](https://docs.cloud-init.io/en/latest/development/index.html) +in our documentation. This covers everything; from how to find issues to work +on, to how cloud-init is structured and useful resources, through to making your +first PR and getting it accepted. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index 06b314970da..00000000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,539 +0,0 @@ -Contributing to cloud-init -************************** - -This document describes how to contribute changes to cloud-init. -It assumes you have a `GitHub`_ account, and refers to your GitHub user -as ``GH_USER`` throughout. - -Submitting your first pull request -================================== - -Summary -------- - -Before any pull request can be accepted, you must do the following: - -* Sign the Canonical `contributor license agreement`_ -* Add yourself (alphabetically) to the in-repository list that we use - to track CLA signatures: - `tools/.github-cla-signers`_ -* Add or update any `unit tests`_ accordingly -* Add or update any `integration tests`_ (if applicable) -* Ensure unit tests and linting pass using `tox`_ -* Submit a PR against the `main` branch of the `cloud-init` repository - -.. _unit tests: https://cloudinit.readthedocs.io/en/latest/topics/testing.html -.. _integration tests: https://cloudinit.readthedocs.io/en/latest/topics/integration_tests.html - -The detailed instructions -------------------------- - -Follow these steps to submit your first pull request to cloud-init: - -* To contribute to cloud-init, you must sign the Canonical `contributor - license agreement`_ - - * If you have already signed it as an individual, your Launchpad user - will be listed in the `contributor-agreement-canonical`_ group. - (Unfortunately there is no easy way to check if an organization or - company you are doing work for has signed.) - - * When signing it: - - * ensure that you fill in the GitHub username field. - * when prompted for 'Project contact' or 'Canonical Project - Manager', enter 'James Falcon'. - - * If your company has signed the CLA for you, please contact us to - help in verifying which Launchpad/GitHub accounts are associated - with the company. - - * For any questions or help with the process, please email `James - Falcon `_ with the subject, - "Cloud-Init CLA" - - * You also may contact user ``falcojr`` in the ``#cloud-init`` - channel on the Libera IRC network. - -* Configure git with your email and name for commit messages. - - Your name will appear in commit messages and will also be used in - changelogs or release notes. Give yourself credit!:: - - git config user.name "Your Name" - git config user.email "Your Email" - -* Sign into your `GitHub`_ account - -* Fork the upstream `repository`_ on Github and clicking on the ``Fork`` button - -* Create a new remote pointing to your personal GitHub repository. - - .. code:: sh - - git clone git://github.com/canonical/cloud-init - cd cloud-init - git remote add GH_USER git@github.com:GH_USER/cloud-init.git - git push GH_USER main - -* Read through the cloud-init `Code Review Process`_, so you understand - how your changes will end up in cloud-init's codebase. - -* Submit your first cloud-init pull request, adding yourself to the - in-repository list that we use to track CLA signatures: - `tools/.github-cla-signers`_ - - * See `PR #344`_ and `PR #345`_ for examples of what this pull - request should look like. - - * Note that ``.github-cla-signers`` is sorted alphabetically. - - * (If you already have a change that you want to submit, you can - also include the change to ``tools/.github-cla-signers`` in that - pull request, there is no need for two separate PRs.) - -.. _GitHub: https://github.com -.. _Launchpad: https://launchpad.net -.. _repository: https://github.com/canonical/cloud-init -.. _contributor license agreement: https://ubuntu.com/legal/contributors -.. _contributor-agreement-canonical: https://launchpad.net/%7Econtributor-agreement-canonical/+members -.. _PR #344: https://github.com/canonical/cloud-init/pull/344 -.. _PR #345: https://github.com/canonical/cloud-init/pull/345 - -Transferring CLA Signatures from Launchpad to Github ----------------------------------------------------- - -For existing contributors who have signed the agreement in Launchpad -before the Github username field was included, we need to verify the -link between your `Launchpad`_ account and your `GitHub`_ account. To -enable us to do this, we ask that you create a branch with both your -Launchpad and GitHub usernames against both the Launchpad and GitHub -cloud-init repositories. We've added a tool -(``tools/migrate-lp-user-to-github``) to the cloud-init repository to -handle this migration as automatically as possible. - -The cloud-init team will review the two merge proposals and verify that -the CLA has been signed for the Launchpad user and record the -associated GitHub account. - -.. note:: - If you are a first time contributor, you will not need to touch - Launchpad to contribute to cloud-init: all new CLA signatures are - handled as part of the GitHub pull request process described above. - -Do these things for each feature or bug -======================================= - -* Create a new topic branch for your work:: - - git checkout -b my-topic-branch - -* Make and commit your changes (note, you can make multiple commits, - fixes, more commits.):: - - git commit - -* Run unit tests and lint/formatting checks with `tox`_:: - - tox - -* Push your changes to your personal GitHub repository:: - - git push -u GH_USER my-topic-branch - -* Use your browser to create a pull request: - - - Open the branch on GitHub - - - You can see a web view of your repository and navigate to the branch at: - - ``https://github.com/GH_USER/cloud-init/tree/my-topic-branch`` - - - Click 'Pull Request` - - Fill out the pull request title, summarizing the change and a longer - message indicating important details about the changes included, like :: - - Activate the frobnicator. - - The frobnicator was previously inactive and now runs by default. - This may save the world some day. Then, list the bugs you fixed - as footers with syntax as shown here. - - The commit message should be one summary line of less than - 70 characters followed by a blank line, and then one or more - paragraphs wrapped at 72 characters describing the change and why - it was needed. - - This is the message that will be used on the commit when it - is sqaushed and merged into main. If there is a related launchpad - bug, specify it at the bottom of the commit message. - - LP: #NNNNNNN (replace with the appropriate bug reference or remove - this line entirely if there is no associated bug) - - Note that the project continues to use LP: #NNNNN format for closing - launchpad bugs rather than GitHub Issues. - - - Click 'Create Pull Request` - -Then, a cloud-init committer will review your changes and -follow up in the pull request. Look at the `Code Review Process`_ doc -to understand the following steps. - -Feel free to ping and/or join ``#cloud-init`` on Libera irc if you -have any questions. - -.. _tox: https://tox.readthedocs.io/en/latest/ -.. _Code Review Process: https://cloudinit.readthedocs.io/en/latest/topics/code_review.html - -Design -====== - -This section captures design decisions that are helpful to know when -hacking on cloud-init. - -Cloud Config Modules --------------------- - -* Any new modules should use underscores in any new config options and not - hyphens (e.g. `new_option` and *not* `new-option`). - -Tests ------ - -Submissions to cloud-init must include testing. See :ref:`testing` for -details on these requirements. - -Type Annotations ----------------- - -The cloud-init codebase uses Python's annotation support for storing -type annotations in the style specified by `PEP-484`_. Their use in -the codebase is encouraged but with one important caveat: only -function annotations or comment annotations are supported, as the -variable annotations specified in `PEP-526`_ were introduced in Python -3.6. - -.. _PEP-484: https://www.python.org/dev/peps/pep-0484/ -.. _PEP-526: https://www.python.org/dev/peps/pep-0526/ - -Feature Flags -------------- - -.. automodule:: cloudinit.features - :members: - - -Ongoing Refactors -================= - -This captures ongoing refactoring projects in the codebase. This is -intended as documentation for developers involved in the refactoring, -but also for other developers who may interact with the code being -refactored in the meantime. - -``cloudinit.net`` -> ``cloudinit.distros.networking`` Hierarchy ---------------------------------------------------------------- - -``cloudinit.net`` was imported from the curtin codebase as a chunk, and -then modified enough that it integrated with the rest of the cloud-init -codebase. Over the ~4 years since, the fact that it is not fully -integrated into the ``Distro`` hierarchy has caused several issues. - -The common pattern of these problems is that the commands used for -networking are different across distributions and operating systems. -This has lead to ``cloudinit.net`` developing its own "distro -determination" logic: `get_interfaces_by_mac`_ is probably the clearest -example of this. Currently, these differences are primarily split -along Linux/BSD lines. However, it would be short-sighted to only -refactor in a way that captures this difference: we can anticipate that -differences will develop between Linux-based distros in future, or -there may already be differences in tooling that we currently -work around in less obvious ways. - -The high-level plan is to introduce a hierarchy of networking classes -in ``cloudinit.distros.networking``, which each ``Distro`` subclass -will reference. These will capture the differences between networking -on our various distros, while still allowing easy reuse of code between -distros that share functionality (e.g. most of the Linux networking -behaviour). ``Distro`` objects will instantiate the networking classes -at ``self.networking``, so callers will call -``distro.networking.`` instead of ``cloudinit.net.``; this -will necessitate access to an instantiated ``Distro`` object. - -An implementation note: there may be external consumers of the -``cloudinit.net`` module. We don't consider this a public API, so we -will be removing it as part of this refactor. However, we will ensure -that the new API is complete from its introduction, so that any such -consumers can move over to it wholesale. (Note, however, that this new -API is still not considered public or stable, and may not replicate the -existing API exactly.) - -In more detail: - -* The root of this hierarchy will be the - ``cloudinit.distros.networking.Networking`` class. This class will - have a corresponding method for every ``cloudinit.net`` function that - we identify to be involved in refactoring. Initially, these methods' - implementations will simply call the corresponding ``cloudinit.net`` - function. (This gives us the complete API from day one, for existing - consumers.) -* As the biggest differentiator in behaviour, the next layer of the - hierarchy will be two subclasses: ``LinuxNetworking`` and - ``BSDNetworking``. These will be introduced in the initial PR. -* When a difference in behaviour for a particular distro is identified, - a new ``Networking`` subclass will be created. This new class should - generally subclass either ``LinuxNetworking`` or ``BSDNetworking``. -* To be clear: ``Networking`` subclasses will only be created when - needed, we will not create a full hierarchy of per-``Distro`` - subclasses up-front. -* Each ``Distro`` class will have a class variable - (``cls.networking_cls``) which points at the appropriate - networking class (initially this will be either ``LinuxNetworking`` - or ``BSDNetworking``). -* When ``Distro`` classes are instantiated, they will instantiate - ``cls.networking_cls`` and store the instance at ``self.networking``. - (This will be implemented in ``cloudinit.distros.Distro.__init__``.) -* A helper function will be added which will determine the appropriate - ``Distro`` subclass for the current system, instantiate it and return - its ``networking`` attribute. (This is the entry point for existing - consumers to migrate to.) -* Callers of refactored functions will change from calling - ``cloudinit.net.`` to ``distro.networking.``, where - ``distro`` is an instance of the appropriate ``Distro`` class for - this system. (This will require making such an instance available to - callers, which will constitute a large part of the work in this - project.) - -After the initial structure is in place, the work in this refactor will -consist of replacing the ``cloudinit.net.some_func`` call in each -``cloudinit.distros.networking.Networking`` method with the actual -implementation. This can be done incrementally, one function at a -time: - -* pick an unmigrated ``cloudinit.distros.networking.Networking`` method -* find it in the `the list of bugs tagged net-refactor`_ and assign - yourself to it (see :ref:`Managing Work/Tracking Progress` below for - more details) -* refactor all of its callers to call the ``distro.networking.`` - method on ``Distro`` instead of the ``cloudinit.net.`` - function. (This is likely to be the most time-consuming step, as it - may require plumbing ``Distro`` objects through to places that - previously have not consumed them.) -* refactor its implementation from ``cloudinit.net`` into the - ``Networking`` hierarchy (e.g. if it has an if/else on BSD, this is - the time to put the implementations in their respective subclasses) - - * if part of the method contains distro-independent logic, then you - may need to create new methods to capture this distro-specific - logic; we don't want to replicate common logic in different - ``Networking`` subclasses - * if after the refactor, the method on the root ``Networking`` class - no longer has any implementation, it should be converted to an - `abstractmethod`_ - -* ensure that the new implementation has unit tests (either by moving - existing tests, or by writing new ones) -* ensure that the new implementation has a docstring -* add any appropriate type annotations - - * note that we must follow the constraints described in the "Type - Annotations" section above, so you may not be able to write - complete annotations - * we have `type aliases`_ defined in ``cloudinit.distros.networking`` - which should be used when applicable - -* finally, remove it (and any other now-unused functions) from - cloudinit.net (to avoid having two parallel implementations) - -``cloudinit.net`` Functions/Classes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The functions/classes that need refactoring break down into some broad -categories: - -* helpers for accessing ``/sys`` (that should not be on the top-level - ``Networking`` class as they are Linux-specific): - - * ``get_sys_class_path`` - * ``sys_dev_path`` - * ``read_sys_net`` - * ``read_sys_net_safe`` - * ``read_sys_net_int`` - -* those that directly access ``/sys`` (via helpers) and should (IMO) be - included in the API of the ``Networking`` class: - - * ``generate_fallback_config`` - - * the ``config_driver`` parameter is used and passed as a boolean, - so we can change the default value to ``False`` (instead of - ``None``) - - * ``get_ib_interface_hwaddr`` - * ``get_interface_mac`` - * ``interface_has_own_mac`` - * ``is_bond`` - * ``is_bridge`` - * ``is_physical`` - * ``is_renamed`` - * ``is_up`` - * ``is_vlan`` - * ``wait_for_physdevs`` - -* those that directly access ``/sys`` (via helpers) but may be - Linux-specific concepts or names: - - * ``get_master`` - * ``device_devid`` - * ``device_driver`` - -* those that directly use ``ip``: - - * ``_get_current_rename_info`` - - * this has non-distro-specific logic so should potentially be - refactored to use helpers on ``self`` instead of ``ip`` directly - (rather than being wholesale reimplemented in each of - ``BSDNetworking`` or ``LinuxNetworking``) - * we can also remove the ``check_downable`` argument, it's never - specified so is always ``True`` - - * ``_rename_interfaces`` - - * this has several internal helper functions which use ``ip`` - directly, and it calls ``_get_current_rename_info``. That said, - there appears to be a lot of non-distro-specific logic that could - live in a function on ``Networking``, so this will require some - careful refactoring to avoid duplicating that logic in each of - ``BSDNetworking`` and ``LinuxNetworking``. - * only the ``renames`` and ``current_info`` parameters are ever - passed in (and ``current_info`` only by tests), so we can remove - the others from the definition - - * ``EphemeralIPv4Network`` - - * this is another case where it mixes distro-specific and - non-specific functionality. Specifically, ``__init__``, - ``__enter__`` and ``__exit__`` are non-specific, and the - remaining methods are distro-specific. - * when refactoring this, the need to track ``cleanup_cmds`` likely - means that the distro-specific behaviour cannot be captured only - in the ``Networking`` class. See `this comment in PR #363`_ for - more thoughts. - -* those that implicitly use ``/sys`` via their call dependencies: - - * ``master_is_bridge_or_bond`` - - * appends to ``get_master`` return value, which is a ``/sys`` path - - * ``extract_physdevs`` - - * calls ``device_driver`` and ``device_devid`` in both - ``_version_*`` impls - - * ``apply_network_config_names`` - - * calls ``extract_physdevs`` - * there is already a ``Distro.apply_network_config_names`` which in - the default implementation calls this function; this and its BSD - subclass implementations should be refactored at the same time - * the ``strict_present`` and ``strict_busy`` parameters are never - passed, nor are they used in the function definition, so they can - be removed - - * ``get_interfaces`` - - * calls ``device_driver``, ``device_devid`` amongst others - - * ``get_ib_hwaddrs_by_interface`` - - * calls ``get_interfaces`` - -* those that may fall into the above categories, but whose use is only - related to netfailover (which relies on a Linux-specific network - driver, so is unlikely to be relevant elsewhere without a substantial - refactor; these probably only need implementing in - ``LinuxNetworking``): - - * ``get_dev_features`` - - * ``has_netfail_standby_feature`` - - * calls ``get_dev_features`` - - * ``is_netfailover`` - * ``is_netfail_master`` - - * this is called from ``generate_fallback_config`` - - * ``is_netfail_primary`` - * ``is_netfail_standby`` - - * N.B. all of these take an optional ``driver`` argument which is - used to pass around a value to avoid having to look it up by - calling ``device_driver`` every time. This is something of a leaky - abstraction, and is better served by caching on ``device_driver`` - or storing the cached value on ``self``, so we can drop the - parameter from the new API. - -* those that use ``/sys`` (via helpers) and have non-exhaustive BSD - logic: - - * ``get_devicelist`` - -* those that already have separate Linux/BSD implementations: - - * ``find_fallback_nic`` - * ``get_interfaces_by_mac`` - -* those that have no OS-specific functionality (so do not need to be - refactored): - - * ``ParserError`` - * ``RendererNotFoundError`` - * ``has_url_connectivity`` - * ``is_ip_address`` - * ``is_ipv4_address`` - * ``natural_sort_key`` - -Note that the functions in ``cloudinit.net`` use inconsistent parameter -names for "string that contains a device name"; we can standardise on -``devname`` (the most common one) in the refactor. - -Managing Work/Tracking Progress -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To ensure that we won't have multiple people working on the same part -of the refactor at the same time, there is a bug for each function. -You can see the current status by looking at `the list of bugs tagged -net-refactor`_. - -When you're working on refactoring a particular method, ensure that you -have assigned yourself to the corresponding bug, to avoid duplicate -work. - -Generally, when considering what to pick up to refactor, it is best to -start with functions in ``cloudinit.net`` which are not called by -anything else in ``cloudinit.net``. This allows you to focus only on -refactoring that function and its callsites, rather than having to -update the other ``cloudinit.net`` function also. - -References -~~~~~~~~~~ - -* `Mina Galić's email the the cloud-init ML in 2018`_ (plus its thread) -* `Mina Galić's email to the cloud-init ML in 2019`_ (plus its thread) -* `PR #363`_, the discussion which prompted finally starting this - refactor (and where a lot of the above details were hashed out) - -.. _tools/.github-cla-signers: https://github.com/canonical/cloud-init/blob/main/tools/.github-cla-signers -.. _get_interfaces_by_mac: https://github.com/canonical/cloud-init/blob/961239749106daead88da483e7319e9268c67cde/cloudinit/net/__init__.py#L810-L818 -.. _Mina Galić's email the the cloud-init ML in 2018: https://lists.launchpad.net/cloud-init/msg00185.html -.. _Mina Galić's email to the cloud-init ML in 2019: https://lists.launchpad.net/cloud-init/msg00237.html -.. _PR #363: https://github.com/canonical/cloud-init/pull/363 -.. _this comment in PR #363: https://github.com/canonical/cloud-init/pull/363#issuecomment-628829489 -.. _abstractmethod: https://docs.python.org/3/library/abc.html#abc.abstractmethod -.. _type aliases: https://docs.python.org/3/library/typing.html#type-aliases -.. _the list of bugs tagged net-refactor: https://bugs.launchpad.net/cloud-init/+bugs?field.tag=net-refactor diff --git a/ChangeLog b/ChangeLog index 219c46fbde9..49d71ac81b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,2852 @@ +25.3 + - chore(cc_rh_subscription): deprecate hyphenated fields, remove self.log + (#6470) [Mostafa Abdelwahab] (GH: 6370) + - feat(eni): support "ip route" if available instead of "route" (#6460) + [dermotbradley] + - test(distros): Convert test_hosts.py from unittest to pytest (#6481) + [GautamThorani] + - fix: preserve special permission bits (#6467) [deepsghimire] + - test: Convert test_registry.py from unittest to pytest (#6479) + [GautamThorani] + - test: fix integration for PROPOSED to run apt update prior to install + (#6477) + - feat(schema): add support for the not keyword (#6469) + [Mostafa Abdelwahab] (GH: 6468) + - fix: correct netplan renderer target (#6465) + - feat(hetzner): enable hotplug support and prepare IPv6 integration + (#6445) [Philipp Bender] + - fix(net-convert): respect output directory with netplan + - fix(bddeb): require exec permissions on temporary folder + - fix: properly quote commands in `do_as` function (#6400) + [Amirhossein Shaerpour] (GH: 6171) + - Optionalize bash completion. (#6441) [3405691582] + - docs(nocloud): Fix file schema examples (#6455) (GH: 5843) + - fix(systemd): revert auditd.service dependency (#6448) + - fix: bddeb tool needs distro debian param for package dependency lookup + - fix(test): raises match against an empty string will always pass + - fix(test): marks applied to fixtures have no effect + - test: refactor test_reporting.py to use only pytest (#6449) + [Chijioke Ibekwe] + - Update wait_for_cloud_init.rst to be more consistent about systemd usage + (#6442) [ExplGamma] + - fix: add OpenRC support to Meson build (#6426) [dermotbradley] + - feat(rh_subscription): new release_version field (#6347) + [Mostafa Abdelwahab] (GH: 6030) + - chore: bump isort version (#6446) + - net_convert.py: make some import failures not generate an error (#6399) + [dermotbradley] + - test: fix lru_cache test wrapper (#6443) (GH: 5869) + - docs(cc_raspberry_pi): Fix example4 (#6439) [Paul] + - test: refactor test_data.py to use only pytest (#6440) [Chijioke Ibekwe] + - tests: convert util.pathprefix2dict tests from unittest to pytest + (#6433) [Aamir] + - chore: hand off responsibilities (#6432) + - feat: support nmap in socket protocol (#6339) (GH: 6136) + - feat(cc_raspberry_pi): remove remote_gpio interface (#6429) [Paul] + - fix(docs): Fix typo in `fDQn` (#6420) [Vladimir Levin] + - Refresh dev docs for tests (#6428) + - fix(raspberry-pi-os): Update ntp client (#6425) [Paul] + - fixed defs types in cloud-init cmd devel make_mime (#6419) [abdulganiyy] + - test: remove CiTestCase fully (#6416) + - test: drop citestcase from test_reporting_hyperv.py (#6413) + - test: drop citestcase from net/test_init.py (#6410) + - test: drop citestcase from test_version.py (#6415) + - fix: read-dependencies syntax error on regex (#6326) + - doc: add testing links to doc/rtd Development headings (#6326) + - chore: update developer specfile and build for opensuse (#6326) + - chore: update developer specfile redhat/fedora and dependencies (#6326) + - chore: drop yaml validation target, covered in unittests (#6326) + - chore: update debian developer packaging template (#6326) + - fix: add apt-get update before development pkg install (#6326) + - chore!: switch to meson.build due to PEP632 (#6326) (LP: #1978328) + - chore: render vlan, bond, bridge mac properly in network state (#6397) + [Shreenidhi Shedi] + - chore: replace all mailing-list references with GH Discussions + - chore: replace all IRC references with matrix + - fix: fixed defs types in cloud-init analyze show (#6353) [abdulganiyy] + - chore(tox): align check_format's pylint folder targets (#6414) + - test: drop citestcase from net/test_network_state.py (#6402) + - test: drop citestcase from net/test_dhcp.py (#6401) + - chore(ci): bump pylint version, fix test failures (#6408) + - chore(ci): fix cloud-init test failures from new pylint (#6407) + - chore(ci): bump versions for black, ruff, and mypy (#6406) + - doc: change `jammy` to `noble` (#6398) [Amirhossein Shaerpour] + - test: drop citestcase from t* tests (#6379) + - fix: add missing test mock (#6395) + - test: drop citestcase net_freebsd (#6374) + - test: drop citestcase from test_util.py (#6387) + - Add 'to: default' support in network state (#6391) [Shreenidhi Shedi] + - test: drop citestcase from s* tests (#6378) + - test: drop citestcase from r, s and u sources (#6373) + - test: drop citestcase from v sources (#6372) + - test: drop citestcase from n and o sources (#6363) + - fix: make tools/tox-venv with current versions of tox (#6365) + [Scott Moser] + - test: skip gpg dependency test on questing (#6388) + - feat(networkd): add support for rendering bridge devices (#6349) + [Shreenidhi Shedi] + - cloud-init-hotplugd: remove use of "exec" and unnecessary exit (#6357) + [dermotbradley] (GH: 6351) + +25.2 + - fix: Ensure 822 template renders correctly on Debian (#6381) (GH: 6380) + - test: support systemctl try-reload-or-restart messaging alternatives + (#6377) + - test: increase 2nd disk size for disk setup tests (#6376) + - feat(clean): Add a new clean option to clean fstab entries (#6348) + [Ani Sinha] + - test: handle TMPDIR != "/tmp" (#6356) [Dan Bungert] + - fix: add openeuler hosts template to avoid cloud-init service failures + (#6328) [xqs] + - test: increase timeout on test_clean_package_install (#6362) + - test: relax checks on authorized keys (#6361) + - fix: Correct v2 ENI route and dns rendering (#6331) + - test: drop citestcase from i sources (#6346) + - test: drop citestcase from g and h sources (#6344) + - test: drop citestcase from c and d sources (#6336) + - test: drop citestcase from al* sources tests (#6318) + - disk_setup: Optionally use 'sfdisk' for GPT [Vitaly Kuznetsov] (GH: 5797) + - disk_setup: Fully support full GPT partition GUIDs [Vitaly Kuznetsov] + - fix(ENI): render keys with hyphens (#6333) (GH: 5234) + - fix: fixed defs types in cloudinit analyze dump (#6343) [abdulganiyy] + - feat(networkd): support vlan and bond rendering (#6324) + [Shreenidhi Shedi] + - fix(analyze-boot): use monotonic clock for containers #6322 + [Mostafa Abdelwahab] (GH: 5773) + - clean: do not attempt to find datasource when cache has been cleaned + (#6325) [Ani Sinha] + - test: drop citestcase from azure_helper tests (#6335) + - chore: remove unused target arg from Activator.available + - chore: add typing to cloudinit.net.eni + - feat(azure): Implement the clean callback for DataSourceAzure (#6321) + [Amy Chen] + - feat(oracle): set keep_configuration to true for iscsi instances [a-dubs] + - feat(network): add keep_configuration setting to v1 [a-dubs] + - doc: Document how to wait for cloud-init + - doc: Document changed systemd order in 24.4 + - fixed defs types in cloudinit analyze (#6308) [abdulganiyy] + - ci: downgrade LXD to fix integration tests (#6340) + - test: drop citestcase from azure source test (#6320) + - fix: catch and log exception during pip upgrade in ansible pull (#6301) + [Mostafa Abdelwahab] (GH: 6074) + - test: drop citestcase from some config tests + - fix: GCE datasource query issue (#3398) (#6279) + [ludovictual-system-u] (GH: 3398) + - test: drop citestcase from distro tests (#6317) + - test: drop citestcase from rest of config tests (#6314) + - ci: update patch checking to use current supported releases (#6315) + - test: drop FilesystemMockingTestCase (#6294) (GH: 5760) + - test: ensure image setup only runs once, even for xdist + - test: turn reaper into a fixture + - test: refactor obtaining session args into new function + - test: simplify passing of lxd_setup callback + - test: drop citestcase from analyze tests (#6312) + - test: drop FilesystemMockingTestCase in netconfig (#6290) + - test: expose tests.unittests.ditros._get_distro (#6290) + - doc: detailed examples of openstack config alternatives for non-x86 + images (#6303) + - test: drop FilesystemMockingTestCase in smartos (#6291) + - test: drop some FilesystemMockingTestCases (#6284) + - docs: clarify what #include can include (#6309) + - doc(ssdlc): Add hardening page (#6297) + - docs: Document network device table and limitations (#6187) + [Bryan Fraschetti] + - fix: allow downstreams to strip invalid MTU (#6246) (GH: 6239) + - test: drop FilesystemMockingTestCase from cc tests (#6282) + - docs: use correct jinja content-type (#6296) (GH: 6027) + - test: drop ResponsesTestCase (#6277) + - test: Consolidate use of paths fixture (#6289) + - test: pytestify test_vmware.py (#6288) [Mostafa Abdelwahab] + - feat(ca_certs): Add CentOS support (#6287) [Kees Bakker] + - feat(wsl): Reuse metadata as Landscape installation_request_id (#6200) + [Carlos Nihelton] + - test: drop / pytestify ResourceUsingTestCase (#6276) + - docs(mounts): Correct fs-freq reference to fs_freq (#6262) + [ibrahim-mojalled] (GH: 6210) + - test: pytestify ds_identify tests (#6274) + - test: pytestify t/u/test_log.py (#6275) + - feat(hetzner): integrate private networks metadata (#6224) + [Thomas Boerger] + - test: pytestify cloudinit.s.helpers.netlink tests (#6273) + - Release 25.1.4 + - Release 25.1.3 + - fix: strict disable in ds-identify on no datasources found (LP: #2069607) + - test: add integration test to install cloud-init from clean state (#6260) + - docs: provide example3 for PAM and ssh_pwauth behavior (#27) + - fix: Make hotplug socket writable only by root (#25) + - fix: Don't attempt to identify non-x86 OpenStack instances (LP: #2069607) + - doc: update discourse release schedule link (#6263) + - doc: update discourse link + - chore: log URL when retrying 503s (#6264) + - test: add option to keep instance on error (#6241) + - eni.py: ensure that a "dns" entry is not rendered in interfaces file + (#6253) [dermotbradley] + - feat(azure): improve handling for reading VM ID (#6199) [Chris Patterson] + - fix: remove unnecessary 'Wants' from cloud-init-main.service (#6255) + - test: use latest version of LXD in integration tests (#6249) + - docs: include missing --seed flags in clean CLI (#6244) [Faizan Alam] + - ec2: Improve metadata retrieval by iterating all interfaces (#6233) + [yukariatlas] (GH: 6232) + - feat: Add Raspberry Pi OS support (#5827) [Paul] + - feat(azure): add interface to dhcp_log_func (#6238) [Chris Patterson] + - fix: fix untyped-defs on tests/unittests and cloudinit/sources (#6230) + [Ritvikj23] + - test: pre-fetch instance id when logging from reaper (#6234) + - feat: Add subnet metric support for netplan (#6222) [Artsiom] + - test: remove FilesystemMockingTestCase from test_cc_apk_configure.py + (#6226) + - fix: make 'cloud-init --all-stages' work interactively (#6211) + - test: remove FilesystemMockingTestCase from test_util.py (#6220) + - test: remove FilesystemMockingTestCase from test_dmi.py (#6219) + - docs: merge "Availability" and "Supported distros" pages (#6217) + [Jacob C. Chin] + - fix: ansible-pull multiple playbooks on older ansible ver < 2.12 (#6218) + - docs: remove monospace formatting from SSH section heading (#6215) + [Chad Dougherty] + - fix: no traceback on command line missing subcommand (#6214) + [Robert Schweikert] + - feat: Change ansible pull module type from dict to list (#6010) + [Amirhossein Shaerpour] + - test(apt): add questing versiong for hello pkg (#6213) + - docs: Use Noble for examples instead of Jammy (#6209) [Aarni Koskela] + - feat(ca_certs): add rocky to rhel distro overrides (#6208) + [Lukas Friedhoff] + - docs: ensure proper 'sudo' representation (#6196) (GH: 6195) + - fix(net): ignore udevadm failures when enumerating nics (#6185) + [Chris Patterson] + - Release 25.1.2 (#6197) + - revert "chore: Deprecate partially supported system config (#5515)" + (LP: #2100232) + - fix: copr builds of CentOS9 require CRB and baseurl in centos.repo + (#6192) + - chore: add fedora package build support for run-container and read-deps + (#6174) + - test: drop fixed xfail tests + - fix: simplify MAAS check logic + - feat(azure): allow unspecified user name (#6177) [Chris Patterson] + - fix: stop reporting error if cloud-init receives signal (#6159) + (GH: 6151) + - Fix: Add Ephemeral Network for CloudStackLocal DS (#6144) + [Bryan Fraschetti] (GH: 6143) + - docs: clarify examples for network addresses/gateway (#6186) + [Dan Bungert] + - fix: setup.py doesn't match AmazonLinux CPE 2.2 releases (#6173) + - fix: ensure MAAS datasource retries on failure (#6167) (LP: #2106671) + - cloud.cfg.tmpl: do not enable cc_reset_rmc for Alpine Linux (#6170) + [dermotbradley] + - tests: ibm avoid schema validation for DataSourceNone on ibm (#6168) + - tests: ibm fix apt and ds-id testing (#6168) + - test: fix integration test on new lxd versions (#6164) + - tests: ibm correct logged message. Invalid schema: vendor-data (#6163) + - tests: ibm expect invalid vendor-data in stderr (#6160) + - tests: ibm expect invalid vendor-data in stderr (#6158) + - tests: fix ibm expected warnings on invalid vendor-data schema (#6157) + - fix: drop udev remove action in hotplug (#6152) [yukariatlas] + - chore: remove reference to refresh_rmc_and_interface module (#6156) + [Ani Sinha] + - chore: reorder iface filters & log on inherited MAC (#6140) + [Wesley Hershberger] + - fix(azure): update ReportableErrorUnhandledException (#6133) + [Ksenija Stanojevic] + - chore: make auditd wait for cloud-init-local.service (#6138) + [Robert Schweikert] + - chore: allow custom pkg-config binary path (#6118) + [Alexandre Burgoni] (GH: 6099) + - fix: rename "reload-or-try-restart" to "try-reload-or-restart" (#6142) + [sxt1001] + - chore: make lint interpreter configurable (#6121) [Robert Schweikert] + - fix: ensure system sshd_config is not overwritten (#6105) [Sludge] + - fix(oracle): properly detect ipv6 only for private ULA addresses (#6123) + [Alec Warren] + - feat(oracle): downgrade warning log about falling back to imds (#6134) + [Alec Warren] + - Release 25.1.1 (#6120) + - chore: remove remaining references to .github-cla-signers (#6116) + - fix(cli): wrong usage output when invalid arg in subcommand (#6115) + [Dillon] (GH: 4609) + - fix(Azure): don't reraise FileNotFoundError during ephemeral setup + (#6113) + - fix(azure): handle unexpected exceptions during obtain_lease() (#6092) + [Ksenija Stanojevic] + - feat: add callback for datasources to clean config changes (#6100) + [Ani Sinha] + - chore: Fix untyped-defs on tests/unittests/config (#6104) [Vlad Apostol] + - chore: switch to has-signed-canonical-cla GH action (#6109) + - Allow to set mac_address for VLAN subinterface (#6081) + [jumpojoy] (GH: 5364) + - change retry sleep for wireserver (#6107) [Ksenija Stanojevic] + - test: pytestify cc_chef tests, add migration test + - chef + - chef: migrate files in old config directories for backups and cache + - fix: correct the path for Chef's backups (#5994) + - test: replace version check with has_netplanlib() (#6106) + - feat(vmware): Support network events (#6063) [Andrew Kutz] + - test: correctly mock fallback nic in openstack tests (#6101) + - fix: Remove erroneous EC2 reference from 503 warning (#6077) + - test: update keys_to_console timeout (#6087) + - test: move to has_netplanlib() in test_networking.py (#6089) + - fix: NM reload and bring up individual network conns (#6073) [Ani Sinha] + - ci(oracle): fix issue installing cloud-init on custom image creation + (#6084) [Alec Warren] + - test: decouple netplan integrations from libnetplan SRU (#6085) + - test: warning on users/groups test is version specific (#6078) + - test: fix errors in custom datasource networking (#6076) + - test: ensure software-properties-common properly removed (#6080) + - test: remove script death check from test_signal_handler.py (#6079) + - test: ensure NoCloud networking works on plucky (#6072) + - fix: stop warning on dual-stack request failure (#6044) + - test: Add integration test for signal handling warnings/errors (#6037) + - feat(azure): format ReportableErrorImdsInvalidMetadata without repr + (#6052) [Ksenija Stanojevic] + - docs: v1.cloud_name section typo (#6070) [Jack Bernhardt] + - fix: install_method: pip cannot find ansible-pull command path (#6021) + [Hasan Aliyev] (GH: 5720) + - fix: Fix DataSourceAliYun exception_cb signature (#6068) (GH: 6066) + - fix: Update OauthUrlHelper to use readurl exception_cb signature + (GH: 6065) + - test: add OauthUrlHelper tests + - test: Remove CiTestCase from test_url_helper.py + - test: pytestify test_url_helper.py + - test: check for correct logrotate config (#6060) + - test: don't fail test if ppa has no uploads (#6059) + - test: make users/groups warning test release aware (#6056) + - fix: when get_session_cloud() fails, _SESSION_CLOUD isn't set (#6051) + - chore: Sort .gitignore + - chore: Add new entries to gitignore and glob more + - fix: track more removed modules (#6043) + +25.1.4 +- fix: disable cloud-init when non-x86 environments have no DMI-data and + no strict datasources detected (LP: #2069607) (CVE-2024-6174) + +25.1.3 + - docs: provide example3 for PAM and ssh_pwauth behavior (#27) + - fix: Make hotplug socket writable only by root (#25) (CVE-2024-11584) + - fix: Don't attempt to identify non-x86 OpenStack instances (LP: #2069607) + (CVE-2024-6174) + +25.1.2 + - fix: ensure MAAS datasource retries on failure (#6167) + +25.1.1 + - test: pytestify cc_chef tests, add migration test + - chef: migrate files in old config directories for backups and cache + - fix: correct the path for Chef's backups (#5994) + - fix(Azure): don't reraise FileNotFoundError during ephemeral setup (#6113) + - fix(azure): handle unexpected exceptions during obtain_lease() (#6092) + [Ksenija Stanojevic] + - Allow to set mac_address for VLAN subinterface (#6081) + [jumpojoy] (GH: 5364) + - fix: Remove erroneous EC2 reference from 503 warning (#6077) + - fix: NM reload and bring up individual network conns (#6073) [Ani Sinha] + - fix: stop warning on dual-stack request failure (#6044) + - fix: install_method: pip cannot find ansible-pull command path (#6021) + [Hasan Aliyev] (GH: 5720) + - fix: Fix DataSourceAliYun exception_cb signature (#6068) (GH: 6066) + - fix: Update OauthUrlHelper to use readurl exception_cb signature + (GH: 6065) + - test: add OauthUrlHelper tests + - test: Remove CiTestCase from test_url_helper.py + - test: pytestify test_url_helper.py + - fix: track more removed modules (#6043) + +25.1 + - ci: fix post-merge packaging CI (#6038) + - feat(azure): Fix imds-based ssh_pwauth (#6002) [Ksenija Stanojevic] + - ci: check for sorted patches (#6036) + - feat: aliyun datasource support crawl metadata at once (#5942) + [jinkangkang] + - docs: document /usr merge breaking change (#6032) + - test: Add integration test for /var mounts (#6033) + - test: Ensure pre-24.2 custom modules work (#6034) + - doc: Update references to older keys (#6022) [Pedro Ribeiro] + - fix: untyped-defs in tests/unittests/{config, net, sources} (#6023) + [Romain] + - fix: don't reference PR in post-merged CI (#6019) + - chore: explicitly skip broken ansible integration tests (#5996) [a-dubs] + - tests(oracle): fix test_install_missing_deps apt race condition (#5996) + [a-dubs] + - test(oracle): fix test_ubuntu_drivers_installed (#5996) [a-dubs] + - test(oracle): fix test_frequency_override integration test (#5996) + [a-dubs] + - chore: add type hint to IntegrationCloud's cloud_instance field (#5996) + [a-dubs] + - test(oracle): fix modules/test_lxd.py::test_storage_lvm on noble (#5996) + [a-dubs] + - commit 9e591fff266be9d4c83f74ec02a717b74993304d [a-dubs] + - net/sysconfig: do not remove all existing settings of + /etc/sysconfig/network (#5991) [Ani Sinha] (GH: 5990) + - fix: remove wrong return when checking if network necessary (#6013) + - fix: typing for rsyslog, ubuntu_pro, power_state_change (#5985) + [MostafaTarek124eru] + - fix: Retry on OpenStack HTTP status codes (#5943) [weiyang] (GH: 5687) + - fix: Ensure fqdn is treated as string in get_hostname_fqdn (#5993) + [MKhatibzadeh] (GH: 5989) + - feat(vmware): Convert imc network config to v2 (#5937) [PengpengSun] + - ci: add upstream post-merge test + - ci: check if upstream commit causes ubuntu patch conflicts + - ci: organize cla tests together + - test: eliminate obsolete cases, add non-error case + - chore: remove redundant manual schema validation + - doc: clarify subiquity docs + - chore: cleanup `len' usage (#5956) [Shreenidhi Shedi] + - Fix: GCE _get_data crashes if DHCP lease fails (#5998) [Bryan Fraschetti] + - Fixes GH-5997 + - fix: correct the path for Chef's cache (#5994) + [MostafaTarek124eru] (GH: 5090) + - fix: Run ansible with run_user instead of root for distro install_method + (#5986) [Amirhossein Shaerpour] (GH: 4092) + - fix: retry AWS hotplug for async IMDS (#5995) (GH: 5373) + - feat(integration_tests): add optional INSTANCE_TYPE setting (#5988) + [Alec Warren] + - feat(integration-tests): set boto3 and botocore to INFO to prevent + log spamming [a-dubs] + - ci: add 'tox -e integration-tests-fast' command [a-dubs] + - chore: Add feature flag for manual network waiting (#5977) + - Release 24.4.1 + - fix: Use /usr/lib/ rather than /lib in packaging code (#5970) + - Use log_with_downgradable_level for user password warnings (#5927) + [Ani Sinha] + - doc: change to hyphenated keys (#5909) (GH: 5555) + - fix: Wait for udev on openstack (#5947) [Robert Schweikert] (GH: 4125) + - test: disambiguate resource cleanup from test failure (#5926) + - fix: use program name of netcat as installed by upstream, "nc" (#5933) + (#5933) [Andreas K. Hüttel] + - ci: bump canonical/setup-lxd to version v0.1.2 (#5948) + - feat(cc_chef): Allow change of Chef configuration file (#5925) + [Sean Smith] + - docs: fix typo in generated file in LXD tutorial (#5941) [Pavel Shpak] + - feat: Identify Samsung Cloud Platform as OpenStack (#5924) [us0310306] + - fix: don't deadlock when starting network service with systemctl (#5935) + - feat: Custom keys for apt archives (#5828) [Bryan Fraschetti] (GH: 5473) + - test: improve test initialization error path (#5920) + - chore: improve logging when lxd detection fails (#5919) + - fix: Add "manual" to allowed subnet types (#5875) + [Math Marchand] (GH: 5769) + - fix: remove bad ssh_svcname setting for Gentoo/OpenRC (#5918) + [Andreas K. Hüttel] + - feat(gentoo): Add compatibility for Gentoo with systemd (#5918) + [Andreas K. Hüttel] + - fix(ovf): no warning should be log when rpctool found no value (#5915) + [PengpengSun] (GH: 5914) + - Move DS VMware to be in front of DS OVF (#5912) [PengpengSun] (GH: 4030) + - ci: Add proper 'Breaks: ' to integration testing simple deb (#5923) + - chore: Add akhuettel to CLA signers file (#5917) [Andreas K. Hüttel] + - chore: eliminate calls at import time (#5889) (GH: 5344) + - test: Add pyserial to test-requirements.txt (#5907) + - test: Allow unknown size in growpart test (#5876) + - doc: Update tutorials [Sally] + - fix: bump azure key size to 3072 (#5841) + +24.4.1 + - fix: Ensure _should_wait_via_user_data() handles all user data types (#5976) + - fix: Don't log error in wait_for_url (#5972) + - feat(url_helper): Retry on 503 error (#5938) + - fix: Don't break modules that use get_meta_doc() (#5953) + - refactor: Pass deprecation log args as tuple (#5953) + - fix: uninstall custom signal handlers before shutdown (#5913) + +24.4 + - test: Ensure unit ordering in ftp tests includes downstream units (#5892) + - test: re-decrement expected webhook events (#5894) + - test: allow relative path in apt-get test (#5891) + - Fix metric setting of nmconnection for rhel (#5878) [Amy Chen] + - chore: remove unused code(#5887) + - feat(ephemeral): replace old has_url_connectivity() with new + _check_connectivity_to_imds() [a-dubs] + - feat(oracle): add true single stack ipv6 support [a-dubs] + - feat(ephemeral): refactor ephemeralIP and add ipv6 connectivity check + [a-dubs] + - test: Decrement expected webhook events (#5888) + - chore: remove `--docs` option from `cloud-init schema` (#5857) (GH: 5756) + - test: pytestify "tests/unittests/config/test_cc_timezone.py" (#5885) + [Mahesh Ghumare] + - ci: bump integration tests to use plucky + - test: add grub_dpkg to inactive modules + - test: move default behavior tests into their own module + - test(apt): add plucky version for hello pkg (#5883) + - Docs: improved mermaid diagram for better visibility. Add "MaheshG11" + as contributor (#5874) [Mahesh Ghumare] (GH: 5837) + - fix(ntp): Fix RockyLinux OS support (#5864) [Sid Shukla] + - chore(jsonschema): migrate from deprecated Validator.iter_errors (#5856) + - chore: remove deprecation warning getting jsonschema's version (#5856) + - chore: use filter arg for tar.extractall (#5856) + - chore: remove __init__ from pytest test class (#5856) + - chore: do not test element's truth value directly (#5856) + - chore: migrate from deprecated datetime.datetime.utcfromtimestamp (#5856) + - chore: migrate from deprecated datetime.datetime.utcnow() (#5856) + - chore: set recursive=False for ensure_dir if parent path is "/" (#5816) + [sxt1001] + - ci: fix broken daily dependencies (#5867) + - ci: fix packaging tests (#5865) + - feat(vultr): add override for network interface detection (#5847) + [Andrew Davis] + - feat(networkd): Support RequiredForOnline option (#5852) [Dan McGregor] + - Prevent NM from handling DNS when network interfaces have DNS config + (#5846) [Ani Sinha] + - fix(smartos): Add `addrconf` IPv6 support (#5831) + [blackhelicoptersdotnet] + - freebsd: adjust to match the new pyyaml package name (#5844) + [Gonéri Le Bouder] + - fix: disable grub-dpkg by default (#5840) + - fix(openbsd): Enable sysv init scripts in OpenBSD build script (#5790) + [Hyacinthe Cartiaux] (LP: 4036, #1992853) + - test: Fix duplicate judgment conditions in password generation (#5835) + [sxt1001] + - chore: don't render non-templated unit files (#5830) + - chore: simplify and standardize cloud-final.service (#5830) + - chore: simplify Conflicts=shutdown.target (#5830) + - chore: remove redundant Before=NetworkManager.service (#5830) + - chore: remove unnecessary systemd settings (#5830) + - chore: eliminate redundant ordering dependencies (#5819) + - fix: fix ordering cycle for distros with default deps (#5819) (GH: 5755) + - test: unbreak pytest-xdist (#5829) + - feat: Conditionally remove networkd online dependency on Ubuntu (#5772) + - feat: Ensure random passwords contain multiple character types (#5815) + [sxt1001] (GH: 5814) + - docs: split example page into example library (#5645) [Sally] + - doc: clarify workarounds required for single process changes (#5817) + - chore: add 3.13 to PR CI runs, 3.14 to scheduled (#5825) + - fix: Render v2 bridges correctly on network-manager with set-name + (#5740) (GH: 5717) + - test: add no_thinpool unit test (#5802) + - chore: split lxd init config into separate function (#5802) + - test: pytestify test_cc_lxd.py (#5802) + - fix: Correctly handle missing thinpool in cc_lxd (#5802) + - fix: Render bridges correctly for v2 on sysconfig with set-name (#5674) + (GH: 5574) + - tests(minimal): rsyslog not in minimal images expect warning (#5811) + - tests(lxd): avoid failure on multiple calls to --show-log (#5811) + - chore: update netplan import semantics and related tests (#5805) + (GH: 5804) + - lint: fix untyped-defs on /tests/unittest/cmd (#5800) [iru] + - test: actually use devel release and verify_clean_boot enhancements + (#5801) + - feat(locale): locales install on minimal images when cfg requests (#5799) + - feat(byobu): support byobu install on minimal images when cfg requests + (#5799) + - chore: Use devel release and no sbuild in integration CI (#5798) + - test: Update integration tests from netplan backport (#5796) + - test: add get_syslog_or_console for minimal images without syslog (#5793) + - chore: Remove resize_root_tmp from cloud.cfg.tmpl (#5795) (GH: 5786) + - docs: Fix field name from `contents` to `content` (#5787) [Igor Akkerman] + - chore: bump pycloudlib to required version (#5792) + - fix: avoid deprecation logs for calling cli stages (#5770) (GH: 5726) + - tests: bump pycloudlib deps to include gce bug fix for id str (#5783) + - fix(test): convert use p.gce.instance.id instead of instance_id (#5783) + - fix(network-manager): bond properties and network schema (#5768) + [Denis Kadyshev] + - Fix metric setting for ifcfg network connections for rhel (#5777) + [Ani Sinha] (GH: 5776) + - fix(akamai): handle non-string user data in base64 decoding (#5751) + [Jesse Alter] + - fix(ci): do not auto stale issues (#5775) + - Make pytest more verbose for easier debugging (#5778) [Ani Sinha] + - ci: fix tox.ini pytest cmd to use cloudinit dir for coverage reporting + (#5774) [Alec Warren] + - tests: add OS_IMAGE_TYPE setting to allow for minimal tests (#5682) + - test(hotplug): Simplify test_multi_nic_hotplug (#5763) + - test(hotplug): increase nc timeout (#5763) + - test: pytestify test_main.py (#5758) + - test(ec2-dual-stack): fix int-test (#5762) + - test: make verify_clean_boot really respect return code (#5761) + - test: bump timeout in test_order (#5759) + - docs: Properly document the cc_ubuntu_autoinstall module (#5757) + - docs: fix WSL tutorial (#5752) (GH: 5746) + - test: make verify_clean_boot respect return code by environment (#5754) + - feat(integration_test): add CLOUD_INIT_PKG setting (#5739) + - fix(ci): fix packaging check merge operation (#5750) + - doc: do not document user.meta-data key (#5745) + - test: avoid undocumented lxd key (#5748) + - test: Refactor test_cc_set_hostname.py and test_cc_ntp.py (#5727) + - chore: update docs URLs to cloud-init.io (#5741) + - test: fix timer logging change expected logs (#5734) + - fix: type annotations for several modules (#5733) + - chore: add timer to io and string manipulation code + - feat: add log package and performance module + - remove newline injected for cloud-init status --wait (#5700) + [Andrew Nelson] (GH: 5863) + - test: webhook require_deprecation msg on 24.3 (#5731) + - test: fix test_nocloud message typo introduced by 313390f8 (#5731) + - test: Fix test_log_message_on_missing_version_file (#5730) + - tests: assert info level warnings instead of require_deprecation + - tests: fix test to ignore_warnings not require Used fallback ds + - chore: clean up pytest warnings (#5721) + - tests(pro): bump pycloudlib add noble release to pro tests (#5719) + - fix(hotplugd.socket): remove basic.target as dependency (#5722) + (LP: #2081124) + - ci: fix integration test positional argument (#5718) + - Create datasource for CloudCIX (#1351) [BrianKelleher] + - ci: colorize output (#5716) + - fix(schema): Allow for locale: false in schema add tests (#5647) + - ci: fix packaging patch check (#5713) + - chore: clean up old pickle workaround (#5714) + - fix: force sftp cleanup when done with instance (#5698) + - test(hotplug): reenable vpc test in focal (#5492) + - chore: fix typing of userdata_raw (#5710) + - fix(NetworkManager): Fix network activator (#5620) + - fix: lxd do not check for thinpool kernel module (#5709) + - docs: fix typo in docstring (#5708) + - Scaleway: Force on-link: true for static networks (#5654) + [Louis Bouchard] (LP: 5523, #2073869) + - fix: Invalid "seedfrom" in NoCloud system configuration (#5701) + - tests: pytestify test_nocloud.py (#5701) + - test: make verify_clean_boot respect return code by series (#5695) + - fix: use cross-distro netcat name (#5696) + - ci: fix labeler (#5697) + - chore(actions): add packaging label for any branches modifying debian/* + (#5693) + - test: add verify_clean_boot() calls alongside verify_clean_log() (#5671) + - test: add deprecation support to verify_clean_boot (#5671) + - doc: remove misleading warning (#5681) + - chore: Prefer other methods over $INSTANCE_ID (#5661) + - ci: fix packaging test when no patches (#5680) + - chore: fix tip-ruff and update to latest version (#5676) + - chore: make ansible test serial (#5677) + - feat(ec2): Bump url_max_timeout to 240s from 120s. (#5565) + [Robert Nickel] + - chore: fix typo in requirements.txt (#5637) + - feat: make pyserial an optional dependency (#5637) + - chore: bump ci dependency versions (#5660) + - chore: drop broken optimization (#5666) + +24.3.1 + - test: add test coverage for iproute2 commands (#5651) + - fix(netops): fix ip addr flush command (#5651) (GH: 5648) + +24.3 + - docs: Clarify v2 set-name behavior (#5639) + - fix: properly handle blank lines in fstab (#5643) + - fix: cc_user_groups incorrectly assumes "useradd" never locks password + field (#5355) [dermotbradley] + - tests: assert cloud-init user-data cert is the only root cert (#5641) + - feat: add automation for ubuntu/* branches asserting quilt patches apply + (#5622) + - fix(sources/wsl): no error with empty .cloud-init dir (SC-1862) (#5633) + - feat(azure): add PPS support for azure-proxy-agent (#5601) + [Ksenija Stanojevic] + - fix(tests): use instance.clean/restart instead of clean --reboot (#5636) + - test: fix cmd/test_schema int test (#5629) + - test: fix test_honor_cloud_dir int test (#5627) + - docs: alphabetize dsname lookup table. update comment to create the csv + (#5624) + - docs: new datasources should update reference/ds_dsname_map (#5624) + - test: fix ca_certs int test (#5626) + - chore: update schema docs to use RST bold for config key names (#5562) + - fix(doc): italics around deprecation prefix, description bolds key names + (#5562) + - feat(doc): add env vars to debug config module doc builds (#5562) + - fix(doc): doc of nested objects under JSON schema items.oneOf (#5562) + - fix(doc): object type check if patternProperties or properties (#5562) + - doc(schema): schema descriptions should end with trailing stop (#5562) + - fix(wsl): Properly assemble multipart data (#5538) [Carlos Nihelton] + - feat: collect-logs improvements (#5619) + - tests: fix test_ca_certs.py for gcp (#5621) + - fix(nm): Ensure bond property name formatting matches schema definition + (#5383) [Curt Moore] + - Update behavior of base bond interface with NetworkManager (#5385) + [Curt Moore] + - ci: Drop Python 3.6 and 3.7 (#5607) + - chore(black): Bump version (#5607) + - chore(mypy): Fix failures on newer versions of mypy (#5607) + - chore(tox.ini): Simplify configuration, fix minor bugs (#5607) + - chore(mypy): Lint log module (#5607) + - fix(systemd): Correct location of installed drop-in files(#5615) + [Noah Meyerhans] + - fix(btrfs): Version parsing (#5618) + - docs: Remove unnecessary section, add feature flag page (#5617) + - docs: Drop Python 3.6 and 3.7 support (#5617) + - chore: explain other use of oauth (#5616) + - chore(actions): add doc label for any doc related subdir file matches + (#5602) + - doc: Add misc links, improve wording (#5595) + - doc(boot): Make first boot a dedicated page (#5595) + - doc: Describe all stages in a single process (#5595) + - chore: Deprecate old commands in help output (#5595) + - chore: add comment explaining the NetworkManager may-fail setting + (#5598) [Ani Sinha] + - Revert "fix(vmware): Set IPv6 to dhcp when there is no IPv6 addr + (#5471)" (#5596) [PengpengSun] + - fix: read_optional_seed to set network-config when present (#5593) + - feat(snap): avoid refresh on package_upgrade: true and refresh.hold + (#5426) + - fix: Fix tests which have outdated strings (#5585) + - fix: Fix ftp failures (#5585) + - doc: improve integration testing configuration instructions (#5556) + [Alec Warren] + - azure: check azure-proxy-agent status (#5138) [Ksenija Stanojevic] + - refactor: refactor and fix mypy in DataSourceIBMCloud.py (#5509) + [Alec Warren] + - fix: Update default LXD meta-data with user meta-data (#5584) + - chore: Fix log message in url_helper.py (#5583) + - fix: nocloud no fail when network-config absent (#5580) + - feat: Single process optimization (#5489) + - chore: Add helper, refactor utilities into separate module (#5573) + - refactor: update handle function of cc_mounts (#5498) + - fix: Integration tests (#5576) + - fix(NoCloudNet): Add network-config support (#5566) + - feat: Eliminate redundant configuration reads (#5536) + - fix(actions): correct typo in cloudinit/config/schemas/ match (#5570) + - fix: add host template for AOSC (#5557) [Yuanhang Sun] + - chore(debian): Remove vestigial postinst and preinst code (#5569) + - fix(actions): doc labeler needs all clause instead of default any (#5568) + - docs: Overhaul user data formats documentation (#5551) + - chore: Deprecate ENI as an input configuration format (#5561) + - doc: improve drop-in custom modules (#5548) + - doc(NoCloud): Categorize the different configuration types (#5521) + - doc(autoinstall): Remove incorrect statements, be more direct (#5545) + - chore: remove unneeded doc-lint tox env config (#5547) + - fix(doc-spelling): config spelling_word_list_filename (#5547) + - doc(modules): add section to wrap modules' doc (#5550) + - doc: Update docs on boothooks (#5546) + - fix: doc auto label to consider schema json changes as doc PRs (#5543) + - feat(schema): add chef_license schema enum (#5543) + - doc: add diagram with boot stages (#5539) + - docs: improve qemu command line (#5540) [Christian Ehrhardt] + - fix: auto label doc PRs (#5542) + - fix(wsl): Put back the "path" argument to wsl_path in ds-identify + (#5537) [Carlos Nihelton] + - test: fix test_kernel_command_line_match (#5529) + - test: fix no ds cache tests (#5529) + - fix(azurelinux): Change default usr_lib_exec path (#5526) [Minghe Ren] + - feat: Support URI sources in `write_files` module (#5505) + [Lucas Ritzdorf] + - add openeuler to distros in cc_spacewalk.py (#5530) [sxt1001] + - feat(wsl): Special handling Landscape client config tags (#5460) + [Carlos Nihelton] + - chore: Deprecate partially supported system config (#5515) + - chore: Improve detection logging for user clarity (#5515) + - fix(ds-identify): Detect nocloud when seedfrom url exists (#5515) + - refactor: logs.py add typing and small misc refactors (#5414) + - refactor: logs.py pathlib changes (#5414) + - refactor: replace verbosity with log levels in logs.py (#5414) + - feat: Add trace-level logger (#5414) + - chore(formatting): fix squashed commit test formatting (#5524) + - fix: Clean cache if no datasource fallback (#5499) + - Support setting mirrorlist in yum repository config (#5522) [Ani Sinha] + - doc(OFV): Document how to configure cloud-init (#5519) + - fix: Update DNS behavior for NetworkManager interfaces (#5496) + [Curt Moore] + - Fix configuration of DNS servers via OpenStack (#5384) [Curt Moore] + - test: Unconditionally skip test_multi_nic_hotplug_vpc (#5503) + - tests: revert expectation of exit 2 from cloud-init init --local (#5504) + - fix(test): Fix ip printer for non-lxd (#5488) + - feat(systemd): convert warning level message to deprecation (#5209) + - test: allow verify_clean_boot to ignore all or specific tracebacks + (#5209) + - test: Don't fail tests which call cloud-init as a command (#5209) + - feat(systemd): Warn user of unexpected run mode (#5209) + - fix: add schema rules for 'baseurl' and 'metalink' in yum repo config + (#5501) [Ani Sinha] + - Set MTU for bond parent interface (#5495) [Curt Moore] + - refactor: util.mounts to handle errors (#5490) + - refactor: util.get_proc_env to work with strs (#5490) + - typing: fix check_untyped_defs in cloudinit.util (#5490) + - test: Add missing assert to test_status.py (#5494) + - test: Ensure mkcert executable in ftp tests (#5493) + - test: pytestify and cleanup test_cc_mounts.py (#5459) + - fix(vmware): Set IPv6 to dhcp when there is no IPv6 addr (#5471) + [PengpengSun] + - fix(openbsd): fix mtu on newline in hostname files (#5412) [Tobias Urdin] + - feat(aosc): Add 'AOSC OS' support (#5310) [Yuanhang Sun] + +24.2 + - test: Fix no default user in test_status.py (#5478) + - fix: correct deprecated_version=22.2 for users.sudo + - test: Add jsonschema guard in test_cc_ubuntu_pro.py (#5479) + - fix(test): Fix pycloudlib types in integration tests (#5350) + - fix(test): Fix ip printing for non-lxd instances (#5350) + - chore(mypy): Drop unused missing import exclusions (#5350) + - type: Add stub types for network v1/v2 config (#5350) + - chore: Auto-format network jsonschema in ci (#5350) + - fix(tox): Update tox.ini (#5350) + - chore(typing): Remove type ignores and casts (#5350) + - refactor(typing): Remove unused code paths (#5350) + - fix(typing): Add / update type annotations (#5350) + - fix(typing): Remove type annotation for unused variable (#5350) + - fix(typing): Remove invalid type annotations (#5350) + - ci(mypy): Set default follow_imports value (#5350) + - test: Update integration tests to pass on focal (#5476) + - tests: update ubuntu_pro test to account for info-level deprecations + (#5475) + - tests: update nocloud deprecation test for boundary version (#5474) + - fix(rh_subscription): add string type to org (#5453) + - tests: integration tests aware of features.DEPRECATION_INFO_BOUNDARY + - tests: update keyserver PPA key fur curtin-dev (#5472) + - test: Fix deprecation test failures (#5466) + - chore: fix schema.py formatting (#5465) + - fix: dont double-log deprecated INFOs (#5465) + - fix(test): Mock version boundary (#5464) + - fix(schema): Don't report changed keys as deprecated (#5464) + - test: fix unit test openstack vlan mac_address (#5367) + - fix: Ensure properties for bonded interfaces are properly translated + (#5367) [Curt Moore] + - fix(schema): permit deprecated hyphenated keys under users key (#5456) + - fix: Do not add the vlan_mac_address field into the VLAN object (#5365) + [Curt Moore] + - doc(refactor): Convert module docs to new system (#5427) [Sally] + - test: Add unit tests for features.DEPRECATION_INFO_BOUNDARY (#5411) + - feat: Add deprecation boundary support to schema validator (#5411) + - feat: Add deprecation boundary to logger (#5411) + - fix: Gracefully handle missing files (#5397) [Curt Moore] + - test(openstack): Test bond mac address (#5369) + - fix(openstack): Fix bond mac_address (#5369) [Curt Moore] + - test: Add ds-identify integration test coverage (#5394) + - chore(cmdline): Update comments (#5458) + - fix: Add get_connection_with_tls_context() for requests 2.32.2+ (#5435) + [eaglegai] + - fix(net): klibc ipconfig PROTO compatibility (#5437) + [Alexsander de Souza] (LP: #2065787) + - Support metalink in yum repository config (#5444) [Ani Sinha] + - tests: hard-code curtin-dev ppa instead of canonical-kernel-team (#5450) + - ci: PR update checklist GH- anchors to align w/ later template (#5449) + - test: update validate error message in test_networking (#5436) + - ci: Add PR checklist (#5446) + - chore: fix W0105 in t/u/s/h/test_netlink.py (#5409) + - chore(pyproject.toml): migrate to booleans (#5409) + - typing: add check_untyped_defs (#5409) + - fix(openstack): Append interface / scope_id for IPv6 link-local metadata + address (#5419) [Christian Rohmann] + - test: Update validation error in test_cli.py test (#5430) + - test: Update schema validation error in integration test (#5429) + - test: bump pycloudlib to get azure oracular images (#5428) + - fix(azure): fix discrepancy for monotonic() vs time() (#5420) + [Chris Patterson] + - fix(pytest): Fix broken pytest gdb flag (#5415) + - fix: Use monotonic time (#5423) + - docs: Remove mention of resolv.conf (#5424) + - perf(netplan): Improve network v1 -> network v2 performance (#5391) + - perf(set_passwords): Run module in Network stage (#5395) + - fix(test): Remove temporary directory side effect (#5416) + - Improve schema validator warning messages (#5404) [Ani Sinha] + - feat(sysconfig): Add DNS from interface config to resolv.conf (#5401) + [Ani Sinha] + - typing: add no_implicit_optional lint (#5408) + - doc: update examples to reflect alternative ways to provide `sudo` + option (#5418) [Ani Sinha] + - fix(jsonschema): Add missing sudo definition (#5418) + - chore(doc): migrate cc modules i through r to templates (#5313) + - chore(doc): migrate grub_dpkg to tmpl add changed/deprecation (#5313) + - chore(json): migrate cc_apt_configure and json schema indents (#5313) + - chore(doc): migrate ca_certs/chef to template, flatten schema (#5313) + - chore(doc): migrate cc_byobu to templates (#5313) + - chore(doc): migrate cc_bootcmd to templates (#5313) + - fix(apt): Enable calling apt update multiple times (#5230) + - chore(VMware): Modify section of instance-id in the customization config + (#5356) [PengpengSun] + - fix(treewide): Remove dead code (#5332) [Shreenidhi Shedi] + - doc: network-config v2 ethernets are of type object (#5381) [Malte Poll] + - Release 24.1.7 (#5375) + - fix(azure): url_helper: specify User-Agent when using headers_cb with + readurl() (#5298) [Ksenija Stanojevic] + - fix: Stop attempting to resize ZFS in cc_growpart on Linux (#5370) + - doc: update docs adding YAML 1.1 spec and jinja template references + - fix(final_message): do not warn on datasourcenone when single ds + - fix(growpart): correct growpart log message to include value of mode + - feat(hotplug): disable hotplugd.socket (#5058) + - feat(hotlug): trigger hotplug after cloud-init.service (#5058) + - test: add function to push and enable systemd units (#5058) + - test(util): fix wait_until_cloud_init exit code 2 (#5058) + - test(hotplug): fix race getting ipv6 (#5271) + - docs: Adjust CSS to increase font weight across the docs (#5363) [Sally] + - fix(ec2): Correctly identify netplan renderer (#5361) + - tests: fix expect logging from growpart on devent with partition (#5360) + - test: Add v2 test coverage to test_net.py (#5247) + - refactor: Simplify collect_logs() in logs.py (#5268) + - fix: Ensure no subp from logs.py import (#5268) + - tests: fix integration tests for ubuntu pro 32.3 release (#5351) + - tests: add oracular's hello package for pkg upgrade test (#5354) + - growpart: Fix behaviour for ZFS datasets (#5169) [Mina Galić] + - device_part_info: do not recurse if we did not match anything (#5169) + [Mina Galić] + - feat(alpine): add support for Busybox adduser/addgroup (#5176) + [dermotbradley] + - ci: Move lint tip and py3-dev jobs to daily (#5347) + - fix(netplan): treat netplan warnings on stderr as debug for cloud-init + (#5348) + - feat(disk_setup): Add support for nvme devices (#5263) + - fix(log): Do not warn when doing requested operation (#5263) + - Support sudoers in the "/usr/usr merge" location (#5161) + [Robert Schweikert] + - doc(nocloud): Document network-config file (#5204) + - fix(netplan): Fix predictable interface rename issue (#5339) + - cleanup: Don't execute code on import (#5295) + - fix(net): Make duplicate route add succeed. (#5343) + - fix(freebsd): correct configuration of IPv6 routes (#5291) [Théo Bertin] + - fix(azure): disable use-dns for secondary nics (#5314) + - chore: fix lint failure (#5320) + - Update pylint version to support python 3.12 (#5338) [Ani Sinha] + - fix(tests): use regex to avoid focal whitespace in jinja debug test + (#5335) + - chore: Add docstrings and types to Version class (#5262) + - ci(mypy): add type-jinja2 stubs (#5337) + - tests(alpine): github trust lxc mounted source dir cloud-init-ro (#5329) + - test: Add oracular release to integration tests (#5328) + - Release 24.1.6 (#5326) + - test: Fix failing test_ec2.py test (#5324) + - fix: Check renderer for netplan-specific code (#5321) + - docs: Removal of top-level --file breaking change (#5308) + - fix: typo correction of delaycompress (#5317) + - docs: Renderers/Activators have downstream overrides (#5322) + - fix(ec2): Ensure metadata exists before configuring PBR (#5287) + - fix(lxd): Properly handle unicode from LXD socket (#5309) + - docs: Prefer "artifact" over "artefact" (#5311) [Arthur Le Maitre] + - chore(doc): migrate cc_byobu to templates + - chore(doc): migrate cc_bootcmd to templates + - chore(doc): migrate apt_pipelining and apk_configure to templates + - tests: in_place mount module-docs into lxd vm/container + - feat(docs): generate rtd module schema from rtd/module-docs + - feat: Set RH ssh key permissions when no 'ssh_keys' group (#5296) + [Ani Sinha] + - test: Avoid circular import in Azure tests (#5280) + - test: Fix test_failing_userdata_modules_exit_codes (#5279) + - chore: Remove CPY check from ruff (#5281) + - chore: Clean up docstrings + - chore(ruff): Bump to version 0.4.3 + - feat(systemd): Improve AlmaLinux OS and CloudLinux OS support (#5265) + [Elkhan Mammadli] + - feat(ca_certs): Add AlmaLinux OS and CloudLinux OS support (#5264) + [Elkhan Mammadli] + - docs: cc_apt_pipelining docstring typo fix (#5273) [Alex Ratner] + - feat(azure): add request identifier to IMDS requests (#5218) + [Ksenija Stanojevic] + - test: Fix TestFTP integration test (#5237) [d1r3ct0r] + - feat(ifconfig): prepare for CIDR output (#5272) [Mina Galić] + - fix: stop manually dropping dhcp6 key in integration test (#5267) + [Alec Warren] + - test: Remove some CiTestCase tests (#5256) + - fix: Warn when signal is handled (#5186) + - fix(snapd): ubuntu do not snap refresh when snap absent (LP: #2064300) + - feat(landscape-client): handle already registered client (#4784) + [Fabian Lichtenegger-Lukas] + - doc: Show how to debug external services blocking cloud-init (#5255) + - fix(pdb): Enable running cloud-init under pdb (#5217) + - chore: Update systemd description (#5250) + - fix(time): Harden cloud-init to system clock changes + - fix: Update analyze timestamp uptime + - fix(schema): no network validation on netplan systems without API + - fix(mount): Don't run cloud-init.service if cloud-init disabled (#5226) + - fix(ntp): Fix AlmaLinux OS and CloudLinux OS support (#5235) + [Elkhan Mammadli] + - tests: force version of cloud-init from PPA regardless of version (#5251) + - ci: Print isort diff (#5242) + - test: Fix integration test dependencies (#5248) + - fix(ec2): Fix broken uuid match with other-endianness (#5236) + - fix(schema): allow networkv2 schema without top-level key (#5239) + [Cat Red] + - fix(cmd): Do not hardcode reboot command (#5208) + - test: Run Alpine tests without network (#5220) + - docs: Add base config reference from explanation (#5241) + - docs: Remove preview from WSL tutorial (#5225) + - chore: Remove broken maas code (#5219) + - feat(WSL): Add support for Ubuntu Pro configs (#5116) [Ash] + - chore: sync ChangeLog and version.py from 24.1.x (#5228) + - bug(package_update): avoid snap refresh in images without snap command + (LP: #2064132) + - ci: Skip package build on tox runs (#5210) + - chore: Fix test skip message + - test(ec2): adopt pycloudlib public ip creation while launching instances + - test(ec2): add ipv6 testing for multi-nic instances + - test(ec2): adopt pycloudlib enable_ipv6 while launching instances + - feat: tool to print diff between netplan and networkv2 schema (#5200) + [Cat Red] + - test: mock internet access in test_upgrade (#5212) + - ci: Add timezone for alpine unit tests (#5216) + - fix: Ensure dump timestamps parsed as UTC (#5214) + - docs: Add WSL tutorial (#5206) + - feature(schema): add networkv2 schema (#4892) [Cat Red] + - Add alpine unittests to ci (#5121) + - test: Fix invalid openstack datasource name (#4905) + - test: Fix MAAS test and mark xfail (#4905) + - chore(ds-identify): Update shellcheck ignores (#4905) + - fix(ds-identify): Prevent various false positives and false negatives + (#4905) + - Use grep for faster parsing of cloud config in ds-identify (#4905) + [Scott Moser] (LP: #2030729) + - tests: validate netplan API YAML instead of strict content (#5195) + - chore(templates): update ubuntu universe wording (#5199) + - Deprecate the users ssh-authorized-keys property (#5162) + [Anders Björklund] + - doc(nocloud): Describe ftp and ftp over tls implementation (#5193) + - feat(net): provide network config to netplan.State for render (#4981) + - docs: Add breaking datasource identification changes (#5171) + - fix(openbsd): Update build-on-openbsd python dependencies (#5172) + [Hyacinthe Cartiaux] + - fix: Add subnet ipv4/ipv6 to network schema (#5191) + - docs: Add deprecated system_info to schema (#5168) + - docs: Add DataSourceNone documentation (#5165) + - test: Skip test if console log is None (#5188) + - fix(dhcp): Enable interactively running cloud-init init --local (#5166) + - test: Update message for netplan apply dbus issue + - test: install software-properties-common if absent during PPA setup + - test: bump pycloudlib to use latest version + - test: Update version of hello package installed on noble + - test: universally ignore netplan apply dbus issue (#5178) + - chore: Remove obsolete nose workaround + - feat: Add support for FTP and FTP over TLS (#4834) + - feat(opennebula): Add support for posix shell + - test: Make analyze tests not depend on GNU date + - test: Eliminate bash dependency from subp tests + - docs: Add breaking changes section to reference docs (#5147) [Cat Red] + - util: add log_level kwarg for logexc() (#5125) [Chris Patterson] + - refactor: Make device info part of distro definition (#5067) + - refactor: Distro-specific growpart code (#5067) + - test(ec2): fix mocking with responses==0.9.0 (focal) (#5163) + - chore(safeyaml): Remove unicode helper for Python2 (#5142) + - Revert "test: fix upgrade dhcp6 on ec2 (#5131)" (#5148) + - refactor(net): Reuse netops code + - refactor(iproute2): Make expressions multi-line for legibility + - feat(freebsd): support freebsd find part by gptid and ufsid (#5122) + [jinkangkang] + - feat: Determining route metric based on NIC name (#5070) [qidong.ld] + - test: Enable profiling in integration tests (#5130) + - dhcp: support configuring static routes for dhclient's unknown-121 + option (#5146) [Chris Patterson] + - feat(azure): parse ProvisionGuestProxyAgent as bool (#5126) + [Ksenija Stanojevic] + - fix(url_helper): fix TCP connection leak on readurl() retries (#5144) + [Chris Patterson] + - test: pytest-ify t/u/sources/test_ec2.py + - Revert "ec2: Do not enable dhcp6 on EC2 (#5104)" (#5145) [Major Hayden] + - fix: Logging sensitive data + - test: Mock ds-identify systemd path (#5119) + - fix(dhcpcd): Make lease parsing more robust (#5129) + - test: fix upgrade dhcp6 on ec2 (#5131) + - net/dhcp: raise InvalidDHCPLeaseFileError on error parsing dhcpcd lease + (#5128) [Chris Patterson] + - fix: Fix runtime file locations for cloud-init (#4820) + - ci: fix linkcheck.yml invalid yaml (#5123) + - net/dhcp: bump dhcpcd timeout to 300s (#5127) [Chris Patterson] + - ec2: Do not enable dhcp6 on EC2 (#5104) [Major Hayden] + - fix: Fall back to cached local ds if no valid ds found (#4997) + [PengpengSun] + - ci: Make linkcheck a scheduled job (#5118) + - net: Warn when interface rename fails + - ephemeral(dhcpcd): Set dhcpcd interface down + - Release 24.1.3 + - chore: Handle all level 1 TiCS security violations (#5103) + - fix: Always use single datasource if specified (#5098) + - fix(tests): Leaked mocks (#5097) + - fix(rhel)!: Fix network boot order in upstream cloud-init + - fix(rhel): Fix network ordering in sysconfig + - feat: Use NetworkManager renderer by default in RHEL family + - fix: Allow caret at the end of apt package (#5099) + - test: Add missing mocks to prevent bleed through (#5082) + [Robert Schweikert] + - fix: Ensure network config in DataSourceOracle can be unpickled (#5073) + - docs: set the home directory using homedir, not home (#5101) + [Olivier Gayot] (LP: #2047796) + - fix(cacerts): Correct configuration customizations for Photon (#5077) + [Christopher McCann] + - fix(test): Mock systemd fs path for non-systemd distros + - fix(tests): Leaked subp.which mock + - fix(networkd): add GatewayOnLink flag when necessary (#4996) [王煎饼] + - Release 24.1.2 + - test: fix `disable_sysfs_net` mock (#5065) + - refactor: don't import subp function directly (#5065) + - test: Remove side effects from tests (#5074) + - refactor: Import log module rather than functions (#5074) + - fix: Fix breaking changes in package install (#5069) + - fix: Undeprecate 'network' in schema route definition (#5072) + - refactor(ec2): simplify convert_ec2_metadata_network_config + - fix(ec2): fix ipv6 policy routing + - fix: document and add 'accept-ra' to network schema (#5060) + - bug(maas): register the correct DatasourceMAASLocal in init-local + (#5068) (LP: #2057763) + - ds-identify: Improve ds-identify testing flexibility (#5047) + - fix(ansible): Add verify_commit and inventory to ansible.pull schema + (#5032) [Fionn Fitzmaurice] + - doc: Explain breaking change in status code (#5049) + - gpg: Handle temp directory containing files (#5063) + - distro(freebsd): add_user: respect homedir (#5061) [Mina Galić] + - doc: Install required dependencies (#5054) + - networkd: Always respect accept-ra if set (#4928) [Phil Sphicas] + - chore: ignore all cloud-init_*.tar.gz in .gitignore (#5059) + - test: Don't assume ordering of ThreadPoolExecutor submissions (#5052) + - feat: Add new distro 'azurelinux' for Microsoft Azure Linux. (#4931) + [Dan Streetman] + - fix(gpg): Make gpg resilient to host configuration changes (#5026) + - Sync 24.1.1 changelog and version + - DS VMware: Fix ipv6 addr converter from netinfo to netifaces (#5029) + [PengpengSun] + - packages/debian: remove dependency on isc-dhcp-client (#5041) + [Chris Patterson] + - test: Allow fake_filesystem to work with TemporaryDirectory (#5035) + - tests: Don't wait for GCE instance teardown (#5037) + - fix: Include DataSourceCloudStack attribute in unpickle test (#5039) + - bug(vmware): initialize new DataSourceVMware attributes at unpickle + (#5021) (LP: #2056439) + - fix(apt): Don't warn on apt 822 source format (#5028) + - fix(atomic_helper.py): ensure presence of parent directories (#4938) + [Shreenidhi Shedi] + - fix: Add "broadcast" to network v1 schema (#5034) (LP: #2056460) + - pro: honor but warn on custom ubuntu_advantage in /etc/cloud/cloud.cfg + (#5030) + - net/dhcp: handle timeouts for dhcpcd (#5022) [Chris Patterson] + - fix: Make wait_for_url respect explicit arguments + - test: Fix scaleway retry assumptions + - fix: Make DataSourceOracle more resilient to early network issues + (#5025) (LP: #2056194) + - chore(cmd-modules): fix exit code when --mode init (#5017) + - feat: pylint: enable W0201 - attribute-defined-outside-init + - refactor: Ensure no attributes defined outside __init__ + - chore: disable attribute-defined-outside-init check in tests + - refactor: Use _unpickle rather than hasattr() in sources + - chore: remove unused vendordata "_pure" variables + - chore(cmd-modules): deprecate --mode init (#5005) + - tests: drop CiTestCase and convert to pytest + - bug(tests): mock reads of host's /sys/class/net via get_sys_class_path + - fix: log correct disabled path in ds-identify (#5016) + - tests: ec2 dont spend > 1 second retrying 19 times when 3 times will do + - tests: openstack mock expected ipv6 IMDS + - bug(wait_for_url): when exceptions occur url is unset, use url_exc + (LP: #2055077) + - feat(run-container): Run from arbitrary commitish (#5015) + - tests: Fix wsl test (#5008) + - feat(ds-identify): Don't run unnecessary systemd-detect-virt (#4633) + - chore(ephemeral): add debug log when bringing up ephemeral network + (#5010) [Alec Warren] + - release: sync changelog and version (#5011) + - Cleanup test_net.py (#4840) + - refactor: remove dependency on netifaces (#4634) [Cat Red] + - feat: make lxc binary configurable (#5000) + - docs: update 404 page for new doc site and bug link + - test(aws): local network connectivity on multi-nics (#4982) + - test: Make integration test output more useful (#4984) + +24.1.7 + - fix(ec2): Correctly identify netplan renderer (#5361) + +24.1.6 + - fix(ec2): Ensure metadata exists before configuring PBR (#5287) + - fix: Check renderer for netplan-specific code (#5321) + - test: Fix failing test_ec2.py test (#5324) + +24.1.5 + - fix(package_update): avoid snap refresh in images without snap command + (LP: #2064132) + +24.1.4 + - fix(dhcpcd): Make lease parsing more robust (#5129) + - net/dhcp: raise InvalidDHCPLeaseFileError on error parsing dhcpcd lease + (#5128) [Chris Patterson] + - fix: Fix runtime file locations for cloud-init (#4820) + - net/dhcp: bump dhcpcd timeout to 300s (#5127) [Chris Patterson] + - net: Warn when interface rename fails + - ephemeral(dhcpcd): Set dhcpcd interface down + - test: Remove side effects from tests (#5074) + - refactor: Import log module rather than functions (#5074) + +24.1.3 + - fix: Always use single datasource if specified (#5098) + - fix: Allow caret at the end of apt package (#5099) + +24.1.2 + - test: Don't assume ordering of ThreadPoolExecutor submissions (#5052) + - refactor(ec2): simplify convert_ec2_metadata_network_config + - tests: drop CiTestCase and convert to pytest + - bug(tests): mock reads of host's /sys/class/net via get_sys_class_path + - fix: Fix breaking changes in package install (#5069) + - fix: Undeprecate 'network' in schema route definition (#5072) + - fix(ec2): fix ipv6 policy routing + - fix: document and add 'accept-ra' to network schema (#5060) + - bug(maas): register the correct DatasourceMAASLocal in init-local + (#5068) (LP: #2057763) + +24.1.1 + - fix: Include DataSourceCloudStack attribute in unpickle test (#5039) + - bug(vmware): initialize new DataSourceVMware attributes at unpickle (#5021) + - fix(apt): Don't warn on apt 822 source format (#5028) + - fix: Add "broadcast" to network v1 schema (#5034) + - pro: honor but warn on custom ubuntu_advantage in /etc/cloud/cloud.cfg (#5030) + - net/dhcp: handle timeouts for dhcpcd (#5022) + - fix: Make wait_for_url respect explicit arguments + - bug(wait_for_url): when exceptions occur url is unset, use url_exc + - test: Fix scaleway retry assumptions + - fix: Make DataSourceOracle more resilient to early network issues (#5025) + - tests: Fix wsl test (#5008) + +24.1 + - fix: Don't warn on vendor directory (#4986) + - apt: kill spawned keyboxd after gpg cmd interaction + - tests: upgrade tests should only validate current boot log + - net/dhcp: fix maybe_perform_dhcp_discovery check for interface=None + [Chris Patterson] + - doc(network-v2): fix section nesting levels + - fix(tests): don't check for clean log on minimal image (#4965) [Cat Red] + - fix(cc_resize): Don't warn if zpool command not found (#4969) + (LP: #2055219) + - feat(subp): Make invalid command warning more user-friendly (#4972) + - docs: Remove statement about device path matching (#4966) + - test: Fix xfail to check the dhcp client name (#4971) + - tests: avoid console prompts when removing gpg on Noble + - test: fix test_get_status_systemd_failure + - fix: Remove hardcoded /var/lib/cloud hotplug path (#4940) + - refactor: Refactor status.py (#4864) + - test: Use correct lxd network-config keys (#4950) + - test: limit temp dhcp6 changes to < NOBLE (#4942) + - test: allow downgrades when install debs (#4941) + - tests: on noble, expect default /etc/apt/sources.list + - tests: lxd_vm early boot status test ordered After=systemd-remount-fs + (#4936) + - tests: pro integration tests supply ubuntu_advantage until pro v32 + (#4935) + - feat(hotplug): add cmd to enable hotplug (#4821) + - test: fix test_combined_cloud_config_json (#4925) + - test: xfail udhcpc on azure (#4924) + - feat: Implement the WSL datasource (#4786) [Carlos Nihelton] + - refactor(openrc): Improve the OpenRC files (#4916) [dermotbradley] + - tests: use apt install instead of dpkg -i to install pkg deps + - tests: inactive module rename ubuntu_advantage to ubuntu_pro + - test: fix tmpdir in test_cc_apk_configure (#4914) + - test: fix jsonschema version checking in pro test (#4915) + - feat(dhcp): Make dhcpcd the default dhcp client (#4912) + - feat(Alpine) cc_growpart.py: fix handling of /dev/mapper devices (#4876) + [dermotbradley] + - test: Retry longer in test_status.py integration test (#4910) + - test: fix kernel override test (#4913) + - chore: Rename sysvinit/gentoo directory to sysvinit/openrc (#4906) + [dermotbradley] + - doc: update ubuntu_advantage references to pro + - chore: rename cc_ubuntu_advantage to cc_ubuntu_pro (SC-1555) + - feat(ubuntu pro): deprecate ubuntu_pro key in favor of ubuntu_advantage + - feat(schema): support ubuntu_pro key and deprecate ubuntu_advantage + - test: fix verify_clean_log (#4903) + - test: limit test_no_hotplug_triggered_by_docker to stable releases + - tests: generalize warning Open vSwitch warning from netplan apply (#4894) + - fix(hotplug): remove literal quotes in args + - feat(apt): skip known /etc/apt/sources.list content + - feat(apt): use APT deb822 source format by default + - test(ubuntu-pro): change livepatch to esm-infra + - doc(ec2): fix metadata urls (#4880) + - fix: unpin jsonschema and update tests (#4882) + - distro: add eject FreeBSD code path (#4838) [Mina Galić] + - feat(ec2): add hotplug as a default network update event (#4799) + - feat(ec2): support instances with repeated device-number (#4799) + - feat(cc_install_hotplug): trigger hook on known ec2 drivers (#4799) + - feat(ec2): support multi NIC/IP setups (#4799) + - feat(hotplug): hook-hotplug is now POSIX shell add OpenRC init script + [dermotbradley] + - test: harden test_dhcp.py::test_noble_and_newer_force_client + - test: fix test_combined_cloud_config_json (#4868) + - feat(apport): Disable hook when disabled (#4874) + - chore: Add pyright ignore comments (#4874) + - bug(apport): Fix invalid typing (#4874) + - refactor: Move general apport hook to main branch (#4874) + - feat(bootspeed)!: cloud-config.service drop After=snapd.seeded + - chore: update CI package build to oldest supported Ubuntu release focal + (#4871) + - test: fix test_cli.test_valid_userdata + - feat: handle error when log file is empty (#4859) [Hasan] + - test: fix test_ec2_ipv6 + - fix: Address TIOBE abstract interpretation issues (#4866) + - feat(dhcp): Make udhcpc use same client id (#4830) + - feat(dhcp): Support InfiniBand with dhcpcd (#4830) + - feat(azure): Add ProvisionGuestProxyAgent OVF setting (#4860) + [Ksenija Stanojevic] + - test: Bring back dhcp6 integration test changes (#4855) + - tests: add status --wait blocking test from early boot + - tests: fix retry decorator to return the func value + - docs: add create_hostname_file to all hostname user-data examples + (#4727) [Cat Red] + - fix: Fix typos (#4850) [Viktor Szépe] + - feat(dhcpcd): Read dhcp option 245 for azure wireserver (#4835) + - tests(dhcp): Add udhcpc client to test matrix (#4839) + - fix: Add types to network v1 schema (#4841) + - docs(vmware): fixed indentation on example userdata yaml (#4854) + [Alec Warren] + - tests: Remove invalid keyword from method call + - fix: Handle systemctl when dbus not ready (#4842) (LP: #2046483) + - fix(schema cli): avoid netplan validation on net-config version 1 + - tests: reduce expected reports due to dropped rightscale module + - tests(net-config): add awareness of netplan on stable Ubuntu + [Gilbert Gilb's] + - feat: fall back to cdrom_id eject if eject is not available (#4769) + [Cat Red] + - fix(packages/bddeb): restrict debhelper-compat to 12 in focal (#4831) + - tests: Add kernel commandline test (#4833) + - fix: Ensure NetworkManager renderer works without gateway (#4829) + - test: Correct log parsing in schema test (#4832) + - refactor: Remove cc_rightscale_userdata (#4813) + - refactor: Replace load_file with load_binary_file to simplify typing + (#4823) + - refactor: Add load_text_file function to simplify typing (#4823) + - refactor: Change variable name for consistent typing (#4823) + - feat(dhcp): Add support for dhcpcd (#4746) + - refactor: Remove unused networking code (#4810) + - test: Add more DNS net tests + - BREAKING CHANGE: Stop adding network v2 DNS to global DNS + - doc: update DataSource.default_update_events doc (#4815) + - chore: do not modify instance attribute (#4815) + - test: fix mocking leaks (#4815) + - Revert "ci: Pin pytest<8.0.0. (#4816)" (#4815) + - test: Update tests for passlib (#4818) + - fix(net-schema): no warn when skipping schema check on non-netplan + - feat(SUSE): reboot marker file is written as /run/reboot-needed (#4788) + [Robert Schweikert] + - test: Cleanup unwanted logger setup calls (#4817) + - refactor(cloudinit.util): Modernize error handling, add better warnings + (#4812) + - ci: Pin pytest<8.0.0. (#4816) + - fix(tests): fixing KeyError on integrations tests (#4811) [Cat Red] + - tests: integration for network schema on netplan systems (#4767) + - feat(schema): use netplan API to validate network-config (#4767) + - chore: define CLOUDINIT_NETPLAN_FILE static var (#4767) + - fix: cli schema config-file option report network-config type (#4767) + - refactor(azure): replace BrokenAzureDataSource with reportable errors + (#4807) [Chris Patterson] + - Fix Alpine and Mariner /etc/hosts templates (#4780) [dermotbradley] + - tests: revert #4792 as noble images no longer return 2 (#4809) [Cat Red] + - tests: use client fixture instead of class_client in cleantest (#4806) + - tests: enable ds-idenitfy xfail test LXD-kvm-not-MAAS-1 (#4808) + - fix(tests): failing integration tests due to missing ua token (#4802) + [Cat Red] + - Revert "Use grep for faster parsing of cloud config in ds-identify + (#4327)" + - tests: Demonstrate ds-identify yaml parsing broken + - tests: add exit 2 on noble from cloud-init status (#4792) + - fix: linkcheck for ci to ignore scaleway anchor URL (#4793) + - feat: Update cacerts to support VMware Photon (#4763) + [Christopher McCann] + - fix: netplan rendering integrations tests (#4795) [Cat Red] + - azure: remove cloud-init.log reporting via KVP (#4715) [Chris Patterson] + - feat(Alpine): Modify ds-identify for Alpine support and add OpenRC + init.d script (#4785) [dermotbradley] + - doc: Add DatasourceScaleway documentation (#4773) [Louis Bouchard] + - fix: packaged logrotate file lacks suffix on ubuntu (#4790) + - feat(logrotate): config flexibility more backups (#4790) + - fix(clean): stop warning when running clean command (#4761) [d1r3ct0r] + - feat: network schema v1 strict on nic name length 15 (#4774) + - logrotate config (#4721) [Fabian Lichtenegger-Lukas] + - test: Enable coverage in integration tests (#4682) + - test: Move unit test helpers to global test helpers (#4682) + - test: Remove snapshot option from install_new_cloud_init (#4682) + - docs: fix cloud-init single param docs (#4682) + - Alpine: fix location of dhclient leases file (#4782) [dermotbradley] + - test(jsonschema): Pin jsonschema version (#4781) + - refactor(IscDhclient): discover DHCP leases at distro-provided location + (#4683) [Phsm Qwerty] + - feat: datasource check for WSL (#4730) [Carlos Nihelton] + - test: Update hostname integration tests (#4744) + - test: Add mantic and noble releases to integration tests (#4744) + - refactor: Ensure internal DNS state same for v1 and v2 (#4756) + - feat: Add v2 route mtu rendering to NetworkManager (#4748) + - tests: stable ubuntu releases will not exit 2 on warnings (#4757) + - doc(ds-identify): Describe ds-identify irrespective of distro (#4742) + - fix: relax NetworkManager renderer rules (#4745) + - fix: fix growpart race (#4618) + - feat: apply global DNS to interfaces in network-manager (#4723) + [Florian Apolloner] + - feat(apt): remove /etc/apt/sources.list when deb22 preferred (#4740) + - chore: refactor schema data as enums and namedtuples (#4585) + - feat(schema): improve CLI message on unprocessed data files (#4585) + - fix(config): relocate /run to /var/run on BSD (canonical#4677) + [Mina Galić] + - fix(ds-identify): relocate /run on *BSD (#4677) [Mina Galić] + - fix(sysvinit): make code a bit more consistent (#4677) [Mina Galić] + - doc: Document how cloud-init is, not how it was (#4737) + - tests: add expected exit 2 on noble from cloud-init status (#4738) + - test(linkcheck): ignore github md and rst link headers (#4734) + - test: Update webhook test due to removed cc_migrator module (#4726) + - fix(ds-identify): Return code 2 is a valid result, use cached value + - fix(cloudstack): Use parsed lease file for virtual router in cloudstack + - fix(dhcp): Guard against FileNotFoundError and NameError exceptions + - fix(apt_configure): disable sources.list if rendering deb822 (#4699) + (LP: #2045086) + - docs: Add link to contributing to docs (#4725) [Cat Red] + - chore: remove commented code (#4722) + - chore: Add log message when create_hostname_file key is false (#4724) + [Cat Red] + - fix: Correct v2 NetworkManager route rendering (#4637) + - azure/imds: log http failures as warnings instead of info (#4714) + [Chris Patterson] + - fix(setup): Relocate libexec on OpenBSD (#4708) [Mina Galić] + - feat(jinja): better jinja feedback and error catching (#4629) + [Alec Warren] + - test: Fix silent swallowing of unexpected subp error (#4702) + - fix: Move cloud-final.service after time-sync.target (#4610) + [Dave Jones] (LP: #1951639) + - feat(log): Make logger name more useful for __init__.py + - chore: Remove cc_migrator module (#4690) + - fix(tests): make cmd/devel/tests work on non-GNU [Mina Galić] + - chore: Remove cmdline from spelling list (#4670) + - doc: Document boot status meaning (#4670) + - doc: Set expectations for new datasources (#4670) + - ci: Show linkcheck broken links in job output (#4670) + - dmi: Add support for OpenBSD (#4654) [Mina Galić] + - ds-identify: fake dmidecode support on OpenBSD (#4654) [Mina Galić] + - ds-identify: add OpenBSD support in uname (#4654) [Mina Galić] + - refactor: Ensure '_cfg' in Init class is dict (#4674) + - refactor: Make event scope required in stages.py (#4674) + - refactor: Remove unused argument (#4674) + - chore: Move from lintian to a sphinx spelling plugin (#3639) + - fix(doc): Fix spelling errors found by sphinxcontrib-spelling (#3639) + - ci: Add Python 3.13 (#4567) + - Add AlexSv04047 to CLA signers file (#4671) [AlexSv04047] + - fix(openbsd): services & build tool (#4660) [CodeBleu] + - tests/unittests: add a new unit test for network manager net activator + (#4672) [Ani Sinha] + - Implement DataSourceCloudStack.get_hostname() (#4433) [Phsm Qwerty] + - net/nm: check for presence of ifcfg files when nm connection files + are absent (#4645) [Ani Sinha] + - doc: Overhaul debugging documentation (#4578) + - doc: Move dangerous commands to dev docs (#4578) + - doc: Relocate file location docs (#4578) + - doc: Remove the debugging page (#4578) + - fix(util): Fix boottime to work on OpenBSD (#4667) [Mina Galić] + - net: allow dhcp6 configuration from generate_fallback_configuration() + [Ani Sinha] + - net/network_manager: do not set "may-fail" to False for both ipv4 and + ipv6 dhcp [Ani Sinha] + - feat(subp): Measure subprocess command time (#4606) + - fix(python3.13): Fix import error for passlib on Python 3.13 (#4669) + - style(brpm/bddeb): add black and ruff for packages build scripts (#4666) + - copr: remove TODO.rst from spec file + - fix(packages/brpm): correct syntax error and typo + - style(ruff): fix tip target + - config: Module documentation updates (#4599) + - refactor(subp): Remove redundant parameter 'env' (#4555) + - refactor(subp): Remove unused parameter 'target' (#4555) + - refactor: Remove 'target' boilerplate from cc_apt_configure (#4555) + - refactor(subp): Re-add return type to subp() (#4555) + - refactor(subp): Add type information to args (#4555) + - refactor(subp): Use subprocess.DEVNULL (#4555) + - refactor(subp): Remove parameter 'combine_capture' (#4555) + - refactor(subp): Remove unused parameter 'status_cb' (#4555) + - fix(cli): fix parsing of argparse subcommands (#4559) + [Calvin Mwadime] (LP: #2040325) + - chore!: drop support for dsa ssh hostkeys in docs and schema (#4456) + - chore!: do not generate ssh dsa host keys (#4456) [shixuantong] + +23.4.4 + - fix(nocloud): smbios datasource definition + - tests: Check that smbios seed works + - fix(source): fix argument boundaries when parsing cmdline (#4825) + +23.4.3 + - fix: Handle systemctl when dbus not ready (#4842) + (LP: #2046483) + +23.4.2 + - fix: Handle invalid user configuration gracefully (#4797) + (LP: #2051147) + +23.4.1 + - fix: Handle systemctl commands when dbus not ready (#4681) + +23.4 + - tests: datasourcenone use client.restart to block until done (#4635) + - tests: increase number of retries across reboot to 90 (#4651) + - fix: Add schema for merge types (#4648) + - feat: Allow aliyun ds to fetch data in init-local (#4590) [qidong.ld] + - azure: report failure to eject as error instead of debug (#4643) + [Chris Patterson] + - bug(schema): write network-config if instance dir present (#4635) + - test: fix schema fuzzing test (#4639) + - Update build-on-openbsd dependencies (#4644) [CodeBleu] + - fix(test): Fix expected log for ipv6-only ephemeral network (#4641) + - refactor: Remove metaclass from network_state.py (#4638) + - schema: non-root fallback to default paths on perm errors (# 4631) + - fix: Don't loosen the permissions of the log file (#4628) + - Revert "logging: keep current file mode of log file if its stricter + than the new mode (#4250)" + - ephemeral: Handle link up failure for both ipv4 and ipv6 (#4547) + - fix(main): Don't call logging too early (#4595) + - fix: Remove Ubuntu-specific kernel naming convention assertion (#4617) + - fix(log): Do not implement handleError with a self parameter (#4617) + - fix(log): Don't try to reuse stderr logger (#4617) + - feat: Standardize logging output to stderr (#4617) + - chore: Sever unmaintained TODO.rst (#4625) + - test: Skip failing tests + - distros: Add suse + - test: Add default hello package version (#4614) + - fix(net): Improve DHCPv4 SUSE code, add test + - net: Fix DHCPv4 not enabled on SUSE in some cases [bin456789] + - fix(schema): Warn if missing dependency (#4616) + - fix(cli): main source cloud_config for schema validation (#4562) + - feat(schema): annotation path for invalid top-level keys (#4562) + - feat(schema): top-level additionalProperties: false (#4562) + - test: ensure top-level properties tests will pass (#4562) + - fix(schema): Add missing schema definitions (#4562) + - test: Fix snap tests (#4562) + - azure: Check for stale pps data from IMDS (#4596) [Ksenija Stanojevic] + - test: Undo dhcp6 integration test changes (#4612) + - azure: update diagnostic from warning level to debug [Chris Patterson] + - azure/imds: remove limit for connection errors if route present (#4604) + [Chris Patterson] + - [enhancement]: Add shellcheck to CI (#4488) [Aviral Singh] + - chore: add conventional commits template (#4593) + - Revert "net: allow dhcp6 configuration from + generate_fallback_configuration()" (#4607) + - azure: workaround to disable reporting IMDS failures on Azure Stack + [Chris Patterson] + - cc_apt_pipelining: Update docs, deprecate options (#4571) + - test: add gh workflows on push to main, update status badges (#4597) + - util: Remove function abs_join() (#4587) + - url_helper: Remove unused function retry_on_url_exc() (#4587) + - cc_resizefs: Add bcachefs resize support (#4594) + - integration_tests: Support non-Ubuntu distros (#4586) + - fix(cmdline): fix cmdline parsing with MAC containing cc: + - azure/errors: include http code in reason for IMDS failure + [Chris Patterson] + - tests: cloud-init schema --system does not return exit code 2 + - github: allow pull request to specify desired rebase and merge + - tests: fix integration test expectations of exit 2 on schema warning + - tests: fix schema test expected cli output Valid schema + - fix(schema cli): check raw userdata when processed cloud-config empty + - azure: report failure to host if ephemeral DHCP secondary NIC (#4558) + [Chris Patterson] + - man: Document cloud-init error codes (#4500) + - Add support for cloud-init "degraded" state (#4500) + - status.json: Don't override detail key with error condition (#4500) + - status: Remove duplicated data (#4500) + - refactor: Rename exported_errors in status.json (#4500) + - test: Remove stale status.json value (#4500) + - tools/render-template: Make yaml loading opt-in, fix setup.py (#4564) + - Add summit digest/trip report to docs (#4561) [Sally] + - doc: Fix incorrect statement about `cloud-init analyze` + - azure/imds: ensure new errors are logged immediately when retrying + (#4468) [Chris Patterson] + - Clarify boothook docs (#4543) + - boothook: allow stdout/stderr to emit to cloud-init-output.log + - summit-notes: add 2023 notes for reference in mailinglist/discourse + - fix: added mock to stop leaking journalctl that slows down unit test + (#4556) [Alec Warren] + - tests: maas test for DataSourceMAASLocal get_data + - maas tests: avoid using CiTest case and prefer pytest.tmpdir fixture + - MAAS: Add datasource to init-local timeframe + - Ensure all tests passed and/or are skipped + - Support QEMU in integration tests + - fix(read-dependencies): handle version specifiers containing [~!] + - test: unpin pytest + - schema: network-config optional network key. route uses oneOf (#4482) + - schema: add cloud_init_deepest_matches for best error message (#4482) + - network: warn invalid cfg add /run/cloud-init/network-config (#4482) + - schema: add network-config support to schema subcommand (#4482) + - Update version number and merge ChangeLog from 23.3.3 into main (#4553) + - azure: check for primary interface when performing DHCP (#4465) + [Chris Patterson] + - Fix hypothesis failure + - subp: add a log when skipping a file for execution for lack of exe + permission (#4506) [Ani Sinha] + - azure/imds: refactor max_connection_errors definition (#4467) + [Chris Patterson] + - chore: fix PR template rendering (#4526) + - fix(cc_apt_configure): avoid unneeded call to apt-install (#4519) + - comment difference between sysconfig and NetworkManager renderer (#4517) + [Ani Sinha] + - Set Debian's default locale to be c.UTF-8 (#4503) (LP: #2038945) + - Convert test_debian.py to pytest (#4503) + - doc: fix cloudstack link + - doc: fix development/contributing.html references + - doc: hide duplicated links + - Revert "ds-identify/CloudStack: $DS_MAYBE if vm running on vmware/xen + (#4281)" (#4511) (LP: #2039453) + - Fix the missing mcopy argument [Vladimir Pouzanov] + - tests: Add logging fix (#4499) + - Update upgrade test to account for dhcp6 + - Remove logging of PPID path (#4502) + - Make Python 3.12 CI test non-experimental (#4498) + - ds-identify: exit 2 on disabled state from marker or cmdline (#4399) + - cloud-init-generator: Various performance optimizations (#4399) + - systemd: Standardize cloud-init systemd enablement (#4399) + - benchmark: benchmark cloud-init-generator independent of ds-identify + (#4399) + - tests/integration_tests: add cloud-init disablement coverage (#4399) + - doc: Describe disabling cloud-init using an environment variable (#4399) + - fix: cloud-init status --wait broken with KERNEL_CMDLINE (#4399) + - azure/imds: retry on 429 errors for reprovisiondata (#4470) + [Chris Patterson] + - cmd: Don't write json status files for non-boot stages (#4478) + - ds-identify: Allow disable service and override environment (#4485) + [Mina Galić] + - Update DataSourceNWCS.py (#4496) [shell-skrimp] + - Add r00ta to CLA signers file + - Fix override of systemd_locale_conf in rhel [Jacopo Rota] + - ci(linkcheck): minor fixes (#4495) + - integration test fix for deb822 URI format (#4492) + - test: use a mantic-compatible tz in t/i/m/test_combined.py (#4494) + - ua: shift CLI command from ua to pro for all interactions + - pro: avoid double-dash when enabling inviddual services on CLI + - net: allow dhcp6 configuration from generate_fallback_configuration() + (#4474) [Ani Sinha] + - tests: apt re.search to match alternative ordering of installed pkgs + - apt: doc apt_pkg performance improvement over subp apt-config dump + - Tidy up contributing docs (#4469) [Sally] + - [enhancement]: Automatically linkcheck in CI (#4479) [Aviral Singh] + - Revert allowing pro service warnings (#4483) + - Export warning logs to status.json (#4455) + - Fix regression in package installation (#4466) + - schema: cloud-init schema in early boot or in dev environ (#4448) + - schema: annotation of nested dicts lists in schema marks (#4448) + - feat(apport): collect ubuntu-pro logs if ubuntu-advantage.log present + (#4443) + - apt_configure: add deb822 support for default sources file (#4437) + - net: remove the word "on instance boot" from cloud-init generated config + (#4457) [Ani Sinha] + - style: Make cloudinit.log functions use snake case (#4449) + - Don't recommend using cloud-init as a library (#4459) + - vmware: Fall back to vmtoolsd if vmware-rpctool errs (#4444) + [Andrew Kutz] + - azure: add option to enable/disable secondary ip config (#4432) + [Ksenija Stanojevic] + - Allow installing snaps via package_update_upgrade_install module (#4202) + - docs: Add cloud-init overview/introduction (#4440) [Sally] + - apt: install software-properties-common when absent but needed (#4441) + - sources/Azure: Ignore system volume information folder while scanning + for files in the ntfs resource disk (#4446) [Anh Vo] + - refactor: Remove unnecessary __main__.py file + - style: Drop vi format comments + - cloudinit.log: Use more appropriate exception (#4435) + - cloudinit.log: Don't configure NullHandler (#4435) + - commit 6bbbfbbb030831c72b5aa2bba9cb8492f19d56f4 + - cloudinit.log: Remove unnecessary module function and variables (#4435) + - cloudinit.log: Remove unused getLogger wrapper (#4435) + - cloudinit.log: Standardize use of cloudinit's logging module (#4435) + - Remove unnecessary logging wrapper in Cloud class (#4435) + - integration test: allow pro service warnings (#4447) + - integration tests: fix mount indentation (#4445) + - sources/Azure: fix for conflicting reports to platform (#4434) + [Chris Patterson] + - docs: link the cloud-config validation service (#4442) + - Fix pip-managed ansible on pip < 23.0.1 (#4403) + - Install gnupg if gpg not found (#4431) + - Add "phsm" as contributor (#4429) [Phsm Qwerty] + - cc_ubuntu_advantage: do not rely on uaclient.messages module (#4397) + [Grant Orndorff] + - tools/ds-identify: match Azure datasource's ds_detect() behavior (#4430) + [Chris Patterson] + - Refactor test_apt_source_v1.py to use pytest (#4427) + - sources: do not override datasource detection if None is in list (#4426) + [Chris Patterson] + - feat: check for create_hostname_file key before writing /etc/hostname + (SC-1588) (#4330) [Cat Red] + - Pytestify apt config test modules (#4424) + - upstream gentoo patch (#4422) + - Work around no instance ip (#4419) + - Fix typing issues in subp module (#4401) + - net: fix ipv6_dhcpv6_stateful/stateless/slaac configuration for rhel + (#4395) [Ani Sinha] + - Release 23.3.1 + - apt: kill dirmngr/gpg-agent without gpgconf dependency (LP: #2034273) + - integration tests: fix mount indentation (#4405) + - Use grep for faster parsing of cloud config in ds-identify (#4327) + [Scott Moser] (LP: #2030729) + - doc: fix instructions on how to disable cloud-init from kernel command + line (#4406) [Ani Sinha] + - doc/vmware: Update contents relevant to disable_vmware_customization + [PengpengSun] + - Bring back flake8 for python 3.6 (#4394) + - integration tests: Fix cgroup parsing (#4402) + - summary: Update template parameter descriptions in docs [MJ Moshiri] + - Log PPID for better debugging (#4398) + - integration tests: don't clean when KEEP_* flags true (#4400) + - clean: add a new option to clean generated config files [Ani Sinha] + - pep-594: drop deprecated pipes module import + +23.3.3 + - Fix pip-managed ansible on pip < 23.0.1 (#4403) + +23.3.2 + - Revert "ds-identify/CloudStack: $DS_MAYBE if vm running on vmware/xen (#4281)" + (#4511) (LP: #2039453) + +23.3.1 + - apt: kill dirmngr/gpg-agent without gpgconf dependency (LP: #2034273) + - integration tests: Fix cgroup parsing (#4402) + +23.3 + - Bump pycloudlib to 1!5.1.0 for ec2 mantic daily image support (#4390) + - Fix cc_keyboard in mantic (LP: #2030788) + - ec2: initialize get_instance_userdata return value to bytes (#4387) + [Noah Meyerhans] + - cc_users_groups: Add doas/opendoas support (#4363) [dermotbradley] + - Fix pip-managed ansible + - status: treat SubState=running and MainPID=0 as service exited + - azure/imds: increase read-timeout to 30s (#4372) [Chris Patterson] + - collect-logs fix memory usage (SC-1590) (#4289) + [Alec Warren] (LP: #1980150) + - cc_mounts: Use fallocate to create swapfile on btrfs (#4369) [王煎饼] + - Undocument nocloud-net (#4318) + - feat(akamai): add akamai to settings.py and apport.py (#4370) + - read-version: fallback to get_version when git describe fails (#4366) + - apt: fix cloud-init status --wait blocking on systemd v 253 (#4364) + - integration tests: Pass username to pycloudlib (#4324) + - Bump pycloudlib to 1!5.1.0 (#4353) + - cloud.cfg.tmpl: reorganise, minimise/reduce duplication (#4272) + [dermotbradley] + - analyze: fix (unexpected) timestamp parsing (#4347) [Mina Galić] + - cc_growpart: fix tests to run on FreeBSD (#4351) [Mina Galić] + - subp: Fix spurious test failure on FreeBSD (#4355) [Mina Galić] + - cmd/clean: fix tests on non-Linux platforms (#4352) [Mina Galić] + - util: Fix get_proc_ppid() on non-Linux systems (#4348) [Mina Galić] + - cc_wireguard: make tests pass on FreeBSD (#4346) [Mina Galić] + - unittests: fix breakage in test_read_cfg_paths_fetches_cached_datasource + (#4328) [Ani Sinha] + - Fix test_tools.py collection (#4315) + - cc_keyboard: add Alpine support (#4278) [dermotbradley] + - Flake8 fixes (#4340) [Robert Schweikert] + - cc_mounts: Fix swapfile not working on btrfs (#4319) [王煎饼] (LP: #1884127) + - ds-identify/CloudStack: $DS_MAYBE if vm running on vmware/xen (#4281) + [Wei Zhou] + - ec2: Support double encoded userdata (#4276) [Noah Meyerhans] + - cc_mounts: xfs is a Linux only FS (#4334) [Mina Galić] + - tests/net: fix TestGetInterfaces' mock coverage for get_master (#4336) + [Chris Patterson] + - change openEuler to openeuler and fix some bugs in openEuler (#4317) + [sxt1001] + - Replace flake8 with ruff (#4314) + - NM renderer: set default IPv6 addr-gen-mode for all interfaces to eui64 + (#4291) [Ani Sinha] + - cc_ssh_import_id: add Alpine support and add doas support (#4277) + [dermotbradley] + - Release 23.2.2 (#4300) + - sudoers not idempotent (SC-1589) (#4296) [Alec Warren] (LP: #1998539) + - Added support for Akamai Connected Cloud (formerly Linode) (#4167) + [Will Smith] + - Fix reference before assignment (#4292) + - Overhaul module reference page (#4237) [Sally] + - replaced spaces with commas for setting passenv (#4269) [Alec Warren] + - DS VMware: modify a few log level (#4284) [PengpengSun] + - tools/read-version refactors and unit tests (#4268) + - Ensure get_features() grabs all features (#4285) + - Don't always require passlib dependency (#4274) + - tests: avoid leaks into host system checking of ovs-vsctl cmd (#4275) + - Fix NoCloud kernel commandline key parsing (#4273) + - testing: Clear all LRU caches after each test (#4249) + - Remove the crypt dependency (#2139) [Gonéri Le Bouder] + - logging: keep current file mode of log file if its stricter than the + new mode (#4250) [Ani Sinha] + - Remove default membership in redundant groups (#4258) + [Dave Jones] (LP: #1923363) + - doc: improve datasource_creation.rst (#4262) + - Remove duplicate Integration testing button (#4261) [Rishita Shaw] + - tools/read-version: fix the tool so that it can handle version parsing + errors (#4234) [Ani Sinha] + - net/dhcp: add udhcpc support (#4190) [Jean-François Roche] + - DS VMware: add i386 arch dir to deployPkg plugin search path + [PengpengSun] + - LXD moved from linuxcontainers.org to Canonical [Simon Deziel] + - cc_mounts.py: Add note about issue with creating mounts inside mounts + (#4232) [dermotbradley] + - lxd: install lxd from snap, not deb if absent in image + - landscape: use landscape-config to write configuration + - Add deprecation log during init of DataSourceDigitalOcean (#4194) + [tyb-truth] + - doc: fix typo on apt.primary.arches (#4238) [Dan Bungert] + - Inspect systemd state for cloud-init status (#4230) + - instance-data: add system-info and features to combined-cloud-config + (#4224) + - systemd: Block login until config stage completes (#2111) (LP: #2013403) + - tests: proposed should invoke apt-get install -t=-proposed + (#4235) + - cloud.cfg.tmpl: reinstate ca_certs entry (#4236) [dermotbradley] + - Remove feature flag override ability (#4228) + - tests: drop stray unrelated file presence test (#4227) + - Update LXD URL (#4223) [Sally] + - schema: add network v1 schema definition and validation functions + - tests: daily PPA for devel series is version 99.daily update tests to + match (#4225) + - instance-data: write /run/cloud-init/combined-cloud-config.json + - mount parse: Fix matching non-existent directories (#4222) [Mina Galić] + - Specify build-system for pep517 (#4218) + - Fix network v2 metric rendering (#4220) + - Migrate content out of FAQ page (SD-1187) (#4205) [Sally] + - setup: fix generation of init templates (#4209) [Mina Galić] + - docs: Correct some bootcmd example wording + - fix changelog + - Release 23.2.1 (#4207) (LP: #2025180) + - tests: reboot client to assert x-shellscript-per-boot is triggered + - nocloud: parse_cmdline no longer detects nocloud-net datasource (#4204) + (LP: 4203, #2025180) + - Add docstring and typing to mergemanydict (#4200) + - BSD: add dsidentify to early startup scripts (#4182) [Mina Galić] + - handler: report errors on skipped merged cloud-config.txt parts + (LP: #1999952) + - Add cloud-init summit writeups (#4179) [Sally] + - tests: Update test_clean_log for oci (#4187) + - gce: improve ephemeral fallback NIC selection (CPC-2578) (#4163) + - tests: pin pytest 7.3.1 to avoid adverse testpaths behavior (#4184) + - Ephemeral Networking for FreeBSD (#2165) [Mina Galić] + - Clarify directory syntax for nocloud local filesystem. (#4178) + - Set default renderer as sysconfig for centos/rhel (#4165) [Ani Sinha] + - Test static routes and netplan 0.106 + - FreeBSD fix parsing of mount and mount options (#2146) [Mina Galić] + - test: add tracking bug id (#4164) + - tests: can't match MAC for LXD container veth due to netplan 0.106 + (#4162) + - Add kaiwalyakoparkar as a contributor (#4156) [Kaiwalya Koparkar] + - BSD: remove datasource_list from cloud.cfg template (#4159) [Mina Galić] + - launching salt-minion in masterless mode (#4110) [Denis Halturin] + - tools: fix run-container builds for rockylinux/8 git hash mismatch + (#4161) + - fix doc lint: spellchecker tripped up (#4160) [Mina Galić] + - Support Ephemeral Networking for BSD (#2127) + - Added / fixed support for static routes on OpenBSD and FreeBSD (#2157) + [Kadir Mueller] + - cc_rsyslog: Refactor for better multi-platform support (#4119) + [Mina Galić] (LP: #1798055) + - tests: fix test_lp1835584 (#4154) + - cloud.cfg mod names: docs and rename salt_minion and set_password (#4153) + - tests: apt support for deb822 format .sources files on mantic + - vultr: remove check_route check (#2151) [Jonas Chevalier] + - Update SECURITY.md (#4150) [Indrranil Pawar] + - Update CONTRIBUTING.rst (#4149) [Indrranil Pawar] + - Update .github-cla-signers (#4151) [Indrranil Pawar] + - Standardise module names in cloud.cfg.tmpl to only use underscore + (#4128) [dermotbradley] + - tests: update test_webhook_reporting + - Modify PR template so autoclose works + - doc: add missing semi-colon to nocloud cmdline docs (#4120) + - .gitignore: extend coverage pattern (#4143) [Mina Galić] + +23.2.2 + - Fix NoCloud kernel commandline key parsing (#4273) (Fixes: #4271) + (LP: #2028562) + - Fix reference before assignment (#4292) (Fixes: #4288) (LP: #2028784) + +23.2.1 + - nocloud: Fix parse_cmdline detection of nocloud-net datasource (#4204) + (Fixes: 4203) (LP: #2025180) +23.2 + - BSD: simplify finding MBR partitions by removing duplicate code + [Mina Galić] + - tests: bump pycloudlib version for mantic builds + - network-manager: Set higher autoconnect priority for nm keyfiles (#3671) + [Ani Sinha] + - alpine.py: change the locale file used (#4139) [dermotbradley] + - cc_ntp: Sync up with current FreeBSD ntp.conf (#4122) [Mina Galić] + - config: drop refresh_rmc_and_interface as RHEL 7 no longer supported + [Robert Schweikert] + - docs: Add feedback button to docs + - net/sysconfig: enable sysconfig renderer if network manager has ifcfg-rh + plugin (#4132) [Ani Sinha] + - For Alpine use os-release PRETTY_NAME (#4138) [dermotbradley] + - network_manager: add a method for ipv6 static IP configuration (#4127) + [Ani Sinha] + - correct misnamed template file host.mariner.tmpl (#4124) [dermotbradley] + - nm: generate ipv6 stateful dhcp config at par with sysconfig (#4115) + [Ani Sinha] + - Add templates for GitHub Issues + - Add 'peers' and 'allow' directives in cc_ntp (#3124) [Jacob Salmela] + - FreeBSD: Fix user account locking (#4114) [Mina Galić] (GH: #1854594) + - FreeBSD: add ResizeGrowFS class to cc_growpart (#2334) [Mina Galić] + - Update tests in Azure TestCanDevBeReformatted class (#2771) + [Ksenija Stanojevic] + - Replace Launchpad references with GitHub Issues + - Fix KeyError in iproute pformat (#3287) [Dmitry Zykov] + - schema: read_cfg_paths call init.fetch to lookup /v/l/c/instance + - azure/errors: introduce reportable errors for imds (#3647) + [Chris Patterson] + - FreeBSD (and friends): better identify MBR slices (#2168) + [Mina Galić] (LP: #2016350) + - azure/errors: add host reporting for dhcp errors (#2167) + [Chris Patterson] + - net: purge blacklist_drivers across net and azure (#2160) + [Chris Patterson] + - net: refactor hyper-v VF filtering and apply to get_interfaces() (#2153) + [Chris Patterson] + - tests: avoid leaks to underlying filesystem for /etc/cloud/clean.d + (#2251) + - net: refactor find_candidate_nics_on_linux() to use get_interfaces() + (#2159) [Chris Patterson] + - resolv_conf: Allow > 3 nameservers (#2152) [Major Hayden] + - Remove mount NTFS error message (#2134) [Ksenija Stanojevic] + - integration tests: fix image specification parsing (#2166) + - ci: add hypothesis scheduled GH check (#2149) + - Move supported distros list to docs (#2162) + - Fix logger, use instance rather than module function (#2163) + - README: Point to Github Actions build status (#2158) + - Revert "fix linux-specific code on bsd (#2143)" (#2161) + - Do not generate dsa and ed25519 key types when crypto FIPS mode is + enabled (#2142) [Ani Sinha] (LP: 2017761) + - Add documentation label automatically (#2156) + - sources/azure: report success to host and introduce kvp module (#2141) + [Chris Patterson] + - setup.py: use pkg-config for udev/rules path (#2137) [dankm] + - openstack/static: honor the DNS servers associated with a network + (#2138) [Gonéri Le Bouder] + - fix linux-specific code on bsd (#2143) + - cli: schema validation of jinja template user-data (SC-1385) (#2132) + (LP: #1881925) + - gce: activate network discovery on every boot (#2128) + - tests: update integration test to assert 640 across reboots (#2145) + - Make user/vendor data sensitive and remove log permissions (#2144) + (LP: #2013967) + - Update kernel command line docs (SC-1457) (#2133) + - docs: update network configuration path links (#2140) [d1r3ct0r] + - sources/azure: report failures to host via kvp (#2136) [Chris Patterson] + - net: Document use of `ip route append` to add routes (#2130) + - dhcp: Add missing mocks (#2135) + - azure/imds: retry fetching metadata up to 300 seconds (#2121) + [Chris Patterson] + - [1/2] DHCP: Refactor dhcp client code (#2122) + - azure/errors: treat traceback_base64 as string (#2131) [Chris Patterson] + - azure/errors: introduce reportable errors (#2129) [Chris Patterson] + - users: schema permit empty list to indicate create no users + - azure: introduce identity module (#2116) [Chris Patterson] + - Standardize disabling cloud-init on non-systemd (#2112) + - Update .github-cla-signers (#2126) [Rob Tongue] + - NoCloud: Use seedfrom protocol to determine mode (#2107) + - rhel: Remove sysvinit files. (#2114) + - tox.ini: set -vvvv --showlocals for pytest (#2104) [Chris Patterson] + - Fix NoCloud kernel commandline semi-colon args + - run-container: make the container/VM timeout configurable (#2118) + [Paride Legovini] + - suse: Remove sysvinit files. (#2115) + - test: Backport assert_call_count for old requests (#2119) + - Add "licebmi" as contributor (#2113) [Mark Martinez] + - Adapt DataSourceScaleway to upcoming IPv6 support (#2033) + [Louis Bouchard] + - rhel: make sure previous-hostname file ends with a new line (#2108) + [Ani Sinha] + - Adding contributors for DataSourceAkamai (#2110) [acourdavAkamai] + - Cleanup ephemeral IP routes on exception (#2100) [sxt1001] + - commit 09a64badfb3f51b1b391fa29be19962381a4bbeb [sxt1001] (LP: #2011291) + - Standardize kernel commandline user interface (#2093) + - config/cc_resizefs: fix do_resize arguments (#2106) [Chris Patterson] + - Fix test_dhclient_exits_with_error (#2105) + - net/dhcp: catch dhclient failures and raise NoDHCPLeaseError (#2083) + [Chris Patterson] + - sources/azure: move pps handling out of _poll_imds() (#2075) + [Chris Patterson] + - tests: bump pycloudlib version (#2102) + - schema: do not manipulate draft4 metaschema for jsonschema 2.6.0 (#2098) + - sources/azure/imds: don't count timeout errors as connection errors + (#2074) [Chris Patterson] + - Fix Python 3.12 unit test failures (#2099) + - integration tests: Refactor instance checking (#1989) + - ci: migrate remaining jobs from travis to gh (#2085) + - missing ending quote in instancedata docs(#2094) [Hong L] + - refactor: stop passing log instances to cc_* handlers (#2016) [d1r3ct0r] + - tests/vmware: fix test_no_data_access_method failure (#2092) + [Chris Patterson] + - Don't change permissions of netrules target (#2076) (LP: #2011783) + - tests/sources: patch util.get_cmdline() for datasource tests (#2091) + [Chris Patterson] + - macs: ignore duplicate MAC for devs with driver driver qmi_wwan (#2090) + (LP: #2008888) + - Fedora: Enable CA handling (#2086) [František Zatloukal] + - Add frantisekz as contributor (#2087) [František Zatloukal] + - Send dhcp-client-identifier for InfiniBand ports (#2043) [Waleed Mousa] + - cc_ansible: complete the examples and doc (#2082) [Yves] + - contributor: add bdrung + - bddeb: for dev package, derive debhelper-compat from host system + - apport: only prompt for cloud_name when instance-data.json is absent + - datasource: Optimize datasource detection, fix bugs (#2060) + - Handle non existent ca-cert-config situation (#2073) [Shreenidhi Shedi] + - sources/azure: add networking check for all source PPS (#2061) + [Chris Patterson] + - do not attempt dns resolution on ip addresses (#2040) + - chore: fix style tip (#2071) + - Fix metadata IP in instancedata.rst (#2063) [Brian Haley] + - util: Pass deprecation schedule in deprecate_call() (#2064) + - config: Update grub-dpkg docs (#2058) + - docs: Cosmetic improvements and styling (#2057) [s-makin] + - cc_grub_dpkg: Added UEFI support (#2029) [Alexander Birkner] + - tests: Write to /var/spool/rsyslog to adhere to apparmor profile (#2059) + - oracle-ds: prefer system_cfg over ds network config source (#1998) + (LP: #1956788) + - Remove dead code (#2038) + - Release 23.1.1 (#2052) + - source: Force OpenStack when it is only option (#2045) (LP: #2008727) + - cc_ubuntu_advantage: improve UA logs discovery + - sources/azure: fix regressions in IMDS behavior (#2041) [Chris Patterson] + - tests: fix test_schema (#2042) + - dhcp: Cleanup unused kwarg (#2037) + - sources/vmware/imc: fix-missing-catch-few-negtive-scenarios (#2027) + [PengpengSun] + - dhclient_hook: remove vestigal dhclient_hook command (#2015) + - log: Add standardized deprecation tooling (SC-1312) (#2026) + - Enable SUSE based distros for ca handling (#2036) [Robert Schweikert] + +23.1.2 + - Make user/vendor data sensitive and remove log permissions + (LP: #2013967) (CVE-2023-1786) + +23.1.1 + - source: Force OpenStack when it is only option (#2045) + - sources/azure: fix regressions in IMDS behavior (#2041) + [Chris Patterson] + +23.1 + - Support transactional-updates for SUSE based distros (#1997) + [Robert Schweikert] + - Set ownership for new folders in Write Files Module (#1980) + [Jack] (LP: #1990513) + - add OpenCloudOS and TencentOS support (#1964) [wynnfeng] + - lxd: Retry if the server isn't ready (#2025) + - test: switch pycloudlib source to pypi (#2024) + - test: Fix integration test deprecation message (#2023) + - Recognize opensuse-microos, dev tooling fixes [Robert Schweikert] + - sources/azure: refactor imds handler into own module (#1977) + [Chris Patterson] + - docs: deprecation generation support [1/2] (#2013) + - add function is_virtual to distro/FreeBSD (#1957) [Mina Galić] + - cc_ssh: support multiple hostcertificates (#2018) (LP: #1999164) + - Fix minor schema validation regression and fixup typing (#2017) + - doc: Reword user data debug section (#2019) + - Overhaul/rewrite of certificate handling as follows: (#1962) + [dermotbradley] (LP: #1931174) + - disk_setup: use byte string when purging the partition table (#2012) + [Stefan Prietl] + - cli: schema also validate vendordata*. + - ci: sort and add checks for cla signers file [Stefan Prietl] + - Add "ederst" as contributor (#2010) [Stefan Prietl] + - readme: add reference to packages dir (#2001) + - docs: update downstream package list (#2002) + - docs: add google search verification (#2000) [s-makin] + - docs: fix 404 render use default notfound_urls_prefix in RTD conf (#2004) + - Fix OpenStack datasource detection on bare metal (#1923) + [Alexander Birkner] (LP: #1815990) + - docs: add themed RTD 404 page and pointer to readthedocs-hosted (#1993) + - schema: fix gpt labels, use type string for GUID (#1995) + - cc_disk_setup: code cleanup (#1996) + - netplan: keep custom strict perms when 50-cloud-init.yaml exists + - cloud-id: better handling of change in datasource files + [d1r3ct0r] (LP: #1998998) + - tests: Remove restart check from test + - Ignore duplicate macs from mscc_felix and fsl_enetc (LP: #1997922) + - Warn on empty network key (#1990) + - Fix Vultr cloud_interfaces usage (#1986) [eb3095] + - cc_puppet: Update puppet service name (#1970) [d1r3ct0r] (LP: #2002969) + - docs: Clarify networking docs (#1987) + - lint: remove httpretty (#1985) [sxt1001] + - cc_set_passwords: Prevent traceback when restarting ssh (#1981) + - tests: fix lp1912844 (#1978) + - tests: Skip ansible test on bionic (#1984) + - Wait for NetworkManager (#1983) [Robert Schweikert] + - docs: minor polishing (#1979) [s-makin] + - CI: migrate integration-test to GH actions (#1969) + - Fix permission of SSH host keys (#1971) [Ron Gebauer] + - Fix default route rendering on v2 ipv6 (#1973) (LP: #2003562) + - doc: fix path in net_convert command (#1975) + - docs: update net_convert docs (#1974) + - doc: fix dead link + - cc_set_hostname: ignore /var/lib/cloud/data/set-hostname if it's empty + (#1967) [Emanuele Giuseppe Esposito] + - distros/rhel.py: _read_hostname() missing strip on "hostname" (#1941) + [Mark Mielke] + - integration tests: add IBM VPC support (SC-1352) (#1915) + - machine-id: set to uninitialized to trigger regeneration on clones + (LP: #1999680) + - sources/azure: retry on connection error when fetching metdata (#1968) + [Chris Patterson] + - Ensure ssh state accurately obtained (#1966) + - bddeb: drop dh-systemd dependency on newer deb-based releases [d1r3ct0r] + - doc: fix `config formats` link in cloudsigma.rst (#1960) + - Fix wrong subp syntax in cc_set_passwords.py (#1961) + - docs: update the PR template link to readthedocs (#1958) [d1r3ct0r] + - ci: switch unittests to gh actions (#1956) + - Add mount_default_fields for PhotonOS. (#1952) [Shreenidhi Shedi] + - sources/azure: minor refactor for metadata source detection logic + (#1936) [Chris Patterson] + - add "CalvoM" as contributor (#1955) [d1r3ct0r] + - ci: doc to gh actions (#1951) + - lxd: handle 404 from missing devices route for LXD 4.0 (LP: #2001737) + - docs: Diataxis overhaul (#1933) [s-makin] + - vultr: Fix issue regarding cache and region codes (#1938) [eb3095] + - cc_set_passwords: Move ssh status checking later (SC-1368) (#1909) + (LP: #1998526) + - Improve Wireguard module idempotency (#1940) [Fabian Lichtenegger-Lukas] + - network/netplan: add gateways as on-link when necessary (#1931) + [Louis Sautier] (LP: #2000596) + - tests: test_lxd assert features.networks.zones when present (#1939) + - Use btrfs enquque when available (#1926) [Robert Schweikert] + - sources/azure: drop description for report_failure_to_fabric() (#1934) + [Chris Patterson] + - cc_disk_setup.py: fix MBR single partition creation (#1932) + [dermotbradley] (LP: #1851438) + - Fix typo with package_update/package_upgrade (#1927) [eb3095] + - sources/azure: fix device driver matching for net config (#1914) + [Chris Patterson] + - BSD: fix duplicate macs in Ifconfig parser (#1917) [Mina Galić] + - test: mock dns calls (#1922) + - pycloudlib: add lunar support for integration tests (#1928) + - nocloud: add support for dmi variable expansion for seedfrom URL + (LP: #1994980) + - tools: read-version drop extra call to git describe --long + - doc: improve cc_write_files doc (#1916) + - read-version: When insufficient tags, use cloudinit.version.get_version + - mounts: document weird prefix in schema (#1913) + - add utility function test cases (#1910) [sxt1001] + - test: mock file deletion in dhcp tests (#1911) + - Ensure network ready before cloud-init service runs on RHEL (#1893) + (LP: #1998655) + - docs: add copy button to code blocks (#1890) [s-makin] + - netplan: define features.NETPLAN_CONFIG_ROOT_READ_ONLY flag + - azure: fix support for systems without az command installed (#1908) + - Networking Clarification (#1892) + - Fix the distro.osfamily output problem in the openEuler system. (#1895) + [sxt1001] (LP: #1999042) + - pycloudlib: bump commit dropping azure api smoke test + - * net: netplan config root read-only as wifi config can contain creds + - autoinstall: clarify docs for users + - sources/azure: encode health report as utf-8 (#1897) [Chris Patterson] + - Add back gateway4/6 deprecation to docs (#1898) + - networkd: Add support for multiple [Route] sections (#1868) + [Nigel Kukard] + - doc: add qemu tutorial (#1863) + - lint: fix tip-flake8 and tip-mypy (#1896) + - Add support for setting uid when creating users on FreeBSD (#1888) + [einsibjarni] + - Fix exception in BSD networking code-path (#1894) [Mina Galić] + - Append derivatives to is_rhel list in cloud.cfg.tmpl (#1887) [Louis Abel] + - FreeBSD init: use cloudinit_enable as only rcvar (#1875) [Mina Galić] + - feat: add support aliyun metadata security harden mode (#1865) + [Manasseh Zhou] + - docs: uprate analyze to performance page [s-makin] + - test: fix lxd preseed managed network config (#1881) + - Add support for static IPv6 addresses for FreeBSD (#1839) [einsibjarni] + - Make 3.12 failures not fail the build (#1873) + - Docs: adding relative links [s-makin] + - Update read-version + - Fix setup.py to align with PEP 440 versioning replacing trailing + - travis: promote 3.11-dev to 3.11 (#1866) + - test_cloud_sigma: delete useless test (#1828) [sxt1001] + - Add "nkukard" as contributor (#1864) [Nigel Kukard] + - tests: ds-id mocks for vmware-rpctool as utility may not exist in env + - doc: add how to render new module doc (#1855) + - doc: improve module creation explanation (#1851) + - Add Support for IPv6 metadata to OpenStack (#1805) + [Marvin Vogt] (LP: #1906849) + - add xiaoge1001 to .github-cla-signers (#1854) [sxt1001] + - network: Deprecate gateway{4,6} keys in network config v2 (#1794) + (LP: #1992512) + - VMware: Move Guest Customization transport from OVF to VMware (#1573) + [PengpengSun] + - doc: home page links added (#1852) [s-makin] + +22.4.2 + - status: handle ds not defined in status.json (#1876) (LP: #1997559) + +22.4.1 + - net: skip duplicate mac check for netvsc nic and its VF (#1853) + [Anh Vo] (LP: #1844191) + - ChangeLog: whitespace cleanup (#1850) + - changelog: capture 22.3.1-4 releases + +22.4 + - test: fix pro integration test [Alberto Contreras] + - cc_disk_setup: pass options in correct order to utils (#1829) + [dermotbradley] + - tests: text_lxd basic_preseed verify_clean_log (#1826) + - docs: switch sphinx theme to furo (SC-1327) (#1821) [Alberto Contreras] + - tests: activate Ubuntu Pro tests (only on Jenkins) (#1777) + [Alberto Contreras] + - tests: test_lxd assert features.storage.buckets when present (#1827) + - tests: replace missed ansible install-method with underscore (#1825) + - tests: replace ansible install-method with underscore + - ansible: standardize schema keys + - ci: run json tool on 22.04 rather than 20.04 (#1823) + - Stop using devices endpoint for LXD network config (#1819) + - apport: address new curtin log and config locations (#1812) + - cc_grub: reword docs for clarity (#1818) + - tests: Fix preseed test (#1820) + - Auto-format schema (#1810) + - Ansible Control Module (#1778) + - Fix last reported event possibly not being sent (#1796) (LP: #1993836) + - tests: Ignore unsupported lxd project keys (#1817) [Alberto Contreras] + - udevadm settle should handle non-udev system gracefully (#1806) + [dermotbradley] + - add mariner support (#1780) [Minghe Ren] + - Net: add BSD ifconfig(8) parser and state class (#1779) [Mina Galić] + - adding itjamie to .github-cla-signers [Jamie (Bear) Murphy] + - Fix inconsistency between comment and statement (#1809) [Guillaume Gay] + - Update .github-cla-signers (#1811) [Guillaume Gay] + - alpine.py: Add Alpine-specific manage_service function and update tests + (#1804) [dermotbradley] + - test: add 3.12-dev to Travis CI (#1798) [Alberto Contreras] + - add NWCS datasource (#1793) [shell-skrimp] + - Adding myself as CLA signer (#1799) [s-makin] + - apport: fix some data collection failures due to symlinks (#1797) + [Dan Bungert] + - read-version: Make it compatible with bionic (#1795) [Alberto Contreras] + - lxd: add support for lxd preseed config(#1789) + - Enable hotplug for LXD datasource (#1787) + - cli: collect logs and apport subiquity support + - add support for Container-Optimized OS (#1748) [vteratipally] + - test: temporarily disable failing integration test (#1792) + - Fix LXD/nocloud detection on lxd vm tests (#1791) + - util: Implement __str__ and __iter__ for Version (#1790) + - cc_ua: consume ua json api for enable commands [Alberto Contreras] + - Add clarity to cc_final_message docs (#1788) + - cc_ntp: add support for BSDs (#1759) [Mina Galić] (LP: #1990041) + - make Makefile make agnostic (#1786) [Mina Galić] + - Remove hardcoding and unnecessary overrides in Makefile (#1783) + [Joseph Mingrone] + - Add my username (Jehops) to .github-cla-signers (#1784) [Joseph Mingrone] + - Temporarily remove broken test (#1781) + - Create reference documentation for base config + - cc_ansible: add support for galaxy install (#1736) + - distros/manage_services: add support to disable service (#1772) + [Mina Galić] (LP: #1991024) + - OpenBSD: remove pkg_cmd_environ function (#1773) + [Mina Galić] (LP: 1991567) + - docs: Correct typo in the FAQ (#1774) [Maximilian Wörner] + - tests: Use LXD metadata to determine NoCloud status (#1776) + - analyze: use init-local as start of boot record (#1767) [Chris Patterson] + - docs: use opensuse for distro name in package doc (#1771) + - doc: clarify packages as dev only (#1769) [Alberto Contreras] + - Distro manage service: Improve BSD support (#1758) + [Mina Galić] (LP: #1990070) + - testing: check logs for critical errors (#1765) [Chris Patterson] + - cc_ubuntu_advantage: Handle already attached on Pro [Alberto Contreras] + - doc: Add configuration explanation (SC-1169) + - Fix Oracle DS primary interface when using IMDS (#1757) (LP: #1989686) + - style: prefer absolute imports over relative imports [Mina Galić] + - tests: Fix ip log during instance destruction (#1755) [Alberto Contreras] + - cc_ubuntu_advantage: add ua_config in auto-attach [Alberto Contreras] + - apt configure: sources write/append mode (#1738) + [Fabian Lichtenegger-Lukas] + - networkd: Add test and improve typing. (#1747) [Alberto Contreras] + - pycloudlib: bump commit for gce cpu architecture support (#1750) + - commit ffcb29bc8315d1e1d6244eeb1cbd8095958f7bad (LP: #1307667) + - testing: workaround LXD vendor data (#1740) + - support dhcp{4,6}-overrides in networkd renderer (#1710) [Aidan Obley] + - tests: Drop httpretty in favor of responses (#1720) [Alberto Contreras] + - cc_ubuntu_advantage: Implement custom auto-attach behaviors (#1583) + [Alberto Contreras] + - Fix Oracle DS not setting subnet when using IMDS (#1735) (LP: #1989686) + - testing: focal lxd datasource discovery (#1734) + - cc_ubuntu_advantage: Redact token from logs (#1726) [Alberto Contreras] + - docs: make sure echo properly evaluates the string (#1733) [Mina Galić] + - net: set dhclient lease and pid files (#1715) + - cli: status machine-readable output --format yaml/json (#1663) + (LP: #1883122) + - tests: Simplify does_not_raise (#1731) [Alberto Contreras] + - Refactor: Drop inheritance from object (#1728) [Alberto Contreras] + - testing: LXD datasource now supported on Focal (#1732) + - Allow jinja templating in /etc/cloud (SC-1170) (#1722) (LP: #1913461) + - sources/azure: ensure instance id is always correct (#1727) + [Chris Patterson] + - azure: define new attribute for pre-22.3 pickles (#1725) + - doc: main page Diátaxis rewording (SC-967) (#1701) + - ubuntu advantage: improved idempotency, enable list is now strict + [Fabian Lichtenegger-Lukas] + - test: bump pycloudlib (#1724) [Alberto Contreras] + - cloud.cfg.tmpl: make sure "centos" settings are identical to "rhel" + (#1639) [Emanuele Giuseppe Esposito] + - lxd: fetch 1.0/devices content (#1712) [Alberto Contreras] + - Update docs according to ad8f406a (#1719) + - testing: Port unittests/analyze to pytest (#1708) [Alberto Contreras] + - doc: Fix rtd builds. (#1718) [Alberto Contreras] + - testing: fully mock noexec calls (#1717) [Alberto Contreras] + - typing: Add types to cc_.handle (#1700) [Alberto Contreras] + - Identify 3DS Outscale Datasource as Ec2 (#1686) [Maxime Dufour] + - config: enable bootstrapping pip in ansible (#1707) + - Fix cc_chef typing issue (#1716) + - Refactor instance json files to use Paths (SC-1238) (#1709) + - tools: read-version check GITHUB_REF and git branch --show-current + (#1677) + - net: Ensure a tmp with exec permissions for dhcp (#1690) + [Alberto Contreras] (LP: #1962343) + - testing: Fix test regression in test_combined (#1713) [Alberto Contreras] + - Identify Huawei Cloud as OpenStack (#1689) [huang xinjie] + - doc: add reporting suggestion to FAQ (SC-1236) (#1698) + +22.3.4 + - Fix Oracle DS primary interface when using IMDS (LP: #1989686) + +22.3.3 + - Fix Oracle DS not setting subnet when using IMDS (LP: #1989686) + +22.3.2 + - azure: define new attribute for pre-22.3 pickles (#1725) + - sources/azure: ensure instance id is always correct (#1727) + +22.3.1 + - Fix v2 interface matching when no MAC (LP: #1986551) + - test: reduce number of network dependencies in flaky test (#1702) + - docs: publish cc_ubuntu_autoinstall docs to rtd (#1696) + - net: Fix EphemeraIPNetwork (#1697) [Alberto Contreras] + - test: make ansible test work across older versions (#1691) + - Networkd multi-address support/fix (#1685) [Teodor Garzdin] + - make: drop broken targets (#1688) + - net: Passthough v2 netconfigs in netplan systems (#1650) + [Alberto Contreras] (LP: #1978543) + - NM ipv6 connection does not work on Azure and Openstack (#1616) + [Emanuele Giuseppe Esposito] + - Fix check_format_tip (#1679) [Alberto Contreras] + - DataSourceVMware: fix var use before init (#1674) + [Andrew Kutz] (LP: #1987005) + - rpm/copr: ensure RPM represents new clean.d dir artifacts (#1680) + - test: avoid centos leaked check of /etc/yum.repos.d/epel-testing.repo + (#1676) + +22.3 + - sources: obj.pkl cache should be written anyime get_data is run (#1669) + - schema: drop release number from version file (#1664) + - pycloudlib: bump to quiet azure HTTP info logs (#1668) + - test: fix wireguard integration tests (#1666) + - Github is deprecating the 18.04 runner starting 12.1 (#1665) + - integration tests: Ensure one setup for all tests (#1661) + - tests: ansible test fixes (#1660) + - Prevent concurrency issue in test_webhook_hander.py (#1658) + - Workaround net_setup_link race with udev (#1655) (LP: #1983516) + - test: drop erroneous lxd assertion, verify command succeeded (#1657) + - Fix Chrony usage on Centos Stream (#1648) [Sven Haardiek] (LP: #1885952) + - sources/azure: handle network unreachable errors for savable PPS (#1642) + [Chris Patterson] + - Return cc_set_hostname to PER_INSTANCE frequency (#1651) (LP: #1983811) + - test: Collect integration test time by default (#1638) + - test: Drop forced package install hack in lxd integration test (#1649) + - schema: Resolve user-data if --system given (#1644) + [Alberto Contreras] (LP: #1983306) + - test: use fake filesystem to avoid file removal (#1647) + [Alberto Contreras] + - tox: Fix tip-flake8 and tip-mypy (#1635) [Alberto Contreras] + - config: Add wireguard config module (#1570) [Fabian Lichtenegger-Lukas] + - tests: can run without azure-cli, tests expect inactive ansible (#1643) + - typing: Type UrlResponse.contents (#1633) [Alberto Contreras] + - testing: fix references to `DEPRECATED.` (#1641) [Alberto Contreras] + - ssh_util: Handle sshd_config.d folder [Alberto Contreras] (LP: #1968873) + - schema: Enable deprecations in cc_update_etc_hosts (#1631) + [Alberto Contreras] + - Add Ansible Config Module (#1579) + - util: Support Idle process state in get_proc_ppid() (#1637) + - schema: Enable deprecations in cc_growpart (#1628) [Alberto Contreras] + - schema: Enable deprecations in cc_users_groups (#1627) + [Alberto Contreras] + - util: Fix error path and parsing in get_proc_ppid() + - main: avoid downloading full contents cmdline urls (#1606) + [Alberto Contreras] (LP: #1937319) + - schema: Enable deprecations in cc_scripts_vendor (#1629) + [Alberto Contreras] + - schema: Enable deprecations in cc_set_passwords (#1630) + [Alberto Contreras] + - sources/azure: add experimental support for preprovisioned os disks + (#1622) [Chris Patterson] + - Remove configobj a_to_u calls (#1632) [Stefano Rivera] + - cc_debug: Drop this module (#1614) [Alberto Contreras] + - schema: add aggregate descriptions in anyOf/oneOf (#1636) + - testing: migrate test_sshutil to pytest (#1617) [Alberto Contreras] + - testing: Fix test_ca_certs integration test (#1626) [Alberto Contreras] + - testing: add support for pycloudlib's pro images (#1604) + [Alberto Contreras] + - testing: migrate test_cc_set_passwords to pytest (#1615) + [Alberto Contreras] + - network: add system_info network activator cloud.cfg overrides (#1619) + (LP: #1958377) + - docs: Align git remotes with uss-tableflip setup (#1624) + [Alberto Contreras] + - testing: cover active config module checks (#1609) [Alberto Contreras] + - lxd: lvm avoid thinpool when kernel module absent + - lxd: enable MTU configuration in cloud-init + - doc: pin doc8 to last passing version + - cc_set_passwords fixes (#1590) + - Modernise importer.py and type ModuleDetails (#1605) [Alberto Contreras] + - config: Def activate_by_schema_keys for t-z (#1613) [Alberto Contreras] + - config: define activate_by_schema_keys for p-r mods (#1611) + [Alberto Contreras] + - clean: add param to remove /etc/machine-id for golden image creation + - config: define `activate_by_schema_keys` for a-f mods (#1608) + [Alberto Contreras] + - config: define activate_by_schema_keys for s mods (#1612) + [Alberto Contreras] + - sources/azure: reorganize tests for network config (#1586) + [Chris Patterson] + - config: Define activate_by_schema_keys for g-n mods (#1610) + [Alberto Contreras] + - meta-schema: add infra to skip inapplicable modules [Alberto Contreras] + - sources/azure: don't set cfg["password"] for default user pw (#1592) + [Chris Patterson] + - schema: activate grub-dpkg deprecations (#1600) [Alberto Contreras] + - docs: clarify user password purposes (#1593) + - cc_lxd: Add btrfs and lvm lxd storage options (SC-1026) (#1585) + - archlinux: Fix distro naming[1] (#1601) [Kristian Klausen] + - cc_ubuntu_autoinstall: support live-installer autoinstall config + - clean: allow third party cleanup scripts in /etc/cloud/clean.d (#1581) + - sources/azure: refactor chassis asset tag handling (#1574) + [Chris Patterson] + - Add "netcho" as contributor (#1591) [Kaloyan Kotlarski] + - testing: drop impish support (#1596) [Alberto Contreras] + - black: fix missed formatting issue which landed in main (#1594) + - bsd: Don't assume that root user is in root group (#1587) + - docs: Fix comment typo regarding use of packages (#1582) + [Peter Mescalchin] + - Update govc command in VMWare walkthrough (#1576) [manioo8] + - Update .github-cla-signers (#1588) [Daniel Mullins] + - Rename the openmandriva user to omv (#1575) [Bernhard Rosenkraenzer] + - sources/azure: increase read-timeout to 60 seconds for wireserver + (#1571) [Chris Patterson] + - Resource leak cleanup (#1556) + - testing: remove appereances of FakeCloud (#1584) [Alberto Contreras] + - Fix expire passwords for hashed passwords (#1577) + [Sadegh Hayeri] (LP: #1979065) + - mounts: fix suggested_swapsize for > 64GB hosts (#1569) [Steven Stallion] + - Update chpasswd schema to deprecate password parsing (#1517) + - tox: Remove entries from default envlist (#1578) (LP: #1980854) + - tests: add test for parsing static dns for existing devices (#1557) + [Jonas Konrad] + - testing: port cc_ubuntu_advantage test to pytest (#1559) + [Alberto Contreras] + - Schema deprecation handling (#1549) [Alberto Contreras] + - Enable pytest to run in parallel (#1568) + - sources/azure: refactor ovf-env.xml parsing (#1550) [Chris Patterson] + - schema: Force stricter validation (#1547) + - ubuntu advantage config: http_proxy, https_proxy (#1512) + [Fabian Lichtenegger-Lukas] + - net: fix interface matching support (#1552) (LP: #1979877) + - Fuzz testing jsonchema (#1499) [Alberto Contreras] + - testing: Wait for changed boot-id in test_status.py (#1548) + - CI: Fix GH pinned-format jobs (#1558) [Alberto Contreras] + - Typo fix (#1560) [Jaime Hablutzel] + - tests: mock dns lookup that causes long timeouts (#1555) + - tox: add unpinned env for do_format and check_format (#1554) + - cc_ssh_import_id: Substitute deprecated warn (#1553) [Alberto Contreras] + - Remove schema errors from log (#1551) (LP: #1978422) (CVE-2022-2084) + - Update WebHookHandler to run as background thread (SC-456) (#1491) + (LP: #1910552) + - testing: Don't run custom cloud dir test on Bionic (#1542) + - bash completion: update schema command (#1543) (LP: #1979547) + - CI: add non-blocking run against the linters tip versions (#1531) + [Paride Legovini] + - Change groups within the users schema to support lists and strings + (#1545) [RedKrieg] + - make it clear which username should go in the contributing doc (#1546) + - Pin setuptools for Travis (SC-1136) (#1540) + - Fix LXD datasource crawl when BOOT enabled (#1537) + - testing: Fix wrong path in dual stack test (#1538) + - cloud-config: honor cloud_dir setting (#1523) + [Alberto Contreras] (LP: #1976564) + - Add python3-debconf to pkg-deps.json Build-Depends (#1535) + [Alberto Contreras] + - redhat spec: udev/rules.d lives under /usr/lib on rhel-based systems + (#1536) + - tests/azure: add test coverage for DisableSshPasswordAuthentication + (#1534) [Chris Patterson] + - summary: Add david-caro to the cla signers (#1527) [David Caro] + - Add support for OpenMandriva (https://openmandriva.org/) (#1520) + [Bernhard Rosenkraenzer] + - tests/azure: refactor ovf creation (#1533) [Chris Patterson] + - Improve DataSourceOVF error reporting when script disabled (#1525) [rong] + - tox: integration-tests-jenkins: softfail if only some test failed + (#1528) [Paride Legovini] + - CI: drop linters from Travis CI (moved to GH Actions) (#1530) + [Paride Legovini] + - sources/azure: remove unused encoding support for customdata (#1526) + [Chris Patterson] + - sources/azure: remove unused metadata captured when parsing ovf (#1524) + [Chris Patterson] + - sources/azure: remove dscfg parsing from ovf-env.xml (#1522) + [Chris Patterson] + - Remove extra space from ec2 dual stack crawl message (#1521) + - tests/azure: use namespaces in generated ovf-env.xml documents (#1519) + [Chris Patterson] + - setup.py: adjust udev/rules default path (#1513) + [Emanuele Giuseppe Esposito] + - Add python3-deconf dependency (#1506) [Alberto Contreras] + - Change match macadress param for network v2 config (#1518) + [Henrique Caricatti Capozzi] + - sources/azure: remove unused userdata property from ovf (#1516) + [Chris Patterson] + - sources/azure: minor refactoring to network config generation (#1497) + [Chris Patterson] + - net: Implement link-local ephemeral ipv6 + - Rename function to avoid confusion (#1501) + - Fix cc_phone_home requiring 'tries' (#1500) (LP: #1977952) + - datasources: replace networking functions with stdlib and cloudinit.net + code + - Remove xenial references (#1472) [Alberto Contreras] + - Oracle ds changes (#1474) [Alberto Contreras] (LP: #1967942) + - improve runcmd docs (#1498) + - add 3.11-dev to Travis CI (#1493) + - Only run github actions on pull request (#1496) + - Fix integration test client creation (#1494) [Alberto Contreras] + - tox: add link checker environment, fix links (#1480) + - cc_ubuntu_advantage: Fix doc (#1487) [Alberto Contreras] + - cc_yum_add_repo: Fix repo id canonicalization (#1489) + [Alberto Contreras] (LP: #1975818) + - Add linitio as contributor in the project (#1488) [Kevin Allioli] + - net-convert: use yaml.dump for debugging python NetworkState obj (#1484) + (LP: #1975907) + - test_schema: no relative $ref URLs, replace $ref with local path (#1486) + - cc_set_hostname: do not write "localhost" when no hostname is given + (#1453) [Emanuele Giuseppe Esposito] + - Update .github-cla-signers (#1478) [rong] + - schema: write_files defaults, versions $ref full URL and add vscode + (#1479) + - docs: fix external links, add one more to the list (#1477) + - doc: Document how to change module frequency (#1481) + - tests: bump pycloudlib (#1482) + - tests: bump pycloudlib pinned commit for kinetic Azure (#1476) + - testing: fix test_status.py (#1475) + - integration tests: If KEEP_INSTANCE = True, log IP (#1473) + - Drop mypy excluded files (#1454) [Alberto Contreras] + - Docs additions (#1470) + - Add "formatting tests" to Github Actions + - Remove unused arguments in function signature (#1471) + - Changelog: correct errant classification of LP issues as GH (#1464) + - Use Network-Manager and Netplan as default renderers for RHEL and Fedora + (#1465) [Emanuele Giuseppe Esposito] + +22.2 + - Fix test due to caplog incompatibility (#1461) [Alberto Contreras] + - Align rhel custom files with upstream (#1431) + [Emanuele Giuseppe Esposito] + - cc_write_files: Improve schema. (#1460) [Alberto Contreras] + - cli: Redact files with permission errors in commands (#1440) + [Alberto Contreras] (LP: #1953430) + - Improve cc_set_passwords. (#1456) [Alberto Contreras] + - testing: make fake cloud-init wait actually wait (#1459) + - Scaleway: Fix network configuration for netplan 0.102 and later (#1455) + [Maxime Corbin] + - Fix 'ephmeral' typos in disk names(#1452) [Mike Hucka] + - schema: version schema-cloud-config-v1.json (#1424) + - cc_modules: set default meta frequency value when no config available + (#1457) + - Log generic warning on non-systemd systems. (#1450) [Alberto Contreras] + - cc_snap.maybe_install_squashfuse no longer needed in Bionic++. (#1448) + [Alberto Contreras] + - Drop support of *-sk keys in cc_ssh (#1451) [Alberto Contreras] + - testing: Fix console_log tests (#1437) + - tests: cc_set_passoword update for systemd, non-systemd distros (#1449) + - Fix bug in url_helper/dual_stack() logging (#1426) + - schema: render schema paths from _CustomSafeLoaderWithMarks (#1391) + - testing: Make integration tests kinetic friendly (#1441) + - Handle error if SSH service no present. (#1422) + [Alberto Contreras] (LP: #1969526) + - Fix network-manager activator availability and order (#1438) + - sources/azure: remove reprovisioning marker (#1414) [Chris Patterson] + - upstart: drop vestigial support for upstart (#1421) + - testing: Ensure NoCloud detected in test (#1439) + - Update .github-cla-signers kallioli [Kevin Allioli] + - Consistently strip top-level network key (#1417) (LP: #1906187) + - testing: Fix LXD VM metadata test (#1430) + - testing: Add NoCloud setup for NoCloud test (#1425) + - Update linters and adapt code for compatibility (#1434) [Paride Legovini] + - run-container: add support for LXD VMs (#1428) [Paride Legovini] + - integration-reqs: bump pycloudlib pinned commit (#1427) [Paride Legovini] + - Fix NoCloud docs (#1423) + - Docs fixes (#1406) + - docs: Add docs for module creation (#1415) + - Remove cheetah from templater (#1416) + - tests: verify_ordered_items fallback to re.escape if needed (#1420) + - Misc module cleanup (#1418) + - docs: Fix doc warnings and enable errors (#1419) + [Alberto Contreras] (LP: #1876341) + - Refactor cloudinit.sources.NetworkConfigSource to enum (#1413) + [Alberto Contreras] (LP: #1874875) + - Don't fail if IB and Ethernet devices 'collide' (#1411) + - Use cc_* module meta defintion over hardcoded vars (SC-888) (#1385) + - Fix cc_rsyslog.py initialization (#1404) [Alberto Contreras] + - Promote cloud-init schema from devel to top level subcommand (#1402) + - mypy: disable missing imports warning for httpretty (#1412) + [Chris Patterson] + - users: error when home should not be created AND ssh keys provided + [Jeffrey 'jf' Lim] + - Allow growpart to resize encrypted partitions (#1316) + - Fix typo in integration_test.rst (#1405) [Alberto Contreras] + - cloudinit.net refactor: apply_network_config_names (#1388) + [Alberto Contreras] (LP: #1884602) + - tests/azure: add fixtures for hardcoded paths (markers and data_dir) + (#1399) [Chris Patterson] + - testing: Add responses workaround for focal/impish (#1403) + - cc_ssh_import_id: fix is_key_in_nested_dict to avoid early False + - Fix ds-identify not detecting NoCloud seed in config (#1381) + (LP: #1876375) + - sources/azure: retry dhcp for failed processes (#1401) [Chris Patterson] + - Move notes about refactorization out of CONTRIBUTING.rst (#1389) + - Shave ~8ms off generator runtime (#1387) + - Fix provisioning dhcp timeout to 20 minutes (#1394) [Chris Patterson] + - schema: module example strict testing fix seed_random + - cc_set_hostname: examples small typo (perserve vs preserve) + [Wouter Schoot] + - sources/azure: refactor http_with_retries to remove **kwargs (#1392) + [Chris Patterson] + - declare dependency on ssh-import-id (#1334) + - drop references to old dependencies and old centos script + - sources/azure: only wait for primary nic to be attached during restore + (#1378) [Anh Vo] + - cc_ntp: migrated legacy schema to cloud-init-schema.json (#1384) + - Network functions refactor and bugfixes (#1383) + - schema: add JSON defs for modules cc_users_groups (#1379) + (LP: #1858930) + - Fix doc typo (#1382) [Alberto Contreras] + - Add support for dual stack IPv6/IPv4 IMDS to Ec2 (#1160) + - Fix KeyError when rendering sysconfig IPv6 routes (#1380) (LP: #1958506) + - Return a namedtuple from subp() (#1376) + - Mypy stubs and other tox maintenance (SC-920) (#1374) + - Distro Compatibility Fixes (#1375) + - Pull in Gentoo patches (#1372) + - schema: add json defs for modules U-Z (#1360) + (LP: #1858928, #1858929, #1858931, #1858932) + - util: atomically update sym links to avoid Suppress FileNotFoundError + when reading status (#1298) [Adam Collard] (LP: #1962150) + - schema: add json defs for modules scripts-timezone (SC-801) (#1365) + - docs: Add first tutorial (SC-900) (#1368) + - BUG 1473527: module ssh-authkey-fingerprints fails Input/output error… + (#1340) [Andrew Lee] (LP: #1473527) + - add arch hosts template (#1371) + - ds-identify: detect LXD for VMs launched from host with > 5.10 kernel + (#1370) (LP: #1968085) + - Support EC2 tags in instance metadata (#1309) [Eduardo Dobay] + - schema: add json defs for modules e-install (SC-651) (#1366) + - Improve "(no_create_home|system): true" test (#1367) [Jeffrey 'jf' Lim] + - Expose https_proxy env variable to ssh-import-id cmd (#1333) + [Michael Rommel] + - sources/azure: remove bind/unbind logic for hot attached nic (#1332) + [Chris Patterson] + - tox: add types-* packages to check_format env (#1362) + - tests: python 3.10 is showing up in cloudimages (#1364) + - testing: add additional mocks to test_net tests (#1356) [yangzz-97] + - schema: add JSON schema for mcollective, migrator and mounts modules + (#1358) + - Honor system locale for RHEL (#1355) [Wei Shi] + - doc: Fix typo in cloud-config-run-cmds.txt example (#1359) [Ali Shirvani] + - ds-identify: also discover LXD by presence from DMI board_name = LXD + (#1311) + - black: bump pinned version to 22.3.0 to avoid click dependency issues + (#1357) + - Various doc fixes (#1330) + - testing: Add missing is_FreeBSD mock to networking test (#1353) + - Add --no-update to add-apt-repostory call (SC-880) (#1337) + - schema: add json defs for modules K-L (#1321) + (LP: #1858899, #1858900, #1858901, #1858902) + - docs: Re-order readthedocs install (#1354) + - Stop cc_ssh_authkey_fingerprints from ALWAYS creating home (#1343) + [Jeffrey 'jf' Lim] + - docs: add jinja2 pin (#1352) + - Vultr: Use find_candidate_nics, use ipv6 dns (#1344) [eb3095] + - sources/azure: move get_ip_from_lease_value out of shim (#1324) + [Chris Patterson] + - Fix cloud-init status --wait when no datasource found (#1349) + (LP: #1966085) + - schema: add JSON defs for modules resize-salt (SC-654) (#1341) + - Add myself as a future contributor (#1345) [Neal Gompa (ニール・ゴンパ)] + - Update .github-cla-signers (#1342) [Jeffrey 'jf' Lim] + - add Requires=cloud-init-hotplugd.socket in cloud-init-hotplugd.service + file (#1335) [yangzz-97] + - Fix sysconfig render when set-name is missing (#1327) + [Andrew Kutz] (LP: #1855945) + - Refactoring helper funcs out of NetworkState (#1336) [Andrew Kutz] + - url_helper: add tuple support for readurl timeout (#1328) + [Chris Patterson] + - Make fs labels match for ds-identify and docs (#1329) + - Work around bug in LXD VM detection (#1325) + - Remove redundant generator logs (#1318) + - tox: set verbose flags for integration tests (#1323) [Chris Patterson] + - net: introduce find_candidate_nics() (#1313) [Chris Patterson] + - Revert "Ensure system_cfg read before ds net config on Oracle (#1174)" + (#1326) + - Add vendor_data2 support for ConfigDrive source (#1307) [cvstealth] + - Make VMWare data source test host independent and expand testing (#1308) + [Robert Schweikert] + - Add json schemas for modules starting with P + - sources/azure: remove lease file parsing (#1302) [Chris Patterson] + - remove flaky test from ci (#1322) + - ci: Switch to python 3.10 in Travis CI (#1320) + - Better interface handling for Vultr, expect unexpected DHCP servers + (#1297) [eb3095] + - Remove unused init local artifact (#1315) + - Doc cleanups (#1317) + - docs improvements (#1312) + - add support for jinja do statements, add unit test (#1314) + [Paul Bruno] (LP: #1962759) + - sources/azure: prevent tight loops for DHCP retries (#1285) + [Chris Patterson] + - net/dhcp: surface type of DHCP lease failure to caller (#1276) + [Chris Patterson] + - Stop hardcoding systemctl location (#1278) [Robert Schweikert] + - Remove python2 syntax from docs (#1310) + - [tools/migrate-lp-user-to-github] Rename master branch to main (#1301) + [Adam Collard] + - redhat: Depend on "hostname" package (#1288) [Lubomir Rintel] + - Add native NetworkManager support (#1224) [Lubomir Rintel] + - Fix link in CLA check to point to contribution guide. (#1299) + [Adam Collard] + - check for existing symlink while force creating symlink (#1281) + [Shreenidhi Shedi] + - Do not silently ignore integer uid (#1280) (LP: #1875772) + - tests: create a IPv4/IPv6 VPC in Ec2 integration tests (#1291) + - Integration test fix ppa (#1296) + - tests: on official EC2. cloud-id actually startswith aws not ec2 (#1289) + - test_ppa_source: accept both http and https URLs (#1292) + [Paride Legovini] + - Fix apt test on azure + - add "lkundrak" as contributor [Lubomir Rintel] + - Holmanb/integration test fix ppa (#1287) + - Include missing subcommand in manpage (#1279) + - Clean up artifacts from pytest, packaging, release with make clean + (#1277) + - sources/azure: ensure retries on IMDS request failure (#1271) + [Chris Patterson] + - sources/azure: removed unused savable PPS paths (#1268) [Chris Patterson] + - integration tests: fix Azure failures (#1269) + +22.1 + - sources/azure: report ready in local phase (#1265) [Chris Patterson] + - sources/azure: validate IMDS network configuration metadata (#1257) + [Chris Patterson] + - docs: Add more details to runcmd docs (#1266) + - use PEP 589 syntax for TypeDict (#1253) + - mypy: introduce type checking (#1254) [Chris Patterson] + - Fix extra ipv6 issues, code reduction and simplification (#1243) [eb3095] + - tests: when generating crypted password, generate in target env (#1252) + - sources/azure: address mypy/pyright typing complaints (#1245) + [Chris Patterson] + - Docs for x-shellscript* userdata (#1260) + - test_apt_security: azure platform has specific security URL overrides + (#1263) + - tests: lsblk --json output changes mountpoint key to mountpoinst [] + (#1261) + - mounts: fix mount opts string for ephemeral disk (#1250) + [Chris Patterson] + - Shell script handlers by freq (#1166) [Chris Lalos] + - minor improvements to documentation (#1259) [Mark Esler] + - cloud-id: publish /run/cloud-init/cloud-id- files (#1244) + - add "eslerm" as contributor (#1258) [Mark Esler] + - sources/azure: refactor ssh key handling (#1248) [Chris Patterson] + - bump pycloudlib (#1256) + - sources/hetzner: Use EphemeralDHCPv4 instead of static configuration + (#1251) [Markus Schade] + - bump pycloudlib version (#1255) + - Fix IPv6 netmask format for sysconfig (#1215) [Harald] (LP: #1959148) + - sources/azure: drop debug print (#1249) [Chris Patterson] + - tests: do not check instance.pull_file().ok() (#1246) + - sources/azure: consolidate ephemeral DHCP configuration (#1229) + [Chris Patterson] + - cc_salt_minion freebsd fix for rc.conf (#1236) + - sources/azure: fix metadata check in _check_if_nic_is_primary() (#1232) + [Chris Patterson] + - Add _netdev option to mount Azure ephemeral disk (#1213) [Eduardo Otubo] + - testing: stop universally overwriting /etc/cloud/cloud.cfg.d (#1237) + - Integration test changes (#1240) + - Fix Gentoo Locales (#1205) + - Add "slingamn" as contributor (#1235) [Shivaram Lingamneni] + - integration: do not LXD bind mount /etc/cloud/cloud.cfg.d (#1234) + - Integration testing docs and refactor (#1231) + - vultr: Return metadata immediately when found (#1233) [eb3095] + - spell check docs with spellintian (#1223) + - docs: include upstream python version info (#1230) + - Schema a d (#1211) + - Move LXD to end ds-identify DSLIST (#1228) (LP: #1959118) + - fix parallel tox execution (#1214) + - sources/azure: refactor _report_ready_if_needed and _poll_imds (#1222) + [Chris Patterson] + - Do not support setting up archive.canonical.com as a source (#1219) + [Steve Langasek] (LP: #1959343) + - Vultr: Fix lo being used for DHCP, try next on cmd fail (#1208) [eb3095] + - sources/azure: refactor _should_reprovision[_after_nic_attach]() logic + (#1206) [Chris Patterson] + - update ssh logs to show ssh private key gens pub and simplify code + (#1221) [Steve Weber] + - Remove mitechie from stale PR github action (#1217) + - Include POST format in cc_phone_home docs (#1218) (LP: #1959149) + - Add json parsing of ip addr show (SC-723) (#1210) + - cc_rsyslog: fix typo in docstring (#1207) [Louis Sautier] + - Update .github-cla-signers (#1204) [Chris Lalos] + - sources/azure: drop unused case in _report_failure() (#1200) + [Chris Patterson] + - sources/azure: always initialize _ephemeral_dhcp_ctx on unpickle (#1199) + [Chris Patterson] + - Add support for gentoo templates and cloud.cfg (#1179) [vteratipally] + - sources/azure: unpack ret tuple in crawl_metadata() (#1194) + [Chris Patterson] + - tests: focal caplog has whitespace indentation for multi-line logs + (#1201) + - Seek interfaces, skip dummy interface, fix region codes (#1192) [eb3095] + - integration: test against the Ubuntu daily images (#1198) + [Paride Legovini] + - cmd: status and cloud-id avoid change in behavior for 'not run' (#1197) + - tox: pass PYCLOUDLIB_* env vars into integration tests when present + (#1196) + - sources/azure: set ovf_is_accessible when OVF is read successfully + (#1193) [Chris Patterson] + - Enable OVF environment transport via ISO in example (#1195) [Megian] + - sources/azure: consolidate DHCP variants to EphemeralDHCPv4WithReporting + (#1190) [Chris Patterson] + - Single JSON schema validation in early boot (#1175) + - Add DatasourceOVF network-config propery to Ubuntu OVF example (#1184) + [Megian] + - testing: support pycloudlib config file (#1189) + - Ensure system_cfg read before ds net config on Oracle (SC-720) (#1174) + (LP: #1956788) + - Test Optimization Proposal (SC-736) (#1188) + - cli: cloud-id report not-run or disabled state as cloud-id (#1162) + - Remove distutils usage (#1177) [Shreenidhi Shedi] + - add .python-version to gitignore (#1186) + - print error if datasource import fails (#1170) + [Emanuele Giuseppe Esposito] + - Add new config module to set keyboard layout (#1176) + [maxnet] (LP: #1951593) + - sources/azure: rename metadata_type -> MetadataType (#1181) + [Chris Patterson] + - Remove 3.5 and xenial support (SC-711) (#1167) + - tests: mock LXD datasource detection in ds-identify on LXD containers + (#1178) + - pylint: silence errors on compat code for old jsonschema (#1172) + [Paride Legovini] + - testing: Add 3.10 Test Coverage (#1173) + - Remove unittests from integration test job in travis (#1141) + - Don't throw exceptions for empty cloud config (#1130) + - bsd/resolv.d/ avoid duplicated entries (#1163) [Gonéri Le Bouder] + - sources/azure: do not persist failed_desired_api_version flag (#1159) + [Chris Patterson] + - Update cc_ubuntu_advantage calls to assume-yes (#1158) + [John Chittum] (LP: #1954842) + - openbsd: properly restart the network on 7.0 (#1150) [Gonéri Le Bouder] + - Add .git-blame-ignore-revs (#1161) + - Adopt Black and isort (SC-700) (#1157) + - Include dpkg frontend lock in APT_LOCK_FILES (#1153) + - tests/cmd/query: fix test run as root and add coverage for defaults + (#1156) [Chris Patterson] (LP: #1825027) + - Schema processing changes (SC-676) (#1144) + - Add dependency workaround for impish in bddeb (#1148) + - netbsd: install new dep packages (#1151) [Gonéri Le Bouder] + - find_devs_with_openbsd: ensure we return the last entry (#1149) + [Gonéri Le Bouder] + - sources/azure: remove unnecessary hostname bounce (#1143) + [Chris Patterson] + - find_devs/openbsd: accept ISO on disk (#1132) + [Gonéri Le Bouder] + - Improve error log message when mount failed (#1140) [Ksenija Stanojevic] + - add KsenijaS as a contributor (#1145) [Ksenija Stanojevic] + - travis - don't run integration tests if no deb (#1139) + - factor out function for getting top level directory of cloudinit (#1136) + - testing: Add deterministic test id (#1138) + - mock sleep() in azure test (#1137) + - Add miraclelinux support (#1128) [Haruki TSURUMOTO] + - docs: Make MACs lowercase in network config (#1135) (LP: #1876941) + - Add Strict Metaschema Validation (#1101) + - update dead link (#1133) + - cloudinit/net: handle two different routes for the same ip (#1124) + [Emanuele Giuseppe Esposito] + - docs: pin mistune dependency (#1134) + - Reorganize unit test locations under tests/unittests (#1126) + - Fix exception when no activator found (#1129) (LP: #1948681) + - jinja: provide and document jinja-safe key aliases in instance-data + (SC-622) (#1123) + - testing: Remove date from final_message test (SC-638) (#1127) + - Move GCE metadata fetch to init-local (SC-502) (#1122) + - Fix missing metadata routes for vultr (#1125) [eb3095] + - cc_ssh_authkey_fingerprints.py: prevent duplicate messages on console + (#1081) [dermotbradley] + - sources/azure: remove unused remnants related to agent command (#1119) + [Chris Patterson] + - github: update PR template's contributing URL (#1120) [Chris Patterson] + - docs: Rename HACKING.rst to CONTRIBUTING.rst (#1118) + - testing: monkeypatch system_info call in unit tests (SC-533) (#1117) + - Fix Vultr timeout and wait values (#1113) [eb3095] + - lxd: add preference for LXD cloud-init.* config keys over user keys + (#1108) + - VMware: source /etc/network/interfaces.d/* on Debian + [chengcheng-chcheng] (LP: #1950136) + - Add cjp256 as contributor (#1109) [Chris Patterson] + - integration_tests: Ensure log directory exists before symlinking to it + (#1110) + - testing: add growpart integration test (#1104) + - integration_test: Speed up CI run time (#1111) + - Some miscellaneous integration test fixes (SC-606) (#1103) + - tests: specialize lxd_discovery test for lxd_vm vendordata (#1106) + - Add convenience symlink to integration test output (#1105) + - Fix for set-name bug in networkd renderer (#1100) + [Andrew Kutz] (LP: #1949407) + - Wait for apt lock (#1034) (LP: #1944611) + - testing: stop chef test from running on openstack (#1102) + - alpine.py: add options to the apk upgrade command (#1089) [dermotbradley] + 21.4 - Azure: fallback nic needs to be reevaluated during reprovisioning (#1094) [Anh Vo] @@ -2442,7 +5291,7 @@ - support network rendering to sysconfig (for centos and RHEL) - write_files: if no permissions are given, just use default without warn. - user_data: fix error when user-data is not utf-8 decodable (LP: #1532072) - - fix mcollective module with python3 (LP: #1597699) [Sergii Golovatiuk] + - fix mcollective module with python3 (LP: #1597699) [Sergii Golovatiuk] 0.7.6: - open 0.7.6 @@ -2567,7 +5416,7 @@ filesystems. Useful if attached disks are not formatted (LP: #1218506) - Fix usage of libselinux-python when selinux is disabled. [Garrett Holmstrom] - multi_log: only write to /dev/console if it exists [Garrett Holmstrom] - - config/cloud.cfg: add 'sudo' to list groups for the default user + - config/cloud.cfg: add 'sudo' to list groups for the default user (LP: #1228228) - documentation fix for use of 'mkpasswd' [Eric Nordlund] - respect /etc/growroot-disabled file (LP: #1234331) @@ -2633,7 +5482,7 @@ can be more useful. 0.7.1: - - sysvinit: fix missing dependency in cloud-init job for RHEL 5.6 + - sysvinit: fix missing dependency in cloud-init job for RHEL 5.6 - config-drive: map hostname to local-hostname (LP: #1061964) - landscape: install landscape-client package if not installed. only take action if cloud-config is present (LP: #1066115) @@ -2682,14 +5531,14 @@ 0.7.0: - add a 'exception_cb' argument to 'wait_for_url'. If provided, this method will be called back with the exception received and the message. - - utilize the 'exception_cb' above to modify the oauth timestamp in + - utilize the 'exception_cb' above to modify the oauth timestamp in DataSourceMAAS requests if a 401 or 403 is received. (LP: #978127) - catch signals and exit rather than stack tracing - if logging fails, enable a fallback logger by patching the logging module - do not 'start networking' in cloud-init-nonet, but add cloud-init-container job that runs only if in container and emits net-device-added (LP: #1031065) - - search only top level dns for 'instance-data' in + - search only top level dns for 'instance-data' in DataSourceEc2 (LP: #1040200) - add support for config-drive-v2 (LP:#1037567) - support creating users, including the default user. @@ -2727,10 +5576,10 @@ reduces reuse and limits future functionality, and makes testing harder) - removal of global config that defined paths, shared config, now this is via objects making unit testing testing and global side-effects a non issue - - creation of a 'helpers.py' - - this contains an abstraction for the 'lock' like objects that the various - module/handler running stages use to avoid re-running a given - module/handler for a given frequency. this makes it separated from + - creation of a 'helpers.py' + - this contains an abstraction for the 'lock' like objects that the various + module/handler running stages use to avoid re-running a given + module/handler for a given frequency. this makes it separated from the actual usage of that object (thus helpful for testing and clear lines usage and how the actual job is accomplished) - a common 'runner' class is the main entrypoint using these locks to @@ -2739,11 +5588,11 @@ - add in a 'paths' object that provides access to the previously global and/or config based paths (thus providing a single entrypoint object/type that provides path information) - - this also adds in the ability to change the path when constructing - that path 'object' and adding in additional config that can be used to + - this also adds in the ability to change the path when constructing + that path 'object' and adding in additional config that can be used to alter the root paths of 'joins' (useful for testing or possibly useful in chroots?) - - config options now avaiable that can alter the 'write_root' and the + - config options now avaiable that can alter the 'write_root' and the 'read_root' when backing code uses the paths join() function - add a config parser subclass that will automatically add unknown sections and return default values (instead of throwing exceptions for these cases) @@ -2767,7 +5616,7 @@ the passed in logger (its still passed in) - ensure that all places where exception are caught and where applicable that the util logexc() is called, so that no exceptions that may occur - are dropped without first being logged (where it makes sense for this + are dropped without first being logged (where it makes sense for this to happen) - add a 'requires' file that lists cloud-init dependencies - applying it in package creation (bdeb and brpm) as well as using it @@ -2779,12 +5628,12 @@ subp() utility method, which now has an exception type that will provide detailed information on python 2.6 and 2.7 - forced all code loading, moving, chmod, writing files and other system - level actions to go through standard set of util functions, this greatly + level actions to go through standard set of util functions, this greatly helps in debugging and determining exactly which system actions cloud-init is performing - adjust url fetching and url trying to go through a single function that reads urls in the new 'url helper' file, this helps in tracing, debugging - and knowing which urls are being called and/or posted to from with-in + and knowing which urls are being called and/or posted to from with-in cloud-init code - add in the sending of a 'User-Agent' header for all urls fetched that do not provide there own header mapping, derive this user-agent from @@ -2794,7 +5643,7 @@ and defined output that should be easier to parse than a custom format - add a set of distro specific classes, that handle distro specific actions that modules and or handler code can use as needed, this is organized into - a base abstract class with child classes that implement the shared + a base abstract class with child classes that implement the shared functionality. config determines exactly which subclass to load, so it can be easily extended as needed. - current functionality @@ -2806,16 +5655,16 @@ - interface up/down activating - implemented a debian + ubuntu subclass - implemented a redhat + fedora subclass - - adjust the root 'cloud.cfg' file to now have distrobution/path specific + - adjust the root 'cloud.cfg' file to now have distrobution/path specific configuration values in it. these special configs are merged as the normal config is, but the system level config is not passed into modules/handlers - modules/handlers must go through the path and distro object instead - - have the cloudstack datasource test the url before calling into boto to + - have the cloudstack datasource test the url before calling into boto to avoid the long wait for boto to finish retrying and finally fail when the gateway meta-data address is unavailable - add a simple mock ec2 meta-data python based http server that can serve a very simple set of ec2 meta-data back to callers - - useful for testing or for understanding what the ec2 meta-data + - useful for testing or for understanding what the ec2 meta-data service can provide in terms of data or functionality - for ssh key and authorized key file parsing add in classes and util functions that maintain the state of individual lines, allowing for a @@ -2849,7 +5698,7 @@ - use 'is None' instead of the frowned upon '== None' which picks up a large set of 'true' cases than is typically desired (ie for objects that have there own equality) - - use context managers on locks, tempdir, chdir, file, selinux, umask, + - use context managers on locks, tempdir, chdir, file, selinux, umask, unmounting commands so that these actions do not have to be closed and/or cleaned up manually in finally blocks, which is typically not done and will eventually be a bug in the future @@ -2873,7 +5722,7 @@ - place the rfc 8222 time formatting and uptime repeated pieces of code in the util module as a set of function with the name 'time_rfc2822'/'uptime' - separate the pylint+pep8 calling from one tool into two indivudal tools so - that they can be called independently, add make file sections that can be + that they can be called independently, add make file sections that can be used to call these independently - remove the support for the old style config that was previously located in '/etc/ec2-init/ec2-config.cfg', no longer supported! @@ -2884,12 +5733,12 @@ - use the new defaulting config parser (that will not raise errors on sections that do not exist or return errors when values are fetched that do not exist) in the 'puppet' module - - for config 'modules' add in the ability for the module to provide a list of + - for config 'modules' add in the ability for the module to provide a list of distro names which it is known to work with, if when ran and the distro being used name does not match one of those in this list, a warning will be written out saying that this module may not work correctly on this distrobution - - for all dynamically imported modules ensure that they are fixed up before + - for all dynamically imported modules ensure that they are fixed up before they are used by ensuring that they have certain attributes, if they do not have those attributes they will be set to a sensible set of defaults instead - adjust all 'config' modules and handlers to use the adjusted util functions @@ -2917,7 +5766,7 @@ - support setting of Acquire::HTTP::Proxy via 'apt_proxy' - DataSourceEc2: more resilliant to slow metadata service - config change: 'retries' dropped, 'max_wait' added, timeout increased - - close stdin in all cloud-init programs that are launched at boot + - close stdin in all cloud-init programs that are launched at boot (LP: #903993) - revert management of /etc/hosts to 0.6.1 style (LP: #890501, LP: #871966) - write full ssh keys to console for easy machine consumption (LP: #893400) @@ -2929,7 +5778,7 @@ in the payload parameter. (LP: #874342) - add test case framework [Mike Milner] (LP: #890851) - fix pylint warnings [Juerg Haefliger] (LP: #914739) - - add support for adding and deleting CA Certificates [Mike Milner] + - add support for adding and deleting CA Certificates [Mike Milner] (LP: #915232) - in ci-info lines, use '.' to indicate empty field for easier machine reading - support empty lines in "#include" files (LP: #923043) @@ -2943,17 +5792,17 @@ - DataSourceMaaS: add data source for Ubuntu Machines as a Service (MaaS) (LP: #942061) - DataSourceCloudStack: add support for CloudStack datasource [Cosmin Luta] - - add option 'apt_pipelining' to address issue with S3 mirrors + - add option 'apt_pipelining' to address issue with S3 mirrors (LP: #948461) [Ben Howard] - warn on non-multipart, non-handled user-data [Martin Packman] - run resizefs in the background in order to not block boot (LP: #961226) - Fix bug in Chef support where validation_key was present in config, but 'validation_cert' was not (LP: #960547) - - Provide user friendly message when an invalid locale is set + - Provide user friendly message when an invalid locale is set [Ben Howard] (LP: #859814) - Support reading cloud-config from kernel command line parameter and populating local file with it, which can then provide data for DataSources - - improve chef examples for working configurations on 11.10 and 12.04 + - improve chef examples for working configurations on 11.10 and 12.04 [Lorin Hochstein] (LP: #960564) 0.6.2: @@ -3002,7 +5851,7 @@ This was done by changing all users of util.subp to have None input unless specified - Add some debug info to the console when cloud-init runs. - This is useful if debugging, IP and route information is printed to the + This is useful if debugging, IP and route information is printed to the console. - change the mechanism for handling .ssh/authorized_keys, to update entries rather than appending. This ensures that the authorized_keys that are @@ -3064,7 +5913,7 @@ - moved upstart/cloud-run-user-script.conf to upstart/cloud-final.conf - cloud-final.conf now runs runs cloud-config modules similar to cloud-config and cloud-init. - - LP: #653271 + - LP: #653271 - added writing of "boot-finished" to /var/lib/cloud/instance/boot-finished this is the last thing done, indicating cloud-init is finished booting - writes message to console with timestamp and uptime @@ -3087,6 +5936,5 @@ - add support for reading Rightscale style user data (LP: #668400) and acting on it in cloud-config (cc_rightscale_userdata.py) - make the message on 'disable_root' more clear (LP: #672417) - - do not require public key if private is given in ssh cloud-config + - do not require public key if private is given in ssh cloud-config (LP: #648905) -# vi: syntax=text textwidth=79 diff --git a/MANIFEST.in b/MANIFEST.in index 57a85ea723d..c2d2b5dd222 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,7 +10,6 @@ graft templates graft tests graft tools graft udev -graft upstart prune build prune dist prune .tox diff --git a/Makefile b/Makefile index 0c015daea85..8f30a4af53b 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,49 @@ CWD=$(shell pwd) +VARIANT ?= ubuntu -YAML_FILES=$(shell find cloudinit tests tools -name "*.yaml" -type f ) -YAML_FILES+=$(shell find doc/examples -name "cloud-config*.txt" -type f ) +PYTHON ?= python3 -PYTHON = python3 -PIP_INSTALL := pip3 install +NUM_ITER ?= 100 -ifeq ($(distro),) - distro = redhat -endif +distro ?= redhat READ_VERSION=$(shell $(PYTHON) $(CWD)/tools/read-version || echo read-version-failed) CODE_VERSION=$(shell $(PYTHON) -c "from cloudinit import version; print(version.version_string())") +GENERATOR_F=./systemd/cloud-init-generator +DS_IDENTIFY=./tools/ds-identify +BENCHMARK=./tools/benchmark.sh all: check -check: check_version test yaml +check: test -style-check: flake8 +style-check: lint -flake8: - @$(CWD)/tools/run-flake8 +lint: + @$(CWD)/tools/run-lint unittest: clean_pyc - python3 -m pytest -v tests/unittests cloudinit + $(PYTHON) -m pytest -v tests/unittests cloudinit + +render-template: + $(PYTHON) ./tools/render-template --variant=$(VARIANT) $(FILE) $(subst .tmpl,,$(FILE)) + +# from systemd-generator(7) regarding generators: +# "We do recommend C code however, since generators are executed +# synchronously and hence delay the entire boot if they are slow." +# +# Our generator is a shell script. Make it easy to measure the +# generator. This should be monitored for performance regressions +benchmark-generator: FILE=$(GENERATOR_F).tmpl +benchmark-generator: VARIANT="benchmark" +benchmark-generator: export ITER=$(NUM_ITER) +benchmark-generator: render-template + $(BENCHMARK) $(GENERATOR_F) + +benchmark-ds-identify: export ITER=$(NUM_ITER) +benchmark-ds-identify: + $(BENCHMARK) $(DS_IDENTIFY) ci-deps-ubuntu: @$(PYTHON) $(CWD)/tools/read-dependencies --distro ubuntu --test-distro @@ -32,34 +51,44 @@ ci-deps-ubuntu: ci-deps-centos: @$(PYTHON) $(CWD)/tools/read-dependencies --distro centos --test-distro -pip-requirements: - @echo "Installing cloud-init dependencies..." - $(PIP_INSTALL) -r "$@.txt" -q - -pip-test-requirements: - @echo "Installing cloud-init test dependencies..." - $(PIP_INSTALL) -r "$@.txt" -q - test: unittest check_version: @if [ "$(READ_VERSION)" != "$(CODE_VERSION)" ]; then \ - echo "Error: read-version version '$(READ_VERSION)'" \ - "not equal to code version '$(CODE_VERSION)'"; exit 2; \ - else true; fi + echo "Error: read-version version '$(READ_VERSION)'" \ + "not equal to code version '$(CODE_VERSION)'"; \ + exit 2; \ + else true; fi config/cloud.cfg: - $(PYTHON) ./tools/render-cloudcfg config/cloud.cfg.tmpl config/cloud.cfg + $(PYTHON) ./tools/render-template --is-yaml config/cloud.cfg.tmpl config/cloud.cfg clean_pyc: @find . -type f -name "*.pyc" -delete @find . -type d -name __pycache__ -delete -clean: clean_pyc - rm -rf doc/rtd_html .tox .coverage - -yaml: - @$(PYTHON) $(CWD)/tools/validate-yaml.py $(YAML_FILES) +clean_pytest: + rm -rf .cache htmlcov + +clean_packaging: + rm -rf srpm cloud_init.egg-info/ \ + cloud-init-*.tar.gz \ + cloud-init-*.tar.gz.asc \ + cloud-init.dsc \ + cloud-init_*.build \ + cloud-init_*.buildinfo \ + cloud-init_*.changes \ + cloud-init_*.deb \ + cloud-init_*.dsc \ + cloud-init_*.orig.tar.gz \ + cloud-init_*.tar.xz \ + cloud-init_*.upload + +clean_release: + rm -rf new-upstream-changes.txt commit.msg + +clean: clean_pyc clean_pytest clean_packaging clean_release + rm -rf doc/rtd_html .tox .coverage tags $(GENERATOR_F) rpm: $(PYTHON) ./packages/brpm --distro=$(distro) @@ -70,19 +99,26 @@ srpm: deb: @which debuild || \ { echo "Missing devscripts dependency. Install with:"; \ - echo sudo apt-get install devscripts; exit 1; } + echo sudo apt-get install devscripts; exit 1; } $(PYTHON) ./packages/bddeb deb-src: @which debuild || \ { echo "Missing devscripts dependency. Install with:"; \ - echo sudo apt-get install devscripts; exit 1; } + echo sudo apt-get install devscripts; exit 1; } $(PYTHON) ./packages/bddeb -S -d doc: tox -e doc -.PHONY: test flake8 clean rpm srpm deb deb-src yaml -.PHONY: check_version pip-test-requirements pip-requirements clean_pyc -.PHONY: unittest style-check doc +fmt: + tox -e do_format && tox -e check_format + +fmt-tip: + tox -e do_format_tip && tox -e check_format_tip + + +.PHONY: all check test lint clean rpm srpm deb deb-src clean_pyc +.PHONY: unittest style-check render-template benchmark-generator +.PHONY: clean_pytest clean_packaging clean_release doc diff --git a/README.md b/README.md index e96541ef8ac..35ccd877c14 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # cloud-init -[![Build Status](https://travis-ci.com/canonical/cloud-init.svg?branch=main)](https://travis-ci.com/canonical/cloud-init) [![Read the Docs](https://readthedocs.org/projects/cloudinit/badge/?version=latest&style=flat)](https://cloudinit.readthedocs.org) +![Unit Tests](https://github.com/canonical/cloud-init/actions/workflows/unit.yml/badge.svg?branch=main) +![Integration Tests](https://github.com/canonical/cloud-init/actions/workflows/integration.yml/badge.svg?branch=main) +![Documentation](https://github.com/canonical/cloud-init/actions/workflows/check_format.yml/badge.svg?branch=main) Cloud-init is the *industry standard* multi-distribution method for cross-platform cloud instance initialization. It is supported across all @@ -22,28 +24,24 @@ instance. ## Getting help -If you need support, start with the [user documentation](https://cloudinit.readthedocs.io/en/latest/). +If you need support, start with the [user documentation](https://docs.cloud-init.io/en/latest/). If you need additional help consider reaching out with one of the following options: -- Ask a question in the [``#cloud-init`` IRC channel on Libera](https://kiwiirc.com/nextclient/irc.libera.chat/cloud-init) -- Search the cloud-init [mailing list archive](https://lists.launchpad.net/cloud-init/) -- Better yet, join the [cloud-init mailing list](https://launchpad.net/~cloud-init) and participate -- Find a bug? [Report bugs on Launchpad](https://bugs.launchpad.net/cloud-init/+filebug) +- Ask a question in the [``#cloud-init`` channel on Matrix](https://matrix.to/#/#cloud-init:ubuntu.com) +- Follow announcements or ask a question on [GitHub Discussions](https://github.com/canonical/cloud-init/discussions) +- Find a bug? [Report bugs on GitHub Issues](https://github.com/canonical/cloud-init/issues) ## Distribution and cloud support -Below are a list of the many OSes and clouds that contain and ship with cloud-init. If your -distribution or cloud is not listed or does not have a recent version of cloud-init, please -get in contact with that distribution and send them our way! - -| Supported OSes | Supported Public Clouds | Supported Private Clouds | -| --- | --- | --- | -| Alpine Linux
ArchLinux
Debian
DragonFlyBSD
Fedora
FreeBSD
Gentoo Linux
NetBSD
OpenBSD
openEuler
RHEL/CentOS/AlmaLinux/Rocky/PhotonOS/Virtuozzo/EuroLinux/CloudLinux
SLES/openSUSE
Ubuntu










| Amazon Web Services
Microsoft Azure
Google Cloud Platform
Oracle Cloud Infrastructure
Softlayer
Rackspace Public Cloud
IBM Cloud
DigitalOcean
Bigstep
Hetzner
Joyent
CloudSigma
Alibaba Cloud
OVH
OpenNebula
Exoscale
Scaleway
CloudStack
AltCloud
SmartOS
HyperOne
Vultr
Rootbox
| Bare metal installs
OpenStack
LXD
KVM
Metal-as-a-Service (MAAS)
VMware















| +The majority of [clouds](https://docs.cloud-init.io/en/latest/reference/datasources.html#datasources_supported) +and [Linux / Unix OSes](https://docs.cloud-init.io/en/latest/reference/availability.html#distributions) +are supported by and ship with cloud-init. If your distribution or cloud is not +supported, please get in contact with that distribution and send them our way! ## To start developing cloud-init -Checkout the [hacking](https://cloudinit.readthedocs.io/en/latest/topics/hacking.html) +Checkout the [contributing](https://docs.cloud-init.io/en/latest/development/index.html) document that outlines the steps necessary to develop, test, and submit code. ## Daily builds @@ -54,3 +52,7 @@ features or to verify bug fixes. For Ubuntu, see the [Daily PPAs](https://code.launchpad.net/~cloud-init-dev/+archive/ubuntu/daily) For CentOS, see the [COPR build repos](https://copr.fedorainfracloud.org/coprs/g/cloud-init/cloud-init-dev/) + +## Build / packaging + +To see reference build/packaging implementations, refer to [packages](packages). diff --git a/SECURITY.md b/SECURITY.md index 69360bb7075..7c4df9b27c4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,16 +1,13 @@ -# Security Policy +# Security policy The following documents the upstream cloud-init security policy. ## Reporting -If a user finds a security issue, they are requested to file a [private -security bug on Launchpad](https://bugs.launchpad.net/cloud-init/+filebug). -To ensure the information stays private, change the "This bug contains -information that is:" from "Public" to "Private Security" when filing. - -After the bug is received, the issue is triaged within 2 working days of -being reported and a response is sent to the reporter. +If a security bug is found, please send an email to + . After the bug is received, +the issue is triaged within 2 working days of being reported and a response +is sent to the reporter. ## cloud-init-security @@ -30,7 +27,7 @@ removal from the list for the company or individual involved. If the reported bug is deemed a real security issue a CVE is assigned by the Canonical Security Team as CVE Numbering Authority (CNA). -If it is deemed a regular, non-security, issue, the reporter will be asked to +If it is deemed a regular, non-security issue, the reporter will be asked to follow typical bug reporting procedures. In addition to the disclosure timeline, the core Canonical cloud-init team @@ -47,7 +44,7 @@ determined time for disclosure has arrived the following will occur: * A public bug is filed/made public with vulnerability details, CVE, mitigations and where to obtain the fix -* An email is sent to the [public cloud-init mailing list](https://lists.launchpad.net/cloud-init/) +* An announcement is made to [GitHub Discussions](https://github.com/canonical/cloud-init/discussions) The disclosure timeframe is coordinated with the reporter and members of the cloud-init-security list. This depends on a number of factors: @@ -58,7 +55,7 @@ cloud-init-security list. This depends on a number of factors: * It might take time to decide upon and develop an appropriate fix * A distros might want extra time to backport any possible fixes before the fix becomes public -* A cloud may need additional time to prepare to help customers or impliment +* A cloud may need additional time to prepare to help customers or implement a fix * The issue might be deemed low priority -* May wish to to align with an upcoming planned release +* May wish to align with an upcoming planned release diff --git a/TODO.rst b/TODO.rst deleted file mode 100644 index 7d12686426c..00000000000 --- a/TODO.rst +++ /dev/null @@ -1,43 +0,0 @@ -============================================== -Things that cloud-init may do (better) someday -============================================== - -- Consider making ``failsafe`` ``DataSource`` - - sets the user password, writing it to console - -- Consider a ``previous`` ``DataSource``, if no other data source is - found, fall back to the ``previous`` one that worked. -- Rewrite ``cloud-init-query`` (currently not implemented) -- Possibly have a ``DataSource`` expose explicit fields: - - - instance-id - - hostname - - mirror - - release - - ssh public keys - -- Remove the conversion of the ubuntu network interface format conversion - to a RH/fedora format and replace it with a top level format that uses - the netcf libraries format instead (which itself knows how to translate - into the specific formats). See for example `netcf`_ which seems to be - an active project that has this capability. -- Replace the ``apt*`` modules with variants that now use the distro classes - to perform distro independent packaging commands (wherever possible). -- Replace some the LOG.debug calls with a LOG.info where appropriate instead - of how right now there is really only 2 levels (``WARN`` and ``DEBUG``) -- Remove the ``cc_`` prefix for config modules, either have them fully - specified (ie ``cloudinit.config.resizefs``) or by default only look in - the ``cloudinit.config`` namespace for these modules (or have a combination - of the above), this avoids having to understand where your modules are - coming from (which can be altered by the current python inclusion path) -- Instead of just warning when a module is being ran on a ``unknown`` - distribution perhaps we should not run that module in that case? Or we might - want to start reworking those modules so they will run on all - distributions? Or if that is not the case, then maybe we want to allow - fully specified python paths for modules and start encouraging - packages of ``ubuntu`` modules, packages of ``rhel`` specific modules that - people can add instead of having them all under the cloud-init ``root`` - tree? This might encourage more development of other modules instead of - having to go edit the cloud-init code to accomplish this. - -.. _netcf: https://fedorahosted.org/netcf/ diff --git a/WIP-ONGOING-REFACTORIZATION.rst b/WIP-ONGOING-REFACTORIZATION.rst new file mode 100644 index 00000000000..4e574b5a3b2 --- /dev/null +++ b/WIP-ONGOING-REFACTORIZATION.rst @@ -0,0 +1,312 @@ +Ongoing Refactors +================= + +This captures ongoing refactoring projects in the codebase. This is +intended as documentation for developers involved in the refactoring, +but also for other developers who may interact with the code being +refactored in the meantime. + +``cloudinit.net`` -> ``cloudinit.distros.networking`` Hierarchy +--------------------------------------------------------------- + +``cloudinit.net`` was imported from the curtin codebase as a chunk, and +then modified enough that it integrated with the rest of the cloud-init +codebase. Over the ~4 years since, the fact that it is not fully +integrated into the ``Distro`` hierarchy has caused several issues. + +The common pattern of these problems is that the commands used for +networking are different across distributions and operating systems. +This has lead to ``cloudinit.net`` developing its own "distro +determination" logic: `get_interfaces_by_mac`_ is probably the clearest +example of this. Currently, these differences are primarily split +along Linux/BSD lines. However, it would be short-sighted to only +refactor in a way that captures this difference: we can anticipate that +differences will develop between Linux-based distros in future, or +there may already be differences in tooling that we currently +work around in less obvious ways. + +The high-level plan is to introduce a hierarchy of networking classes +in ``cloudinit.distros.networking``, which each ``Distro`` subclass +will reference. These will capture the differences between networking +on our various distros, while still allowing easy reuse of code between +distros that share functionality (e.g. most of the Linux networking +behaviour). ``Distro`` objects will instantiate the networking classes +at ``self.networking``, so callers will call +``distro.networking.`` instead of ``cloudinit.net.``; this +will necessitate access to an instantiated ``Distro`` object. + +An implementation note: there may be external consumers of the +``cloudinit.net`` module. We don't consider this a public API, so we +will be removing it as part of this refactor. However, we will ensure +that the new API is complete from its introduction, so that any such +consumers can move over to it wholesale. (Note, however, that this new +API is still not considered public or stable, and may not replicate the +existing API exactly.) + +In more detail: + +* The root of this hierarchy will be the + ``cloudinit.distros.networking.Networking`` class. This class will + have a corresponding method for every ``cloudinit.net`` function that + we identify to be involved in refactoring. Initially, these methods' + implementations will simply call the corresponding ``cloudinit.net`` + function. (This gives us the complete API from day one, for existing + consumers.) +* As the biggest differentiator in behaviour, the next layer of the + hierarchy will be two subclasses: ``LinuxNetworking`` and + ``BSDNetworking``. These will be introduced in the initial PR. +* When a difference in behaviour for a particular distro is identified, + a new ``Networking`` subclass will be created. This new class should + generally subclass either ``LinuxNetworking`` or ``BSDNetworking``. +* To be clear: ``Networking`` subclasses will only be created when + needed, we will not create a full hierarchy of per-``Distro`` + subclasses up-front. +* Each ``Distro`` class will have a class variable + (``cls.networking_cls``) which points at the appropriate + networking class (initially this will be either ``LinuxNetworking`` + or ``BSDNetworking``). +* When ``Distro`` classes are instantiated, they will instantiate + ``cls.networking_cls`` and store the instance at ``self.networking``. + (This will be implemented in ``cloudinit.distros.Distro.__init__``.) +* A helper function will be added which will determine the appropriate + ``Distro`` subclass for the current system, instantiate it and return + its ``networking`` attribute. (This is the entry point for existing + consumers to migrate to.) +* Callers of refactored functions will change from calling + ``cloudinit.net.`` to ``distro.networking.``, where + ``distro`` is an instance of the appropriate ``Distro`` class for + this system. (This will require making such an instance available to + callers, which will constitute a large part of the work in this + project.) + +After the initial structure is in place, the work in this refactor will +consist of replacing the ``cloudinit.net.some_func`` call in each +``cloudinit.distros.networking.Networking`` method with the actual +implementation. This can be done incrementally, one function at a +time: + +* pick an unmigrated ``cloudinit.distros.networking.Networking`` method +* find it in the `the list of bugs tagged net-refactor`_ and assign + yourself to it (see :ref:`Managing Work/Tracking Progress` below for + more details) +* refactor all of its callers to call the ``distro.networking.`` + method on ``Distro`` instead of the ``cloudinit.net.`` + function. (This is likely to be the most time-consuming step, as it + may require plumbing ``Distro`` objects through to places that + previously have not consumed them.) +* refactor its implementation from ``cloudinit.net`` into the + ``Networking`` hierarchy (e.g. if it has an if/else on BSD, this is + the time to put the implementations in their respective subclasses) + + * if part of the method contains distro-independent logic, then you + may need to create new methods to capture this distro-specific + logic; we don't want to replicate common logic in different + ``Networking`` subclasses + * if after the refactor, the method on the root ``Networking`` class + no longer has any implementation, it should be converted to an + `abstractmethod`_ + +* ensure that the new implementation has unit tests (either by moving + existing tests, or by writing new ones) +* ensure that the new implementation has a docstring +* add any appropriate type annotations + + * note that we must follow the constraints described in the "Type + Annotations" section above, so you may not be able to write + complete annotations + * we have `type aliases`_ defined in ``cloudinit.distros.networking`` + which should be used when applicable + +* finally, remove it (and any other now-unused functions) from + cloudinit.net (to avoid having two parallel implementations) + +``cloudinit.net`` Functions/Classes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The functions/classes that need refactoring break down into some broad +categories: + +* helpers for accessing ``/sys`` (that should not be on the top-level + ``Networking`` class as they are Linux-specific): + + * ``get_sys_class_path`` + * ``sys_dev_path`` + * ``read_sys_net`` + * ``read_sys_net_safe`` + * ``read_sys_net_int`` + +* those that directly access ``/sys`` (via helpers) and should (IMO) be + included in the API of the ``Networking`` class: + + * ``generate_fallback_config`` + + * the ``config_driver`` parameter is used and passed as a boolean, + so we can change the default value to ``False`` (instead of + ``None``) + + * ``get_ib_interface_hwaddr`` + * ``get_interface_mac`` + * ``interface_has_own_mac`` + * ``is_bond`` + * ``is_bridge`` + * ``is_physical`` + * ``is_renamed`` + * ``is_up`` + * ``is_vlan`` + * ``wait_for_physdevs`` + +* those that directly access ``/sys`` (via helpers) but may be + Linux-specific concepts or names: + + * ``get_master`` + * ``device_devid`` + * ``device_driver`` + +* those that directly use ``ip``: + + * ``_get_current_rename_info`` + + * this has non-distro-specific logic so should potentially be + refactored to use helpers on ``self`` instead of ``ip`` directly + (rather than being wholesale reimplemented in each of + ``BSDNetworking`` or ``LinuxNetworking``) + * we can also remove the ``check_downable`` argument, it's never + specified so is always ``True`` + + * ``_rename_interfaces`` + + * this has several internal helper functions which use ``ip`` + directly, and it calls ``_get_current_rename_info``. That said, + there appears to be a lot of non-distro-specific logic that could + live in a function on ``Networking``, so this will require some + careful refactoring to avoid duplicating that logic in each of + ``BSDNetworking`` and ``LinuxNetworking``. + * only the ``renames`` and ``current_info`` parameters are ever + passed in (and ``current_info`` only by tests), so we can remove + the others from the definition + + * ``EphemeralIPv4Network`` + + * this is another case where it mixes distro-specific and + non-specific functionality. Specifically, ``__init__``, + ``__enter__`` and ``__exit__`` are non-specific, and the + remaining methods are distro-specific. + * when refactoring this, the need to track ``cleanup_cmds`` likely + means that the distro-specific behaviour cannot be captured only + in the ``Networking`` class. See `this comment in PR #363`_ for + more thoughts. + +* those that implicitly use ``/sys`` via their call dependencies: + + * ``master_is_bridge_or_bond`` + + * appends to ``get_master`` return value, which is a ``/sys`` path + + * ``extract_physdevs`` + + * calls ``device_driver`` and ``device_devid`` in both + ``_version_*`` impls + + * ``apply_network_config_names`` + + * calls ``extract_physdevs`` + * there is already a ``Distro.apply_network_config_names`` which in + the default implementation calls this function; this and its BSD + subclass implementations should be refactored at the same time + * the ``strict_present`` and ``strict_busy`` parameters are never + passed, nor are they used in the function definition, so they can + be removed + + * ``get_interfaces`` + + * calls ``device_driver``, ``device_devid`` amongst others + + * ``get_ib_hwaddrs_by_interface`` + + * calls ``get_interfaces`` + +* those that may fall into the above categories, but whose use is only + related to netfailover (which relies on a Linux-specific network + driver, so is unlikely to be relevant elsewhere without a substantial + refactor; these probably only need implementing in + ``LinuxNetworking``): + + * ``get_dev_features`` + + * ``has_netfail_standby_feature`` + + * calls ``get_dev_features`` + + * ``is_netfailover`` + * ``is_netfail_master`` + + * this is called from ``generate_fallback_config`` + + * ``is_netfail_primary`` + * ``is_netfail_standby`` + + * N.B. all of these take an optional ``driver`` argument which is + used to pass around a value to avoid having to look it up by + calling ``device_driver`` every time. This is something of a leaky + abstraction, and is better served by caching on ``device_driver`` + or storing the cached value on ``self``, so we can drop the + parameter from the new API. + +* those that use ``/sys`` (via helpers) and have non-exhaustive BSD + logic: + + * ``get_devicelist`` + +* those that already have separate Linux/BSD implementations: + + * ``find_fallback_nic`` + * ``get_interfaces_by_mac`` + +* those that have no OS-specific functionality (so do not need to be + refactored): + + * ``ParserError`` + * ``RendererNotFoundError`` + * ``is_ip_address`` + * ``is_ipv4_address`` + * ``natural_sort_key`` + +Note that the functions in ``cloudinit.net`` use inconsistent parameter +names for "string that contains a device name"; we can standardise on +``devname`` (the most common one) in the refactor. + +Managing Work/Tracking Progress +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To ensure that we won't have multiple people working on the same part +of the refactor at the same time, there is a bug for each function. +You can see the current status by looking at `the list of bugs tagged +net-refactor`_. + +When you're working on refactoring a particular method, ensure that you +have assigned yourself to the corresponding bug, to avoid duplicate +work. + +Generally, when considering what to pick up to refactor, it is best to +start with functions in ``cloudinit.net`` which are not called by +anything else in ``cloudinit.net``. This allows you to focus only on +refactoring that function and its callsites, rather than having to +update the other ``cloudinit.net`` function also. + +References +~~~~~~~~~~ + +* `Mina Galić's email the the cloud-init ML in 2018`_ (plus its thread) +* `Mina Galić's email to the cloud-init ML in 2019`_ (plus its thread) +* `PR #363`_, the discussion which prompted finally starting this + refactor (and where a lot of the above details were hashed out) + +.. _get_interfaces_by_mac: https://github.com/canonical/cloud-init/blob/961239749106daead88da483e7319e9268c67cde/cloudinit/net/__init__.py#L810-L818 +.. _Mina Galić's email the the cloud-init ML in 2018: https://lists.launchpad.net/cloud-init/msg00185.html +.. _Mina Galić's email to the cloud-init ML in 2019: https://lists.launchpad.net/cloud-init/msg00237.html +.. _PR #363: https://github.com/canonical/cloud-init/pull/363 +.. _this comment in PR #363: https://github.com/canonical/cloud-init/pull/363#issuecomment-628829489 +.. _abstractmethod: https://docs.python.org/3/library/abc.html#abc.abstractmethod +.. _type aliases: https://docs.python.org/3/library/typing.html#type-aliases +.. _the list of bugs tagged net-refactor: https://github.com/canonical/cloud-init/issues?q=is%3Aissue+is%3Aopen+net-refactor + diff --git a/bash_completion/cloud-init b/bash_completion/cloud-init index b9f137b13e6..b5a5cd75299 100644 --- a/bash_completion/cloud-init +++ b/bash_completion/cloud-init @@ -10,8 +10,8 @@ _cloudinit_complete() cur_word="${COMP_WORDS[COMP_CWORD]}" prev_word="${COMP_WORDS[COMP_CWORD-1]}" - subcmds="analyze clean collect-logs devel dhclient-hook features init modules query single status" - base_params="--help --file --version --debug --force" + subcmds="analyze clean collect-logs devel features init modules query schema single status" + base_params="--help --version --debug --force" case ${COMP_CWORD} in 1) COMPREPLY=($(compgen -W "$base_params $subcmds" -- $cur_word)) @@ -28,25 +28,25 @@ _cloudinit_complete() COMPREPLY=($(compgen -W "--help --tarfile --include-userdata" -- $cur_word)) ;; devel) - COMPREPLY=($(compgen -W "--help hotplug-hook schema net-convert" -- $cur_word)) - ;; - dhclient-hook) - COMPREPLY=($(compgen -W "--help up down" -- $cur_word)) + COMPREPLY=($(compgen -W "--help hotplug-hook net-convert" -- $cur_word)) ;; features) COMPREPLY=($(compgen -W "--help" -- $cur_word)) ;; init) - COMPREPLY=($(compgen -W "--help --local" -- $cur_word)) + COMPREPLY=($(compgen -W "--help --local --file" -- $cur_word)) ;; modules) - COMPREPLY=($(compgen -W "--help --mode" -- $cur_word)) + COMPREPLY=($(compgen -W "--help --mode --file" -- $cur_word)) ;; query) COMPREPLY=($(compgen -W "--all --help --instance-data --list-keys --user-data --vendor-data --debug" -- $cur_word));; + schema) + COMPREPLY=($(compgen -W "--help --config-file --docs --annotate --system" -- $cur_word)) + ;; single) - COMPREPLY=($(compgen -W "--help --name --frequency --report" -- $cur_word)) + COMPREPLY=($(compgen -W "--help --name --frequency --report --file" -- $cur_word)) ;; status) COMPREPLY=($(compgen -W "--help --long --wait" -- $cur_word)) @@ -72,9 +72,6 @@ _cloudinit_complete() ;; render) COMPREPLY=($(compgen -W "--help --instance-data --debug" -- $cur_word));; - schema) - COMPREPLY=($(compgen -W "--help --config-file --doc --annotate" -- $cur_word)) - ;; show) COMPREPLY=($(compgen -W "--help --format --infile --outfile" -- $cur_word)) ;; @@ -86,5 +83,3 @@ _cloudinit_complete() esac } complete -F _cloudinit_complete cloud-init - -# vi: syntax=sh expandtab diff --git a/cloudinit/analyze/__init__.py b/cloudinit/analyze/__init__.py index e69de29bb2d..ea2144cb387 100644 --- a/cloudinit/analyze/__init__.py +++ b/cloudinit/analyze/__init__.py @@ -0,0 +1,319 @@ +# Copyright (C) 2017 Canonical Ltd. +# +# This file is part of cloud-init. See LICENSE file for license information. + +import argparse +import re +import sys +from datetime import datetime, timezone +from typing import IO, Dict, List, Optional, Tuple, Union + +from cloudinit.analyze import dump, show +from cloudinit.atomic_helper import json_dumps + + +def get_parser( + parser: Optional[argparse.ArgumentParser] = None, +) -> argparse.ArgumentParser: + if not parser: + parser = argparse.ArgumentParser( + prog="cloudinit-analyze", + description="Devel tool: Analyze cloud-init logs and data", + ) + subparsers = parser.add_subparsers(title="Subcommands", dest="subcommand") + subparsers.required = True + + parser_blame = subparsers.add_parser( + "blame", help="Print list of executed stages ordered by time to init" + ) + parser_blame.add_argument( + "-i", + "--infile", + action="store", + dest="infile", + default="/var/log/cloud-init.log", + help="specify where to read input.", + ) + parser_blame.add_argument( + "-o", + "--outfile", + action="store", + dest="outfile", + default="-", + help="specify where to write output. ", + ) + parser_blame.set_defaults(action=("blame", analyze_blame)) + + parser_show = subparsers.add_parser( + "show", help="Print list of in-order events during execution" + ) + parser_show.add_argument( + "-f", + "--format", + action="store", + dest="print_format", + default="%I%D @%Es +%ds", + help="specify formatting of output.", + ) + parser_show.add_argument( + "-i", + "--infile", + action="store", + dest="infile", + default="/var/log/cloud-init.log", + help="specify where to read input.", + ) + parser_show.add_argument( + "-o", + "--outfile", + action="store", + dest="outfile", + default="-", + help="specify where to write output.", + ) + parser_show.set_defaults(action=("show", analyze_show)) + parser_dump = subparsers.add_parser( + "dump", help="Dump cloud-init events in JSON format" + ) + parser_dump.add_argument( + "-i", + "--infile", + action="store", + dest="infile", + default="/var/log/cloud-init.log", + help="specify where to read input. ", + ) + parser_dump.add_argument( + "-o", + "--outfile", + action="store", + dest="outfile", + default="-", + help="specify where to write output. ", + ) + parser_dump.set_defaults(action=("dump", analyze_dump)) + parser_boot = subparsers.add_parser( + "boot", help="Print list of boot times for kernel and cloud-init" + ) + parser_boot.add_argument( + "-i", + "--infile", + action="store", + dest="infile", + default="/var/log/cloud-init.log", + help="specify where to read input. ", + ) + parser_boot.add_argument( + "-o", + "--outfile", + action="store", + dest="outfile", + default="-", + help="specify where to write output.", + ) + parser_boot.set_defaults(action=("boot", analyze_boot)) + return parser + + +def analyze_boot(name: str, args: argparse.Namespace) -> str: + """Report a list of how long different boot operations took. + + For Example: + -- Most Recent Boot Record -- + Kernel Started at: