Merge ~hopem/stsstack-bundles:default-to-focal into stsstack-bundles:master

Proposed by Edward Hope-Morley
Status: Superseded
Proposed branch: ~hopem/stsstack-bundles:default-to-focal
Merge into: stsstack-bundles:master
Diff against target: 95 lines (+26/-18)
4 files modified
common/helpers (+1/-1)
openstack/profiles/default (+23/-15)
overlays/glance-simplestreams-sync.yaml (+1/-1)
tools/vault-unseal-and-authorise.sh (+1/-1)
Reviewer Review Type Date Requested Status
Jolly Bundlers Pending
Review via email: mp+391869@code.launchpad.net

This proposal has been superseded by a proposal from 2020-10-06.

To post a comment you must log in.

Unmerged commits

e64300e... by Edward Hope-Morley

Set default series to Focal

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/common/helpers b/common/helpers
2index 72d8f2a..1f4882e 100644
3--- a/common/helpers
4+++ b/common/helpers
5@@ -9,7 +9,7 @@ declare -A MASTER_OPTS=(
6 [VIP_ADDR_START]=10.5.100.0
7 [CHARM_REVISIONS]=
8 )
9-DEFAULT_SERIES=bionic
10+DEFAULT_SERIES=focal
11 JUJU_VERSION="`juju show-controller| sed -r 's/.+controller-model-version:\s+(.+)/\1/g;t;d' 2>/dev/null`" || true
12 [ -n "$JUJU_VERSION" ] || JUJU_VERSION="`juju --version 2>/dev/null| sed -r 's/^([[:digit:]\.]+).*/\1/g'`"
13 JUJU_DEPLOY_OPTS=""
14diff --git a/openstack/profiles/default b/openstack/profiles/default
15index 7d9c658..bc2273f 100755
16--- a/openstack/profiles/default
17+++ b/openstack/profiles/default
18@@ -54,28 +54,36 @@ else
19 create_tempest_users
20 fi
21
22+set_img_properties ()
23+{
24+ img_name=$1
25+ img_version=$2
26+ img_file=$3
27+
28+ ts=`stat ~/images/$img_file| sed -rn 's/Modify:\s+([[:digit:]-]+)\s+.+/\1/p'| tr -d '-'`
29+ declare -A props=( [architecture]=x86_64
30+ [os_distro]='ubuntu'
31+ [os_version]=$img_version
32+ [version_name]="$ts"
33+ [product_name]="com.ubuntu.cloud:server:${img_version}:amd64"
34+ )
35+ for p in ${!props[@]}; do
36+ openstack image set --property $p=${props[$p]} $img_name &
37+ done
38+ wait
39+}
40+
41 # Download images if not already present
42 mkdir -vp ~/images
43 upload_image cloudimages bionic bionic-server-cloudimg-amd64.img &
44+upload_image cloudimages focal focal-server-cloudimg-amd64.img &
45+# Set properties needed by octavia-disk-image-retrofit (See LP: #1842430)
46+set_img_properties bionic 18.04 bionic-server-cloudimg-amd64.img &
47+set_img_properties focal 20.04 focal-server-cloudimg-amd64.img &
48 upload_image swift cirros cirros-0.4.0-x86_64-disk.img &
49 upload_image swift cirros2 cirros-0.3.5-x86_64-disk.img &
50 wait
51
52-# Set properties needed by octavia-disk-image-retrofit (See LP: #1842430) - we only do Bionic for now since that's the only one supported.
53-img_file=bionic-server-cloudimg-amd64.img
54-img_name=bionic
55-ts=`stat ~/images/$img_file| sed -r 's/Modify:\s+([[:digit:]-]+)\s+.+/\1/g;t;d'| tr -d '-'`
56-declare -A props=( [architecture]=x86_64
57- [os_distro]='ubuntu'
58- [os_version]='18.04'
59- [version_name]="$ts"
60- [product_name]="com.ubuntu.cloud:server:18.04:amd64"
61-)
62-for p in ${!props[@]}; do
63- openstack image set --property $p=${props[$p]} $img_name &
64-done
65-wait
66-
67 # TODO: remove fallbacks once we move to queens (they are there for clients still on ocata)
68 image_id=$(openstack image list --name cirros -f value -c ID 2>/dev/null || openstack image list| awk '$4=="cirros" {print $2}')
69 image_alt_id=$(openstack image list --name cirros2 -f value -c ID 2>/dev/null || openstack image list| awk '$4=="cirros2" {print $2}')
70diff --git a/overlays/glance-simplestreams-sync.yaml b/overlays/glance-simplestreams-sync.yaml
71index d5bc432..8c8fd06 100644
72--- a/overlays/glance-simplestreams-sync.yaml
73+++ b/overlays/glance-simplestreams-sync.yaml
74@@ -11,7 +11,7 @@ applications:
75 [{url: 'http://cloud-images.ubuntu.com/daily/',
76 name_prefix: 'ubuntu:daily',
77 path: 'streams/v1/index.sjson', max: 1,
78- item_filters: ['release~(bionic)',
79+ item_filters: ['release~(focal)',
80 'arch~(x86_64|amd64)',
81 'ftype~(disk1.img|disk.img)']}]
82 use_swift: __GSSS_SWIFT_ENABLED__
83diff --git a/tools/vault-unseal-and-authorise.sh b/tools/vault-unseal-and-authorise.sh
84index dda449b..1de1391 100755
85--- a/tools/vault-unseal-and-authorise.sh
86+++ b/tools/vault-unseal-and-authorise.sh
87@@ -8,7 +8,7 @@ unseal_output=~/unseal_output.$model
88
89 ftmp=`mktemp`
90 juju status --format=json vault > $ftmp
91-readarray -t addrs<<<"`jq -r '.applications[].units[]."public-address"' $ftmp 2>/dev/null`"
92+readarray -t addrs<<<"`jq -r '.applications[].units[]?."public-address"' $ftmp 2>/dev/null`"
93 leader="`jq -r '.applications[].units | to_entries[] | select(.value.leader==true) | .key' $ftmp 2>/dev/null`"
94 leader_addr="`jq -r '.applications[].units | to_entries[] | select(.value.leader==true) | .value."public-address"' $ftmp 2>/dev/null`"
95 rm $ftmp

Subscribers

People subscribed via source and target branches