Skip to content

Commit

Permalink
merge from upstream/main at 24.3-23-ga9c6b140
Browse files Browse the repository at this point in the history
  • Loading branch information
blackboxsw committed Sep 13, 2024
2 parents b0542a4 + a9c6b14 commit 7aa9d07
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 8 deletions.
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/*']

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

0 comments on commit 7aa9d07

Please sign in to comment.