Merge ~ubuntu-release/autopkgtest/+git/development:flock-less into ~ubuntu-release/autopkgtest/+git/development:master

Proposed by Brian Murray
Status: Merged
Merge reported by: Brian Murray
Merged at revision: 1c14d445499f0b0ccc948db5e8a9f3be40d10356
Proposed branch: ~ubuntu-release/autopkgtest/+git/development:flock-less
Merge into: ~ubuntu-release/autopkgtest/+git/development:master
Diff against target: 19 lines (+6/-2)
1 file modified
ssh-setup/nova (+6/-2)
Reviewer Review Type Date Requested Status
Paride Legovini (community) Approve
Steve Langasek Needs Fixing
Review via email: mp+435769@code.launchpad.net

Description of the change

The creation of instances for running autopkgtests was taking an extraordinarily long period of time because we had up to 70 processes waiting for the lock file to be released. This reduces the period of time which we wait and creates per architecture lock files.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
6f895f3... by Brian Murray

Complete the change

348186f... by Brian Murray

Add a comment as to why we do this

Revision history for this message
Paride Legovini (paride) wrote :

As discussed in standup a nicer command would be:

  openstack image show "$imageuuid" -c properties -f json | jq --raw-output .properties.architecture

but we don't have jq installed. We should probably add it to the charm: it's a useful tool and adding it would be a simple exercise on changing the charm dependencies.

In any case this is good to land, so approving.

review: Approve
Revision history for this message
Paride Legovini (paride) wrote :

(Not merging in case you want to add the jq command as a comment.)

1c14d44... by Brian Murray

Add jq parsing for when we have it installed

Revision history for this message
Brian Murray (brian-murray) wrote :

Merged but with a squash so manually marking this as merged.

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 b828b1c..ba7cc65 100755
3--- a/ssh-setup/nova
4+++ b/ssh-setup/nova
5@@ -227,8 +227,12 @@ EOF
6 imageuuid=$(echo "$last" | cut -f1)
7 image=$(echo "$last" | cut -f2)
8
9- echo "Waiting..." >&2
10- flock -x /home/ubuntu/$OS_REGION_NAME.boot.lock sleep 30
11+ # Canonical IS requested that we limit boot rate as otherwise resource
12+ # utlization in the cloud does not get reported properly and instances
13+ # failed to boot.
14+ # ARCH=$(openstack image show $imageuuid -c properties -f json | jq --raw-output .properties.architecture)
15+ ARCH=$(openstack image show $imageuuid -c properties -f json | grep architecture | cut -d'"' -f4)
16+ flock --verbose -x /home/ubuntu/$OS_REGION_NAME-$ARCH.boot.lock sleep 15
17
18 # Boot a nova instance and returns its connection parameters
19 [ -n "$SRVNAME" ] || SRVNAME=`mktemp -u autopkgtest-nova-XXXXXX`

Subscribers

People subscribed via source and target branches