diff -Nru cloud-init-23.3.3/.github/PULL_REQUEST_TEMPLATE.md cloud-init-23.4.3/.github/PULL_REQUEST_TEMPLATE.md --- cloud-init-23.3.3/.github/PULL_REQUEST_TEMPLATE.md 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/.github/PULL_REQUEST_TEMPLATE.md 2024-02-02 21:21:52.000000000 +0000 @@ -1,13 +1,23 @@ ## 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. @@ -24,9 +34,14 @@ including any necessary configuration files, user-data, setup, and teardown. Scripts used may be attached directly to this PR. --> -## Checklist: +## Checklist - - [ ] My code follows the process laid out in [the documentation](https://cloudinit.readthedocs.io/en/latest/development/contributing.html) - - [ ] I have updated or added any unit tests accordingly - - [ ] I have updated or added any documentation accordingly +- [ ] My code follows the process laid out in [the documentation](https://cloudinit.readthedocs.io/en/latest/development/index.html) +- [ ] I have updated or added any [unit tests](https://cloudinit.readthedocs.io/en/latest/development/testing.html) accordingly +- [ ] I have updated or added any [documentation](https://cloudinit.readthedocs.io/en/latest/development/contribute_docs.html) 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 -Nru cloud-init-23.3.3/.github/workflows/check_format.yml cloud-init-23.4.3/.github/workflows/check_format.yml --- cloud-init-23.3.3/.github/workflows/check_format.yml 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/.github/workflows/check_format.yml 2024-02-02 21:21:52.000000000 +0000 @@ -1,6 +1,9 @@ name: Lint Tests on: pull_request: + push: + branches: + - main concurrency: group: 'ci-${{ github.workflow }}-${{ github.ref }}' @@ -94,6 +97,22 @@ run: | tox + shell-lint: + name: Shell Lint + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3.0.0 + + - name: Install ShellCheck + run: | + sudo apt-get update + sudo apt install shellcheck + + - name: Run ShellCheck + run: | + shellcheck ./tools/ds-identify + check-cla-signers: runs-on: ubuntu-22.04 steps: diff -Nru cloud-init-23.3.3/.github/workflows/cla.yml cloud-init-23.4.3/.github/workflows/cla.yml --- cloud-init-23.3.3/.github/workflows/cla.yml 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/.github/workflows/cla.yml 2024-02-02 21:21:52.000000000 +0000 @@ -19,7 +19,7 @@ to have signed the Contributor License Agreement (CLA). Please sign the CLA by following our contribution guide at: - https://cloudinit.readthedocs.io/en/latest/development/contributing.html + https://cloudinit.readthedocs.io/en/latest/development/first_PR.html Thanks, Your friendly cloud-init upstream diff -Nru cloud-init-23.3.3/.github/workflows/integration.yml cloud-init-23.4.3/.github/workflows/integration.yml --- cloud-init-23.3.3/.github/workflows/integration.yml 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/.github/workflows/integration.yml 2024-02-02 21:21:52.000000000 +0000 @@ -4,6 +4,9 @@ pull_request: branches-ignore: - 'ubuntu/**' + push: + branches: + - main concurrency: group: 'ci-${{ github.workflow }}-${{ github.ref }}' diff -Nru cloud-init-23.3.3/.github/workflows/linkcheck.yml cloud-init-23.4.3/.github/workflows/linkcheck.yml --- cloud-init-23.3.3/.github/workflows/linkcheck.yml 1970-01-01 00:00:00.000000000 +0000 +++ cloud-init-23.4.3/.github/workflows/linkcheck.yml 2024-02-02 21:21:52.000000000 +0000 @@ -0,0 +1,43 @@ +name: linkcheck in CI + +on: + push: + branches: + - main + pull_request: {} + workflow_dispatch: + inputs: + failOnError: + description: 'Fail job on link check error' + required: false + default: 'false' + +jobs: + linkcheck: + runs-on: ubuntu-22.04 + continue-on-error: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.failOnError == 'true') }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v3.0.0 + + - name: "Install Python 3.10" + uses: actions/setup-python@v4 + 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" + exit 1 + else + echo "Number of broken links is below threshold: $broken_count" + fi diff -Nru cloud-init-23.3.3/.github/workflows/unit.yml cloud-init-23.4.3/.github/workflows/unit.yml --- cloud-init-23.3.3/.github/workflows/unit.yml 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/.github/workflows/unit.yml 2024-02-02 21:21:52.000000000 +0000 @@ -1,6 +1,9 @@ name: Unit Tests on: pull_request: + push: + branches: + - main concurrency: group: 'ci-${{ github.workflow }}-${{ github.ref }}' cancel-in-progress: true @@ -11,13 +14,10 @@ unittests: strategy: matrix: - python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ] + python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] toxenv: [ py3 ] experimental: [false] include: - - python-version: "3.12-dev" - toxenv: py3 - experimental: true - python-version: "3.6" toxenv: lowest-supported experimental: false diff -Nru cloud-init-23.3.3/CONTRIBUTING.md cloud-init-23.4.3/CONTRIBUTING.md --- cloud-init-23.3.3/CONTRIBUTING.md 1970-01-01 00:00:00.000000000 +0000 +++ cloud-init-23.4.3/CONTRIBUTING.md 2024-02-02 21:21:52.000000000 +0000 @@ -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 IRC and have a dedicated `#cloud-init` channel where you can contact +us for help and guidance. This link will take you directly to our +[IRC channel on Libera](https://kiwiirc.com/nextclient/irc.libera.chat/cloud-init). +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://cloudinit.readthedocs.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 -Nru cloud-init-23.3.3/CONTRIBUTING.rst cloud-init-23.4.3/CONTRIBUTING.rst --- cloud-init-23.3.3/CONTRIBUTING.rst 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/CONTRIBUTING.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ -.. _contributing: - -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 your GitHub username (alphabetically) to the in-repository list that we - use to track CLA signatures: `tools/.github-cla-signers`_. -* Add or update any :ref:`unit tests` accordingly. -* Add or update any :ref:`integration_tests` (if applicable). -* Format code (using ``black`` and ``isort``) with `tox -e do_format`. -* Ensure unit tests and linting pass using `tox`_. -* Submit a PR against the ``main`` branch of the ``cloud-init`` repository. - -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 in to your `GitHub`_ account. - -* Fork the upstream `repository`_ on GitHub and click on the ``Fork`` button - -* Create a new remote pointing to your personal GitHub repository. - -.. code-block:: sh - - git clone git@github.com:GH_USER/cloud-init.git - cd cloud-init - git remote add upstream git@github.com:canonical/cloud-init.git - git push origin main - -* Read through the ``cloud-init`` - :ref:`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 your GitHub username - 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. - - * You may use ``tools/check-cla-signers`` to sort ``.github-cla-signers`` - or check that it is sorted. - - * 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. - -Transferring CLA Signatures from Launchpad to GitHub ----------------------------------------------------- - -For existing contributors who 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, 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, and add more commits.): :: - - git commit - -* Apply ``black`` and ``isort`` formatting rules with `tox`_: :: - - tox -e do_format - -* Run unit tests and lint/formatting checks with `tox`_: :: - - tox - -* Push your changes to your personal GitHub repository: :: - - git push -u origin 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 :guilabel:`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 squashed 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 :guilabel:`Create Pull Request` - -Then, a ``cloud-init`` committer will review your changes and -follow up in the pull request. Look at the :ref:`Code Review Process` documentation to understand the following steps. - -Feel free to ping and/or join ``#cloud-init`` on Libera IRC if you -have any questions. - -Design -====== - -This section captures design decisions that are helpful to know when -hacking on ``cloud-init``. - -Python support --------------- - -``Cloud-init`` upstream currently supports Python 3.6 and above. - -``Cloud-init`` upstream will stay compatible with a particular Python version -for 6 years after release. After 6 years, we will stop testing upstream -changes against the unsupported version of Python and may introduce -breaking changes. This policy may change as needed. - -The following table lists the ``cloud-init`` versions in which the -minimum Python version changed: - -================== ================== -Cloud-init version Python version -================== ================== -22.1 3.6+ -20.3 3.5+ -19.4 2.7+ -================== ================== - -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`_ and `PEP-526`_. -Their use in the codebase is encouraged. - -Feature Flags -------------- - -.. automodule:: cloudinit.features - :members: - -.. LINKS: -.. _tools/.github-cla-signers: https://github.com/canonical/cloud-init/blob/main/tools/.github-cla-signers -.. _Libera IRC network: https://kiwiirc.com/nextclient/irc.libera.chat/cloud-init -.. _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 -.. _tox: https://tox.readthedocs.io/en/latest/ -.. _PEP-484: https://www.python.org/dev/peps/pep-0484/ -.. _PEP-526: https://www.python.org/dev/peps/pep-0526/ diff -Nru cloud-init-23.3.3/ChangeLog cloud-init-23.4.3/ChangeLog --- cloud-init-23.3.3/ChangeLog 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/ChangeLog 2024-02-02 21:21:52.000000000 +0000 @@ -1,3 +1,224 @@ +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) @@ -4292,4 +4513,3 @@ - make the message on 'disable_root' more clear (LP: #672417) - do not require public key if private is given in ssh cloud-config (LP: #648905) -# vi: syntax=text textwidth=79 diff -Nru cloud-init-23.3.3/Makefile cloud-init-23.4.3/Makefile --- cloud-init-23.3.3/Makefile 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/Makefile 2024-02-02 21:21:52.000000000 +0000 @@ -30,7 +30,7 @@ $(PYTHON) -m pytest -v tests/unittests cloudinit render-template: - $(PYTHON) ./tools/render-cloudcfg --variant=$(VARIANT) $(FILE) $(subst .tmpl,,$(FILE)) + $(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 @@ -39,6 +39,7 @@ # 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) @@ -63,7 +64,7 @@ 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 @@ -130,6 +131,7 @@ -e 'doc/examples/cloud-config-power-state.txt: Bye Bye' \ -e 'doc/examples/cloud-config.txt: Bye Bye' \ -e 'doc/rtd/topics/cli.rst: DOCS DOCS' \ + -e 'doc/summit/2023_summit_shared_notes.md: Moustafa Moustafa' \ -e 'dependant' diff -Nru cloud-init-23.3.3/README.md cloud-init-23.4.3/README.md --- cloud-init-23.3.3/README.md 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/README.md 2024-02-02 21:21:52.000000000 +0000 @@ -1,8 +1,8 @@ # cloud-init -![Unit Tests](https://github.com/canonical/cloud-init/actions/workflows/unit.yml/badge.svg) -![Integration Tests](https://github.com/canonical/cloud-init/actions/workflows/integration.yml/badge.svg) -![Documentation](https://github.com/canonical/cloud-init/actions/workflows/check_format.yml/badge.svg) +![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 @@ -43,7 +43,7 @@ ## To start developing cloud-init -Checkout the [contributing](https://cloudinit.readthedocs.io/en/latest/development/contributing.html) +Checkout the [contributing](https://cloudinit.readthedocs.io/en/latest/development/index.html) document that outlines the steps necessary to develop, test, and submit code. ## Daily builds diff -Nru cloud-init-23.3.3/TODO.rst cloud-init-23.4.3/TODO.rst --- cloud-init-23.3.3/TODO.rst 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/TODO.rst 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cloud-init-23.3.3/bash_completion/cloud-init cloud-init-23.4.3/bash_completion/cloud-init --- cloud-init-23.3.3/bash_completion/cloud-init 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/bash_completion/cloud-init 2024-02-02 21:21:52.000000000 +0000 @@ -83,5 +83,3 @@ esac } complete -F _cloudinit_complete cloud-init - -# vi: syntax=sh expandtab diff -Nru cloud-init-23.3.3/cloudinit/analyze/__init__.py cloud-init-23.4.3/cloudinit/analyze/__init__.py --- cloud-init-23.3.3/cloudinit/analyze/__init__.py 2023-10-24 14:53:43.000000000 +0000 +++ cloud-init-23.4.3/cloudinit/analyze/__init__.py 2024-02-02 21:21:52.000000000 +0000 @@ -0,0 +1,313 @@ +# 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 +from typing import IO + +from cloudinit.analyze import dump, show +from cloudinit.atomic_helper import json_dumps + + +def get_parser(parser=None): + 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, args): + """Report a list of how long different boot operations took. + + For Example: + -- Most Recent Boot Record -- + Kernel Started at: