Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix daily build recipe: Ubuntu/jammy refresh patches #5704

Merged
merged 7 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,7 +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/*']

4 changes: 2 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ cloud-init (24.3.1-0ubuntu0~22.04.2) UNRELEASED; urgency=medium
* refresh patches:
- d/p/keep-dhclient-as-priority-client.patch
- d/p/no-single-process.patch
* Upstream snapshot based on upstream/main at 313390f8.
* Upstream snapshot based on upstream/main at a9c6b140.

-- Chad Smith <[email protected]> Wed, 11 Sep 2024 14:21:43 -0600
-- Chad Smith <[email protected]> Fri, 13 Sep 2024 08:17:58 -0600

cloud-init (24.3.1-0ubuntu0~22.04.1) jammy; urgency=medium

Expand Down
8 changes: 4 additions & 4 deletions debian/patches/no-single-process.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Last-Update: 2024-08-02
-# process has completed this stage. The output from the return socket is piped
-# into a shell so that the process can send a completion message (defaults to
-# "done", otherwise includes an error message) and an exit code to systemd.
-ExecStart=sh -c 'echo "start" | nc.openbsd -Uu -W1 /run/cloud-init/share/config.sock -s /run/cloud-init/share/config-return.sock | sh'
-ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/config.sock -s /run/cloud-init/share/config-return.sock | sh'
+ExecStart=/usr/bin/cloud-init modules --mode=config
RemainAfterExit=yes
TimeoutSec=0
Expand All @@ -35,7 +35,7 @@ Last-Update: 2024-08-02
-# process has completed this stage. The output from the return socket is piped
-# into a shell so that the process can send a completion message (defaults to
-# "done", otherwise includes an error message) and an exit code to systemd.
-ExecStart=sh -c 'echo "start" | nc.openbsd -Uu -W1 /run/cloud-init/share/final.sock -s /run/cloud-init/share/final-return.sock | sh'
-ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/final.sock -s /run/cloud-init/share/final-return.sock | sh'
+ExecStart=/usr/bin/cloud-init modules --mode=final
RemainAfterExit=yes
TimeoutSec=0
Expand Down Expand Up @@ -64,7 +64,7 @@ Last-Update: 2024-08-02
-# process has completed this stage. The output from the return socket is piped
-# into a shell so that the process can send a completion message (defaults to
-# "done", otherwise includes an error message) and an exit code to systemd.
-ExecStart=sh -c 'echo "start" | nc.openbsd -Uu -W1 /run/cloud-init/share/local.sock -s /run/cloud-init/share/local-return.sock | sh'
-ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/local.sock -s /run/cloud-init/share/local-return.sock | sh'
+ExecStart=/usr/bin/cloud-init init --local
RemainAfterExit=yes
TimeoutSec=0
Expand Down Expand Up @@ -181,7 +181,7 @@ Last-Update: 2024-08-02
-# process has completed this stage. The output from the return socket is piped
-# into a shell so that the process can send a completion message (defaults to
-# "done", otherwise includes an error message) and an exit code to systemd.
-ExecStart=sh -c 'echo "start" | nc.openbsd -Uu -W1 /run/cloud-init/share/network.sock -s /run/cloud-init/share/network-return.sock | sh'
-ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/network.sock -s /run/cloud-init/share/network-return.sock | sh'
-RemainAfterExit=yes
-TimeoutSec=0
-
Expand Down
2 changes: 1 addition & 1 deletion systemd/cloud-config.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Type=oneshot
# process has completed this stage. The output from the return socket is piped
# into a shell so that the process can send a completion message (defaults to
# "done", otherwise includes an error message) and an exit code to systemd.
ExecStart=sh -c 'echo "start" | nc.openbsd -Uu -W1 /run/cloud-init/share/config.sock -s /run/cloud-init/share/config-return.sock | sh'
ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/config.sock -s /run/cloud-init/share/config-return.sock | sh'
RemainAfterExit=yes
TimeoutSec=0

Expand Down
2 changes: 1 addition & 1 deletion systemd/cloud-final.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Type=oneshot
# process has completed this stage. The output from the return socket is piped
# into a shell so that the process can send a completion message (defaults to
# "done", otherwise includes an error message) and an exit code to systemd.
ExecStart=sh -c 'echo "start" | nc.openbsd -Uu -W1 /run/cloud-init/share/final.sock -s /run/cloud-init/share/final-return.sock | sh'
ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/final.sock -s /run/cloud-init/share/final-return.sock | sh'
RemainAfterExit=yes
TimeoutSec=0
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
Expand Down
2 changes: 1 addition & 1 deletion systemd/cloud-init-local.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ExecStartPre=/usr/bin/touch /run/cloud-init/enabled
# process has completed this stage. The output from the return socket is piped
# into a shell so that the process can send a completion message (defaults to
# "done", otherwise includes an error message) and an exit code to systemd.
ExecStart=sh -c 'echo "start" | nc.openbsd -Uu -W1 /run/cloud-init/share/local.sock -s /run/cloud-init/share/local-return.sock | sh'
ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/local.sock -s /run/cloud-init/share/local-return.sock | sh'
RemainAfterExit=yes
TimeoutSec=0

Expand Down
2 changes: 1 addition & 1 deletion systemd/cloud-init-network.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Type=oneshot
# process has completed this stage. The output from the return socket is piped
# into a shell so that the process can send a completion message (defaults to
# "done", otherwise includes an error message) and an exit code to systemd.
ExecStart=sh -c 'echo "start" | nc.openbsd -Uu -W1 /run/cloud-init/share/network.sock -s /run/cloud-init/share/network-return.sock | sh'
ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/network.sock -s /run/cloud-init/share/network-return.sock | sh'
RemainAfterExit=yes
TimeoutSec=0

Expand Down
17 changes: 13 additions & 4 deletions tests/integration_tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from cloudinit.subp import subp
from tests.integration_tests.integration_settings import PLATFORM
from tests.integration_tests.releases import CURRENT_RELEASE, NOBLE

LOG = logging.getLogger("integration_testing.util")

Expand Down Expand Up @@ -347,15 +348,23 @@ def _verify_clean_boot(
out = instance.execute("cloud-init status --long")
assert 1 != out.return_code, (
f"Unexpected return code from `cloud-init status`. Expected rc=0 "
f"or rc=2, received rc={out.return_code}\nstdout: "
f"{out.stdout}\nstderr: {out.stderr}"
f"or rc=2, received rc={out.return_code}\nstdout:\n"
f"{out.stdout}\nstderr:\n{out.stderr}"
)
else:
# we know that we should have a return code of 2
out = instance.execute("cloud-init status --long")
assert 2 == out.return_code, (
rc = 2
if CURRENT_RELEASE < NOBLE and "main" != os.environ.get(
"GITHUB_BASE_REF"
):
# Old releases return 0 for backwards compatibility
rc = 0
assert rc == out.return_code, (
# CI on main doen't patch out this behavior so despite running on
# old releases it behaves as tip of main does
f"Unexpected return code from `cloud-init status`. "
f"Expected rc=2, received rc={out.return_code}\nstdout: "
f"Expected rc={rc}, received rc={out.return_code}\nstdout: "
f"{out.stdout}\nstderr: {out.stderr}"
)
schema = instance.execute("cloud-init schema --system --annotate")
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ passenv =
CLOUD_INIT_*
SSH_AUTH_SOCK
OS_*
GITHUB_*
setenv =
PYTEST_ADDOPTS="-m ci and not adhoc"

Expand Down