I have verified this bug is not reproducible with versions: 23.4.3-0ubuntu0~20.04.1, 23.4.3-0ubuntu0~22.04.1, 23.4.3-0ubuntu0~23.10.1, executing the following tests:
--- Test 1 - happy path
Logs attached.
The following tests have been performed manually due to the race-nature of them.
--- Test 2
# Launch instance with cloud-init 23.4.3.
# Wait until cloud-init finishes
# cp /usr/bin/systemctl /usr/bin/systemctl2
# cat <<EOF >/usr/bin/systemctl
#!/bin/bash
# Check if the first argument is 'show'
if [ "$1" == "show" ]; then
echo "'show' not allowed"
exit 1
fi
/usr/bin/systemctl2 "$@"
EOF
# Edit "/run/cloud-init/status.json". Change the "finished" time of "modules-final" to be "null". "cloud-init status --wait" blocks while printing dots on the CLI.
# Edit "/run/cloud-init/status.json". Change the "finished" time of "modules-final" to be "null". Add an arbitrary string to the "errors" list of "modules-final". "cloud-init status --wait" blocks but does not print dots.
# Replace the hand-made "systemctl" script with the real systemctl binary. "cloud-init status --wait" call made earlier now starts printing dots.
--- Test 3
# Launch instance with cloud-init 23.4.3.
# Wait until cloud-init finishes
# cp /usr/bin/systemctl /usr/bin/systemctl2
# cat <<EOF >/usr/bin/systemctl
#!/bin/bash
# Check if the first argument is 'show'
if [ "$1" == "show" ]; then
echo "'show' not allowed"
exit 1
fi
if [ "$1" == "show-environment" ]; then
echo "'show-environment' not allowed"
exit 1
fi
/usr/bin/systemctl2 "$@"
EOF
# "cloud-init status --wait" blocks without printing dots. This is expected behavior, as cloud-init needs to know if the boot status (if it was disabled or not) in order to print dots or do something.
I have verified this bug is not reproducible with versions: 23.4.3- 0ubuntu0~ 20.04.1, 23.4.3- 0ubuntu0~ 22.04.1, 23.4.3- 0ubuntu0~ 23.10.1, executing the following tests:
--- Test 1 - happy path
Logs attached.
The following tests have been performed manually due to the race-nature of them.
--- Test 2
# Launch instance with cloud-init 23.4.3.
# Wait until cloud-init finishes
# cp /usr/bin/systemctl /usr/bin/systemctl2
# cat <<EOF >/usr/bin/systemctl
#!/bin/bash
# Check if the first argument is 'show'
if [ "$1" == "show" ]; then
echo "'show' not allowed"
exit 1
fi
/usr/bin/systemctl2 "$@"
EOF
# Edit "/run/cloud- init/status. json". Change the "finished" time of "modules-final" to be "null". "cloud-init status --wait" blocks while printing dots on the CLI. init/status. json". Change the "finished" time of "modules-final" to be "null". Add an arbitrary string to the "errors" list of "modules-final". "cloud-init status --wait" blocks but does not print dots.
# Edit "/run/cloud-
# Replace the hand-made "systemctl" script with the real systemctl binary. "cloud-init status --wait" call made earlier now starts printing dots.
--- Test 3
# Launch instance with cloud-init 23.4.3.
# Wait until cloud-init finishes
# cp /usr/bin/systemctl /usr/bin/systemctl2
# cat <<EOF >/usr/bin/systemctl
#!/bin/bash
# Check if the first argument is 'show'
if [ "$1" == "show" ]; then
echo "'show' not allowed"
exit 1
fi
if [ "$1" == "show-environment" ]; then
echo "'show-environment' not allowed"
exit 1
fi
/usr/bin/systemctl2 "$@"
EOF
# "cloud-init status --wait" blocks without printing dots. This is expected behavior, as cloud-init needs to know if the boot status (if it was disabled or not) in order to print dots or do something.