Skip to content

Commit

Permalink
opensuse: debug further
Browse files Browse the repository at this point in the history
  • Loading branch information
MusicDin committed Apr 2, 2024
1 parent a64e0dd commit eb944a5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
26 changes: 19 additions & 7 deletions bin/test-image
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,21 @@ for url in $(lxc query "/1.0/instances" | jq -r .[] | grep "${TEST_IMAGE}"); do

# Systemd cleanliness.
if lxc exec "${name}" -- sh -c "type systemctl" >/dev/null 2>&1; then
lxc exec "${name}" -- systemctl reset-failed systemd-networkd-wait-online.service >/dev/null 2>&1 || true


echo "===> DEBUG: cloud init status (${name})"
systemctl status cloud-config.service || true
systemctl status cloud-init-local.service || true

echo "===> DEBUG: cloud init journalctl (${name})"
journalctl -u cloud-init.service || true
journalctl -u cloud-config.service || true
journalctl -u cloud-init-local.service || true

echo "===> DEBUG: cloud init LOG (${name})"
cat /var/log/cloud-init-output.log || true


if lxc exec "${name}" -- systemctl --failed 2>&1 | grep -q '\sfailed\s'; then
echo "===> FAIL: systemd clean: ${name}"

Expand Down Expand Up @@ -258,13 +272,11 @@ for url in $(lxc query "/1.0/instances" | jq -r .[] | grep "${TEST_IMAGE}"); do
# Cloud-init testing
if [ "${VARIANT}" = "cloud" ]; then

# echo "===> DEBUG: ls -lah /etc/cloud"
# ls -lah /etc/cloud/cloud.cfg || true

echo "===> DEBUG: ls -lah /etc/cloud"
ls -lah /etc/cloud/cloud.cfg || true

echo "===> DEBUG: cat /etc/cloud/cloud.cfg"
cat /etc/cloud/cloud.cfg || true

# echo "===> DEBUG: cat /etc/cloud/cloud.cfg"
# cat /etc/cloud/cloud.cfg || true

if [ "$(lxc file pull "${name}/user-data" - 2>/dev/null)" = "foo" ]; then
echo "===> PASS: cloud-init user-data provisioning: ${name}"
Expand Down
4 changes: 4 additions & 0 deletions images/opensuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ actions:
zypper install -y -t pattern kde
# Reliable shutdown
echo HandlePowerKey=poweroff >> /etc/systemd/logind.conf
echo PowerKeyIgnoreInhibited=yes >> /etc/systemd/logind.conf
# Timezone
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/UTC /etc/localtime
Expand Down

0 comments on commit eb944a5

Please sign in to comment.