Merge ~nicolasbock/stsstack-bundles:paths into stsstack-bundles:master

Proposed by Nicolas Bock
Status: Merged
Merged at revision: a9a1edc98de860fd26ef26b1351153bb73ef83e4
Proposed branch: ~nicolasbock/stsstack-bundles:paths
Merge into: stsstack-bundles:master
Diff against target: 51 lines (+12/-6)
2 files modified
openstack/tools/setup_tempest.sh (+6/-3)
openstack/tools/upload_octavia_amphora_image.sh (+6/-3)
Reviewer Review Type Date Requested Status
Edward Hope-Morley Approve
Heather Lemon (community) Approve
Review via email: mp+391077@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Heather Lemon (hypothetical-lemon) :
review: Approve
Revision history for this message
Edward Hope-Morley (hopem) wrote :

I'm not clear why you would want to run tools/upload_octavia_amphora_image.sh from "anywhere" since it only relevant (a) for openstack deployments and (b) if you have sources novarc that is in the openstack module. If you use it from outside you are more likely to be using the wrong credentials. Maybe I'm missing a use-case?

Revision history for this message
Nicolas Bock (nicolasbock) wrote :

Maybe "anywhere" is a bit of an overstatement. The situation where this arose was that Heather was in the 'tools' directory and couldn't run the script. So maybe we don't want to run this from anywhere, but I think it would be nice if the script wasn't picky in terms of where you are when you run it. Does that clarify the use case a little bit?

Revision history for this message
Edward Hope-Morley (hopem) wrote :

yeah ok that makes sense, thanks for clarifying

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/openstack/tools/setup_tempest.sh b/openstack/tools/setup_tempest.sh
2index 487706b..cfacc17 100755
3--- a/openstack/tools/setup_tempest.sh
4+++ b/openstack/tools/setup_tempest.sh
5@@ -1,6 +1,9 @@
6-set -x -e
7-source ./profiles/common
8-source novarc
9+set -x -u -e
10+
11+scriptpath=$(readlink --canonicalize $(dirname $0))
12+
13+source ${scriptpath}/../profiles/common
14+source ${scriptpath}/../novarc
15
16 # Gather vars for tempest template
17 # TODO: remove fallbacks once we move to queens (they are there for clients still on ocata)
18diff --git a/openstack/tools/upload_octavia_amphora_image.sh b/openstack/tools/upload_octavia_amphora_image.sh
19index 21d8e7f..0219089 100755
20--- a/openstack/tools/upload_octavia_amphora_image.sh
21+++ b/openstack/tools/upload_octavia_amphora_image.sh
22@@ -6,6 +6,8 @@
23 declare release=
24 declare image_format=
25
26+scriptpath=$(readlink --canonicalize $(dirname $0))
27+
28 while (( $# > 0 )); do
29 case $1 in
30 --release|-r)
31@@ -44,7 +46,8 @@ if [[ -z ${release} ]]; then
32 exit 1
33 fi
34
35-set -x
36+set -x -e -u
37+
38 source ~/novarc
39 tmp=`mktemp`
40 source ~/novarc
41@@ -54,8 +57,8 @@ img="`egrep "${ts}.+$release" $tmp| tail -n 1`"
42 rm $tmp
43
44 export SWIFT_IP="10.230.19.58"
45-. ./profiles/common
46-source novarc
47+source ${scriptpath}/../profiles/common
48+source ${scriptpath}/../novarc
49 upload_image swift octavia-amphora $img $image_format
50
51 image_name=octavia-amphora

Subscribers

People subscribed via source and target branches