Merge ~ubuntu-release/autopkgtest/+git/development:arch-not-hwarch into ~ubuntu-release/autopkgtest/+git/development:master

Proposed by Brian Murray
Status: Merged
Merged at revision: f7cd36b1bfb9317a93257a4a63003d5f55e91c27
Proposed branch: ~ubuntu-release/autopkgtest/+git/development:arch-not-hwarch
Merge into: ~ubuntu-release/autopkgtest/+git/development:master
Diff against target: 13 lines (+1/-1)
1 file modified
ssh-setup/nova (+1/-1)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+450971@code.launchpad.net

Description of the change

ssh-setup/nova was failing with the following error:

9s flock: failed to execute s390x.boot.lock: No such file or directory

After a long debugging session I discovered that ARCH was incorrect:

ubuntu@juju-4d1272-prod-proposed-migration-14:~$ openstack image show adt/ubuntu-mantic-s390x-server-20230907.img -c properties -f json | grep architecture | cut -d'"' -f4 s390x s390x

Removing the cut this is because:

ubuntu@juju-4d1272-prod-proposed-migration-14:~$ openstack image show adt/ubuntu-mantic-s390x-server-20230907.img -c properties
 -f json | grep architecture
    "hw_architecture": "s390x",
    "architecture": "s390x",

While we should move to jq, it is not currently installed on both autopkgtest-cloud-workers and when new units are provisioned they aren't set up to have it, by switching the grep to '"architecture"' we can at least fix this issue.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ssh-setup/nova b/ssh-setup/nova
2index aafa08b..e581ee5 100755
3--- a/ssh-setup/nova
4+++ b/ssh-setup/nova
5@@ -231,7 +231,7 @@ EOF
6 # utlization in the cloud does not get reported properly and instances
7 # failed to boot.
8 # ARCH=$(openstack image show $imageuuid -c properties -f json | jq --raw-output .properties.architecture)
9- ARCH=$(openstack image show $imageuuid -c properties -f json | grep architecture | cut -d'"' -f4)
10+ ARCH=$(openstack image show $imageuuid -c properties -f json | grep '"architecture"' | cut -d'"' -f4)
11 flock --verbose -x /home/ubuntu/$OS_REGION_NAME-$ARCH.boot.lock sleep 15
12
13 # Boot a nova instance and returns its connection parameters

Subscribers

People subscribed via source and target branches