| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running `make deb` or `packages/bddeb` our script uses the
host's debuild tooling instead of sbuild.
Since we move CI runners to a jammy environment, the host's
debhelper-compat levels become incompatible with building
a local bionic deb with debuild.
Fix package-build .github/workflow/integration.yaml to install
all package build dependenies from both requirements.txt an
test-requirements.txt using read-depenedencies.
Fix bddeb to determine the hosts debhelper-compat level support
when generating local deb packages without using sbuild.
To migrate to host-based debhelper-compat support the following
changes were made:
- drop packages/debian/compat file and prefer debian/control
debhelper-compat (= ##) definitions
- dpkg-query debhelper to check applicable debhelper versions
in Provides on the host
- Hardcode any `bddeb -d bionic` to a maximum of
debhelper-compat( = 11)
- Update package/debian/rules with latest published rules file
from ubuntu/devel branch
Use the latest debhelper-compat level provided by the host's
debhelper package by using dpkg-query.
Fixes CI on downstream ubuntu/* branches which invoke bddeb directly.
|
|
|
|
|
|
|
|
|
| |
At inception[1], dhclient hooks were used to filter environment variables into /run/cloud-init/dhclient.hooks/<interface>.json which was consumed by WALinuxAgentShim. The fallback method was to parse the dhcp client lease file.
Today the Azure datasource directly uses the parsed lease file[2], and loading /run/cloud-init/dhclient.hook/<interface>.json file was removed in 22.2[3]. With no other consumers, we can remove this.
[1] https://github.com/canonical/cloud-init/commit/648dbbf6b090c81e989f1ab70bf99f4de16a6a70
[2] https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/DataSourceAzure.py#L447
[3] https://github.com/canonical/cloud-init/commit/5ad0768a796bc07232476d0d29b5225f1e6e131c
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the distro selection code to recognize opensuse-microos as a SUSE
based distribution.
Also in this commit:
* unittest mock OpenNebula of pwd.getpwnam to avoid test leaks on SuSE
* tooling fixes to build and test opensuse
- read-dependencies fix jinja2 and PyYAML pkg aliases for opensuse
- Consolidate package operations based on OS family instead of
distro flavor to cut down on duplication of command definitions.
- format read-dependencies and run-container with black
|
| |
|
| |
|
|
|
|
|
|
| |
Fix `make deb` and `make ubuntu-ci-deps` targets on Jammy and newer.
Update packages/bddeb to only append dh-systemd as a
dependency on older Debian and Ubuntu stable series.
|
| |
|
|
|
| |
Add pointers to downstream packaging resources.
|
|
|
|
|
| |
RPM build errors:
Installed (but unpackaged) file(s) found:
/etc/cloud/clean.d/README
|
|
|
|
|
|
| |
Write sshd config to /etc/ssh/sshd_config.d/50-cloud-init.conf
if the sshd_config sources sshd_config.d
LP: #1968873
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Cloud-init now delivers udev rules to /usr/lib/udv/rules.d on
rhel-based systems as of commit 7071512.
Update spec template to unblock COPR builds of CentOS/8-Stream which
fail on RPM build errors like:
File not found: /build.../lib/udev/rules.d/66-azure-ephemeral.rules
Use spec macro %{_udevrulesdir} instead of hard-coding rules dir.
|
|
|
| |
For support of cc_ubuntu_advantage config module
|
|
|
|
|
|
| |
- Remove references and dead code to Xenial, Eoan, Python < 3.7
- cc_ubuntu_drivers: Use python3-debconf instead of shell script
- add integration test for ubuntu_drivers
- bump pycloudlib for OCI subnet/jammy fixes
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add pre-fight check to verify if SSH is installed and enabled.
- When not installed, perform an early return with a warning and no
modifications
- When not enabled, update ssh config, but do not restart ssh.
- Handle an exception when user-data provides 'ssh_pwauth: True'
and the open-ssh service is not available
- Add openssh-server as suggested package for debian-based distros
LP: #1969526
|
|
|
| |
Add ssh-import-id as a suggested package dependency for debs
|
|
|
|
|
|
| |
The hostname command, that cloud-init uses to apply a hostname change,
is in a package that is typically around, but not guarranteed to be.
Include it in package dependencies.
|
|
|
|
| |
dh_systemd is now included in the default helper,
no need to specify it anymore for impish
|
|
|
|
|
| |
When we added the install hotplug module, we forgot to update the
redhet/cloud-init.spec.in file and allow for execution on /usr/libexec.
This PR adds that functionality.
|
|
|
|
|
|
|
| |
In some cloud-init enabled images the sshd-keygen@.service
may race with cloud-init and prevent ssh host keys from being
generated or generating host keys twice slowing boot and consuming
additional entropy during boot. This drop-in unit adds a condition to
the sshd-keygen@.service which prevents running if cloud-init is active.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a udev script which will invoke a hotplug hook script on all net
add events. The script will write some udev arguments to a systemd FIFO
socket (to ensure we have only instance of cloud-init running at a
time), which is then read by a new service that calls a new 'cloud-init
devel hotplug-hook' command to handle the new event.
This hotplug-hook command will:
- Fetch the pickled datsource
- Verify that the hotplug event is supported/enabled
- Update the metadata for the datasource
- Ensure the hotplugged device exists within the datasource
- Apply the config change on the datasource metadata
- Bring up the new interface (or apply global network configuration)
- Save the updated metadata back to the pickle cache
Also scattered in some unrelated typing where helpful
|
|
|
|
|
|
|
|
|
| |
bddeb builds a .deb package using the template packaging files in
packages/debian/.
The new --packaging-branch flag allows to specify a git branch
where to pull the packaging (i.e. the debian/ directory) from.
This is useful to build a .deb package from master with the very
same packaging which is used for the uploads.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
456fb55744a1acc6bd2f464b7656a9c33d0b7ac5 made tools/read-dependencies
and package/brpm distinguish between build dependencies and runtime
dependencies, however packages/redhat/cloud-init.spec.in expects all
the dependencies to be in the 'requires' list, thus missing some build
dependencies.
This change makes cloud-init.spec use 'buildrequires' too.
The build happens to succeed without python3-devel on the epel-8 copr
chroot as it pulls in the epel-rpm-macros package, which in turn depends
on python3-devel. In other words the dependency is satisfied by chance.
Packages building for Python 3 need to explicitly specify BuildRequires:
python3-devel, see: [1].
[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
|
|
|
|
|
|
|
|
|
|
| |
tools/read-dependencies:
- Add parameters --build-requires, --runtime-requires
- Sort dependency output before printing
package/brpm
- use --build-requires, --runtime-requires to separate build/vs runtime package reqs.
LP: #1886107
|
|
|
|
|
| |
test using it (#461)
caplog is only available in pytest itself from 3.0 onwards. In xenial, we only have pytest 2.8.7. However, in xenial we do have pytest-catchlog available (as python3-pytest-catchlog), so we use that where appropriate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was painful, but it finishes a TODO from cloudinit/subp.py.
It moves the following from util to subp:
ProcessExecutionError
subp
which
target_path
I moved subp_blob_in_tempfile into cc_chef, which is its only caller.
That saved us from having to deal with it using write_file
and temp_utils from subp (which does not import any cloudinit things now).
It is arguable that 'target_path' could be moved to a 'path_utils' or
something, but in order to use it from subp and also from utils,
we had to get it out of utils.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since upstream cloud-init has dropped python2 support,
adapt remaining package build scripts and tools to python3 only
Changes:
* Do not template debian/rules as python3 is the only supported version
* Drop six from requirements.txt
* Makefile: drop everything related to Python 2
* run-container: install the CI deps only on ubuntu|debian
* read-version: update the shebang to use Python 3
* brpm: read_dependencies(): drop unused argument
* read-dependencies: switch to Py3 and drop the --python-version option
* pkg-deps.json: drop the Python version field and update the redhat deps
* pkg-deps.json: drop the unittest2 and contextlib2 renames
* Update RPM the spec file to use Python 3 when building the RPM
* bddeb: drop support for Python 2
|
|
|
|
|
|
|
|
|
|
|
| |
These libraries provide backports of Python 3's stdlib components to Python 2. As we only support Python 3, we can simply use the stdlib now. This pull request does the following:
* removes some unneeded compatibility code for the old spelling of `assertRaisesRegex`
* replaces invocations of the Python 2-only `assertItemsEqual` with its new name, `assertCountEqual`
* replaces all usage of `unittest2` with `unittest`
* replaces all usage of `contextlib2` with `contextlib`
* drops `unittest2` and `contextlib2` from requirements files and tox.ini
It also rewrites some `test_azure` helpers to use bare asserts. We were seeing a strange error in xenial builds of this branch which appear to be stemming from the AssertionError that pytest produces being _different_ from the standard AssertionError. This means that the modified helpers weren't behaving correctly, because they weren't catching AssertionErrors as one would expect. (I believe this is related, in some way, to https://github.com/pytest-dev/pytest/issues/645, but the only version of pytest where we're affected is so far in the past that it's not worth pursuing it any further as we have a workaround.)
|
| |
|
|
|
|
|
|
|
|
| |
As the nose docs[0] themselves note, it has been in maintenance mode for the past several years. pytest is an actively developed, featureful and popular alternative that the nose docs themselves recommend. See [1] for more details about the thinking here.
(This PR also removes stale tox definitions, instead of modifying them.)
[0] https://nose.readthedocs.io/en/latest/
[1] https://lists.launchpad.net/cloud-init/msg00245.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tools/read-version: don't enforce version parity in release branch CI
We have a bootstrapping problem with new releases, currently. To take
the example of 20.1: the branch that bumps the version fails CI because
there is no 20.1 tag for it to use in read-version. Previously, this
was solved by creating a tag and pushing it to the cloud-init repo
before the commit landed. However, we have GitHub branch protection
enabled, so the commit that needs to be tagged is not created until the
pull request lands in master.
This works around this problem by introducing a very specific check: if
we are performing CI for an upstream release branch, we skip the
read-version checking that we know will fail.
* tools/make-tarball: add --version parameter
When using make-tarball as part of a CI build of a new upstream release,
the version it determines is inconsistent with the version that other
tools determine. Instead of encoding the logic here (as well as in
Python elsewhere), we add a parameter to allow us to set it from outside
the script.
* packages/bddeb: handle missing version_long in new version CI
If we're running in CI for a new upstream release, we have to use
`version` instead of `version_long` (because we don't yet have the tag
required to generate `version_long`).
|
|
|
|
|
|
|
|
|
|
|
| |
* packages/brpm: switch to python3
No changes needed other than changing the shebang interpreter.
* pkg-deps.json: bump the redhat build dependencies to python36
CentOS 7 (our standard target for the COPR test builds) uses python3.6
as its default python3 interpreter, so let's bump the build dependencies
accordingly.
|
| |
|
|
|
|
| |
LP: #1825444
|
| |
|
| |
|
|
|
|
|
|
| |
When invoked with '--distro=suse', the packages that would be
attempted for installation would be from redhat. We just were not
pasing the args.distro through. That is fixed here.
|
|
|
|
|
| |
This makes the necessary changes to patch the full packaged version into
the trunk maintained redhat and suse spec files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This modifies version.version_string to support having the package
build write the *packaged* version in with a easy replace.
Then, when cloud-init reports its version it will include the full
packaged version.
Also modified here are upstream package build files to get that done.
Note part of the trickery in packages/debian/rules.in was to avoid
the 'basic' templater consuming the '$variable' variable names.
LP: #1770712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bddeb already supported passing in a '--release' and that would get
into the changelog line.
If you used bddeb to build packages for a PPA, and built multiple
releases, then you would get the same version for each release, and
launchpad would reject your upload.
The change here means we get a ~16.04.1 (for xenial) suffix on the
dpkg version. If the distro-info-data package is not installed,
or the release is not known (such as the default "UNRELEASED"),
then you get no suffix.
|
|
|
|
|
|
|
|
|
|
| |
If you built packages with 'bddeb', each time it would create a new
tarball with make-tarball. If you then tried to upload two different
tarballs to launchpad (to a PPA), it would reject the second as the
orig tarball already existed.
This just supports looking in some places for a orig tarball and
re-using if it is found.
|
|
|
|
|
|
|
| |
Ubuntu minimal images do not have iproute2, so correctly identify
our dependency on it.
LP: #1766711
|
|
|
|
|
| |
In bash shells with bash_completion enabled, now the cloud-init
sub commands and parameters/flags will be shown.
|
|
|
|
|
|
|
| |
This just correctly adds the missing dependency on isc-dhcp-client.
That package is used via 'dhclient' from cloudinit/net/dhcp.py.
LP: #1759307
|
|
|
|
|
|
|
|
|
| |
boto_utils.py had been removed some time ago, and the current
cloudinit/ec2_utils.py is not based on what was in boto_utils.
We just failed to remove the mention of it from the upstream
debian/copyright. And then put it back in everywhere in recent changes
to get upstream and ubuntu in sync.
|
|
|
|
|
|
|
| |
The first revision of this rendered tables with less decoration but there
was a desire upstream to avoid possibly breaking some parsing someone
might be doing, so it has been revised to render the same as prettytable
for the cases cloud-init actually uses.
|
|
|
|
|
|
|
|
|
| |
The copyright was updated to be lintian clean and reorganized to list the
licenses at the bottom after declaring the metadata and file information.
Add the MIT license to the file.
LP: #1718681
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new collect-logs sub command to the cloud-init CLI. This script
will collect all logs pertinent to a cloud-init run and store them in a
compressed tar-gzipped file. This tarfile can be attached to any
cloud-init bug filed in order to aid in bug triage and resolution.
A cloudinit.apport module is also added that allows apport interaction.
Here is an example bug filed via ubuntu-bug cloud-init: LP: #1716975.
Once the apport launcher is packaged in cloud-init, bugs can be filed
against cloud-init with the following command:
ubuntu-bug cloud-init
LP: #1607345
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "centos: do not package systemd-fsck drop-in."
Revert "systemd: make systemd-fsck run after cloud-init.service"
The systemd-fsck drop-in caused regressions by introducing ordering
The change reverts the original commit that added systemd-fsck drop-in
and another commit that had removed that from the centos packaging:
1f5489c258a26f4e26261c40786537951d67df1e
8a5296c41db45be3a172862f324ad44e732a2250
The result is to no longer provide the systemd-fsck drop-in.
LP: #1717477
|