Merge lp:~1chb1n/ubuntu-openstack-ci/arches-1705a into lp:ubuntu-openstack-ci

Proposed by Ryan Beisner
Status: Merged
Merged at revision: 393
Proposed branch: lp:~1chb1n/ubuntu-openstack-ci/arches-1705a
Merge into: lp:ubuntu-openstack-ci
Diff against target: 721 lines (+203/-124)
17 files modified
deploy/README.md (+1/-1)
deploy/assets/gerrit_host_keys (+0/-1)
deploy/assets/link_secrets.sh (+7/-0)
deploy/assets/other_host_keys (+1/-0)
deploy/post-deploy/102-ssh-creds.sh (+2/-2)
deploy/templates/oscirc (+3/-2)
run/job-parts/build_bucket_junk_cleanup.sh (+2/-2)
run/job-parts/build_charm_single.sh (+3/-2)
run/job-parts/build_mojo_runner.sh (+18/-33)
run/job-parts/build_openstack_bundles_runner.sh (+21/-0)
run/job-parts/build_prescribe.sh (+1/-0)
run/job-parts/deprecated/osci_juju1_common.sh (+3/-3)
run/job-parts/osci_gerrit_common.sh (+14/-8)
run/job-parts/osci_job_common.sh (+77/-20)
run/job-parts/osci_mojo_common.sh (+8/-29)
run/job-parts/osci_openstack_common.sh (+41/-20)
run/job-parts/osci_repos_common.sh (+1/-1)
To merge this branch: bzr merge lp:~1chb1n/ubuntu-openstack-ci/arches-1705a
Reviewer Review Type Date Requested Status
uosci-testing-bot Approve
Review via email: mp+325005@code.launchpad.net

Commit message

Merge the live operating branch of OSCI back into trunk.

Add retries to charm-test-infra juju commands to work around
LP 1709324. Also clean up the checkout dir to prevent disk
from filling on jenkins slaves.

Update mojo_runner for Juju 2.x

Set MOJO_SERIES for legacy specs

Calculate GATEWAY based on CIDR_EXT

Announce MOJO_* env vars

Correct VIP_RANGE usage

Use venv for lolo_logpuller

Update to use MODEL_NAME

Actually delete ext-ports again

Use bc venv for env-render tool too

Raise charm store api timeout from 10s default to 60s

Export USER env var for charm-tools compat

Update tmp cleanup

Use master of charm-test-infra

Switch charm-single to xenial and bionic

Enable gerrit account whitelist

Move bot-control back to master

Update artifact junk cleanup dates

Timeout swift commands

Update mojo runner for git repo and branch

Description of the change

Merge the live operating branch of OSCI back into trunk.

Add retries to charm-test-infra juju commands to work around
LP 1709324. Also clean up the checkout dir to prevent disk
from filling on jenkins slaves.

Update mojo_runner for Juju 2.x

Set MOJO_SERIES for legacy specs

Calculate GATEWAY based on CIDR_EXT

Announce MOJO_* env vars

Correct VIP_RANGE usage

Use venv for lolo_logpuller

Update to use MODEL_NAME

Actually delete ext-ports again

Use bc venv for env-render tool too

Raise charm store api timeout from 10s default to 60s

Export USER env var for charm-tools compat

Update tmp cleanup

Use master of charm-test-infra

Switch charm-single to xenial and bionic

Enable gerrit account whitelist

Move bot-control back to master

Update artifact junk cleanup dates

Timeout swift commands

Update mojo runner for git repo and branch

To post a comment you must log in.
394. By Ryan Beisner

Temporarily use WIP branch

395. By Ryan Beisner

Add initial openstack-bundles runner

396. By Ryan Beisner

Use CTI temp wip branch

397. By Ryan Beisner

Add maas bootstrap wrapper

398. By Ryan Beisner

Fix path trailing slash

399. By Ryan Beisner

Update osci master ip

400. By Ryan Beisner

Update other hosts

401. By Ryan Beisner

Set known hosts

402. By Ryan Beisner

Remove Yakkety from charm-single test

403. By Ryan Beisner

Add retries to charm-test-infra juju commands to work around
LP 1709324. Also clean up the checkout dir to prevent disk
from filling on jenkins slaves.

404. By Ryan Beisner

Update mojo_runner for Juju 2.x

405. By Ryan Beisner

Set MOJO_SERIES for legacy specs

406. By Ryan Beisner

Calculate GATEWAY based on CIDR_EXT

407. By Ryan Beisner

Announce MOJO_* env vars

408. By Ryan Beisner

Correct VIP_RANGE usage

409. By Ryan Beisner

Use venv for lolo_logpuller

410. By Ryan Beisner

Update to use MODEL_NAME

411. By Ryan Beisner

Actually delete ext-ports again

412. By Ryan Beisner

Use bc venv for env-render tool too

413. By Ryan Beisner

Raise charm store api timeout from 10s default to 60s

414. By Ryan Beisner

Export USER env var for charm-tools compat

415. By Ryan Beisner

Update tmp cleanup

416. By Ryan Beisner

Use master of charm-test-infra

417. By Ryan Beisner

Switch charm-single to xenial and bionic

418. By Ryan Beisner

Enable gerrit account whitelist

419. By Ryan Beisner

Move bot-control back to master

420. By Ryan Beisner

Update artifact junk cleanup dates

421. By Ryan Beisner

Update artifact junk cleanup dates

422. By Ryan Beisner

Timeout swift commands

423. By Ryan Beisner

Update mojo runner for git repo and branch

Revision history for this message
uosci-testing-bot (uosci-testing-bot) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deploy/README.md'
2--- deploy/README.md 2017-05-22 22:11:26 +0000
3+++ deploy/README.md 2018-03-21 18:25:26 +0000
4@@ -6,6 +6,6 @@
5 * osci-model-deploy.sh
6 * May have to `juju resolved osci-master/0` to trigger a hook retry. The jenkins charm as of 2017 Apr 13 has a race condition which consistently requires one re-run of the storage-attached hook.
7 * osci-float-all-instances.sh
8-* osci-nets-and-models.py
9+* osci-nets-and-models.py - idempotent script to create/recreate/update osci networks and distribute the oscirc file to all slaves
10 * osci-set-subnets-dns.sh
11 * post-deploy/* # Look first, use with intent and caution.
12
13=== modified file 'deploy/assets/gerrit_host_keys'
14--- deploy/assets/gerrit_host_keys 2016-02-24 19:45:46 +0000
15+++ deploy/assets/gerrit_host_keys 2018-03-21 18:25:26 +0000
16@@ -1,3 +1,2 @@
17 |1|yRJCBMbG5INu/6HIArsnDPkaz74=|u2cF49fVES1y6Akk6+RS8ogkgBg= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfsIj/jqpI+2CFdjCL6kOiqdORWvxQ2sQbCzSzzmLXic8yVhCCbwarkvEpfUOHG4eyB0vqVZfMffxf0Yy3qjURrsroBCiuJ8GdiAcGdfYwHNfBI0cR6kydBZL537YDasIk0Z3ILzhwf7474LmkVzS7V2tMTb4ZiBS/jUeiHsVp88FZhIBkyhlb/awAGcUxT5U4QBXCAmerYXeB47FPuz9JFOVyF08LzH9JRe9tfXtqaCNhlSdRe/2pPRvn2EIhn5uHWwATACG9MBdrK8xv8LqPOik2w1JkgLWyBj11vDd5I3IjrmREGw8dqImqp0r6MD8rxqADlc1elfDIXYsy+TVH
18 |1|Q9MKxCi+c8lj5lqOlX+gg9H6Xs4=|WiU87JswA/sA8P0BLG2sEvagDQY= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfsIj/jqpI+2CFdjCL6kOiqdORWvxQ2sQbCzSzzmLXic8yVhCCbwarkvEpfUOHG4eyB0vqVZfMffxf0Yy3qjURrsroBCiuJ8GdiAcGdfYwHNfBI0cR6kydBZL537YDasIk0Z3ILzhwf7474LmkVzS7V2tMTb4ZiBS/jUeiHsVp88FZhIBkyhlb/awAGcUxT5U4QBXCAmerYXeB47FPuz9JFOVyF08LzH9JRe9tfXtqaCNhlSdRe/2pPRvn2EIhn5uHWwATACG9MBdrK8xv8LqPOik2w1JkgLWyBj11vDd5I3IjrmREGw8dqImqp0r6MD8rxqADlc1elfDIXYsy+TVH
19-
20
21=== added file 'deploy/assets/link_secrets.sh'
22--- deploy/assets/link_secrets.sh 1970-01-01 00:00:00 +0000
23+++ deploy/assets/link_secrets.sh 2018-03-21 18:25:26 +0000
24@@ -0,0 +1,7 @@
25+#!/bin/bash -uex
26+# Files should be manually placed in a secrets dir 1 level down
27+# from the uosci repo checkout. Then link them here.
28+ln -s ../../../secrets/id_rsa .
29+ln -s ../../../secrets/id_rsa.pub .
30+ln -s ../../../secrets/novarc-artifactcloud .
31+ln -s ../../../secrets/uosci-bot-go-cookies.tar.bz2 .
32
33=== modified file 'deploy/assets/other_host_keys'
34--- deploy/assets/other_host_keys 2017-04-21 21:34:05 +0000
35+++ deploy/assets/other_host_keys 2018-03-21 18:25:26 +0000
36@@ -3,4 +3,5 @@
37 |1|G7bqYoGs0/7WcgVONKheHbvjbW0=|EWaUmfiDVX5psurof0gbxBW6djs= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHfg+sp98jxYz9zhxM33ouLNx0rDhXrTLVWU2fZQiMmOCc91H376aU9VzDYd+GRjSewqyz67zpSqsDHd1t6e+J0=
38 |1|/uNVERTIWkRm/NIA2HQGM/e+WSs=|584GneqB0FnxjW4yPzufWpoZ3Xw= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHfg+sp98jxYz9zhxM33ouLNx0rDhXrTLVWU2fZQiMmOCc91H376aU9VzDYd+GRjSewqyz67zpSqsDHd1t6e+J0=
39 |1|pJss/g21mdSvAv7PCtXEl6ikX8s=|lu9UENRQqyzTsGJdMPRJ3YPb4gQ= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDIYipSuaupaQ0PVZiaGWY8oc+r1SLI2PtVyXJA3WcfqrJ79Of7ZOSoHHwwNDkKnzOGj2yu7gohyWBJY2HP83WU=
40+|1|rBkrkPfcDAT/MLb0T6o/YeBvmAQ=|49UQeV5BQ/6IFUR2LnixyMktzTU= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM1zv4lS+da0WaBu6mnxGEjFAjGzmKez02OQb9yYQwmp6NGlkKTr421YFyf+kHK83Lip+K0YSEhhyv0pl2oiy0A=
41
42
43=== modified file 'deploy/post-deploy/102-ssh-creds.sh'
44--- deploy/post-deploy/102-ssh-creds.sh 2017-04-14 05:08:42 +0000
45+++ deploy/post-deploy/102-ssh-creds.sh 2018-03-21 18:25:26 +0000
46@@ -11,7 +11,7 @@
47 f_tmp="${U_HOME}/.ssh"
48 f_src="${PUB_KEY} ${PRIV_KEY} ${SSH_CONF}"
49 base_src="assets"
50-lp_hk=$(cat ${base_src}/launchpad_host_keys)
51+hostkeys=$(cat ${base_src}/*_host_keys)
52 d_str=$(date +'%H%M%S')
53
54 for srcs in $f_src; do
55@@ -25,7 +25,7 @@
56 for unit in $UNITS; do
57 echo "Copying SSH key files to ${unit}..."
58 juju ssh ${unit} "sudo mkdir -vp ${f_dst} && sudo mkdir -p ${f_tmp} &&\
59- sudo echo '${lp_hk}' > /tmp/hk${d_str} &&\
60+ sudo echo '${hostkeys}' > /tmp/hk${d_str} &&\
61 sudo cp -fv /tmp/hk${d_str} /root/.ssh/known_hosts &&\
62 sudo mv -fv /tmp/hk${d_str} ${f_dst}/known_hosts"
63
64
65=== modified file 'deploy/templates/oscirc'
66--- deploy/templates/oscirc 2017-05-23 21:50:25 +0000
67+++ deploy/templates/oscirc 2018-03-21 18:25:26 +0000
68@@ -7,8 +7,9 @@
69 export AMULET_HTTP_PROXY="http://squid.internal:3128/"
70 export BAK_REMOTE_BASE_DIR="/home/ubuntu/osci/bak-osci-master"
71 export BAK_USER_HOST="ubuntu@10.245.168.2"
72-export OSCI_MASTER_IP="10.245.162.9"
73-export OSCI_REPO="lp:ubuntu-openstack-ci"
74+export OSCI_MASTER_IP="10.245.162.49"
75+#export OSCI_REPO="lp:ubuntu-openstack-ci"
76+export OSCI_REPO="lp:~1chb1n/ubuntu-openstack-ci/arches-1705a" # WIP
77
78 : ${EXECUTOR_NUMBER:="z"}
79 export OSCI_ROOT="/var/lib/jenkins/tools/$EXECUTOR_NUMBER/ubuntu-openstack-ci"
80
81=== modified file 'run/job-parts/build_bucket_junk_cleanup.sh'
82--- run/job-parts/build_bucket_junk_cleanup.sh 2017-04-19 17:54:10 +0000
83+++ run/job-parts/build_bucket_junk_cleanup.sh 2018-03-21 18:25:26 +0000
84@@ -5,9 +5,9 @@
85 f_gerrit_set_blob_vars
86 f_novarc_artifactcloud
87
88-set -uex
89+set -ex
90
91-junk_pattern="///|nosuch|sandbox|/_/|2016-01|2016-02|2016-03|2016-04|2016-05|2016-06|2016-07|2016-08|2016-09|2016-10|2015-|2014-"
92+junk_pattern="///|nosuch|sandbox|/_/|2016-|2015-|2014-"
93 bucket_list_tmp="$(mktemp)"
94 junk_list_tmp="$(mktemp)"
95
96
97=== modified file 'run/job-parts/build_charm_single.sh'
98--- run/job-parts/build_charm_single.sh 2017-04-27 12:58:23 +0000
99+++ run/job-parts/build_charm_single.sh 2018-03-21 18:25:26 +0000
100@@ -10,8 +10,8 @@
101 f_layerci_build_if_necessary
102
103 # Series to exercise
104-DEVEL_SERIES_EXERCISE="xenial yakkety zesty"
105-STABLE_SERIES_EXERCISE="xenial yakkety"
106+DEVEL_SERIES_EXERCISE="xenial bionic"
107+STABLE_SERIES_EXERCISE="xenial"
108
109 if [[ -z "$SERIES_EXERCISE" ]] && [[ "$GERRIT_BRANCH" != *stable* ]] && [[ "$GIT_BRANCH" != *stable* ]]; then
110 # Master (dev)
111@@ -67,6 +67,7 @@
112 cp $CHARM_SINGLE_YAML $YAML_TMP
113 echo " + Rendering file: $CHARM_SINGLE_YAML to $YAML_TMP"
114
115+ f_activate_botcontrol_tools_virtualenv
116 ${UOSCI_BOT_CONTROL_ROOT}/tools/env-render -vy $YAML_TMP
117 sed -e "s/^$BASE_NAME:/$APP_NAME:/" -i $YAML_TMP
118 cp $YAML_TMP $WORKSPACE/$APP_NAME.yaml.txt
119
120=== modified file 'run/job-parts/build_mojo_runner.sh'
121--- run/job-parts/build_mojo_runner.sh 2017-04-26 22:43:21 +0000
122+++ run/job-parts/build_mojo_runner.sh 2018-03-21 18:25:26 +0000
123@@ -1,27 +1,15 @@
124 #!/bin/bash -e
125-# Mojo runner for UOSCI
126-
127-# /!\ Temporary override for spec dev
128-# [[ -z "$MOJO_OPENSTACK_SPECS_REPO" ]] && export MOJO_OPENSTACK_SPECS_REPO="lp:~ost-maintainers/openstack-mojo-specs/mojo-openstack-specs"
129-
130-[[ -z "$MOJO_SERIES" ]] && export MOJO_SERIES="trusty"
131-[[ -z "$MOJO_SPEC" ]] && export MOJO_SPEC="specs/full_stack/next_deploy_baremetal/icehouse"
132-
133-# Source the common functions
134 . ${OSCI_ROOT}/run/job-parts/osci_job_common.sh
135+f_fresh_clean_start
136+f_tool_refresh_bot_control
137+f_openstack_uos_env_var_normalize
138+f_activate_clients
139
140-# Set common, constant mojo workspace and project names
141+# Set mojo workspace and project names
142 export MOJO_WKSP="osci-mojo"
143 export MOJO_PROJ="mojo-openstack-specs"
144 export MOJO_ROOT="$(mktemp -d)"
145
146-# Prep environment
147-f_fresh_clean_start
148-f_env_no_pass
149-
150-f_tool_refresh_bot_control
151-f_mojo_create_venv
152-
153 f_line "validating mojo runner env vars"
154 f_mojo_handle_env_vars
155
156@@ -31,22 +19,21 @@
157 f_line "defining new mojo workspace"
158 f_mojo_new_workspace
159
160-f_line "check that mojo spec manifest exists"
161-MOJO_MANIFEST_FILE=${MOJO_ROOT}/${MOJO_PROJ}/${MOJO_SERIES}/${MOJO_WKSP}/spec/${MOJO_SPEC}/manifest
162-ls -alh $MOJO_MANIFEST_FILE
163-
164-f_line "bootstrapping"
165+MOJO_MANIFEST_FILE=${MOJO_ROOT}/${MOJO_PROJ}/${UBUNTU_RELEASE}/${MOJO_WKSP}/spec/${MOJO_SPEC}/manifest
166
167 if [[ "$MOJO_SPEC" == *metal* ]]; then
168 # Handle baremetal specs
169- export UOSCI_JUJU_TAGS="arch=amd64 tags=uosci"
170- juju bootstrap --upload-tools --constraints="${UOSCI_JUJU_TAGS}" 2>&1 | tee $WORKSPACE/juju-bootstrap.$BUILD_NUMBER.txt
171- if [[ "${PIPESTATUS[0]}" != "0" ]]; then
172- echo " ! Bootstrap failed."
173- touch $WORKSPACE/fyi-${test:0:4}.${test}-bootstrap.failed
174- fi
175+ exit 1 # Not yet re-implemented for Juju 2.x
176+ # Legacy Juju 1.x:
177+ # export UOSCI_JUJU_TAGS="arch=amd64 tags=uosci"
178+ # juju bootstrap --upload-tools --constraints="${UOSCI_JUJU_TAGS}" 2>&1 | tee $WORKSPACE/juju-bootstrap.$BUILD_NUMBER.txt
179+ # if [[ "${PIPESTATUS[0]}" != "0" ]]; then
180+ # echo " ! Bootstrap failed."
181+ # touch $WORKSPACE/fyi-${test:0:4}.${test}-bootstrap.failed
182+ # fi
183 else
184 # Not baremetal
185+ # Bootstrap Controller and add Model if necessary
186 f_juju_bootstrap
187 fi
188
189@@ -54,12 +41,10 @@
190 f_mojo_run
191 f_line "end of mojo's run"
192
193-# DEBUG: list all running instances and all neutron ports
194-f_list_nova_instances
195-f_list_neutron_ports
196+f_juju_stat
197+f_lolo_log_puller
198
199-# Wrap up
200-# XXX: f_collect_juju_logs
201 f_set_build_descr
202 f_nice_finish
203 f_check_fail
204+
205
206=== added file 'run/job-parts/build_openstack_bundles_runner.sh'
207--- run/job-parts/build_openstack_bundles_runner.sh 1970-01-01 00:00:00 +0000
208+++ run/job-parts/build_openstack_bundles_runner.sh 2018-03-21 18:25:26 +0000
209@@ -0,0 +1,21 @@
210+#!/bin/bash -e
211+. ${OSCI_ROOT}/run/job-parts/osci_job_common.sh
212+
213+f_fresh_clean_start
214+f_amulet_set_network_env_vars
215+f_tool_refresh_cti
216+f_juju_bootstrap_maas
217+f_line
218+
219+cp -fv $HOME/maas/maas-temp.yaml $CTI_CODIR/juju-configs/credentials.yaml
220+
221+set -u
222+stat -t $CTI_CODIR/runners/$BUNDLE_NAME/run.sh
223+cd $CTI_CODIR/runners/$BUNDLE_NAME
224+./run.sh
225+
226+f_line
227+f_set_build_descr
228+f_nice_finish
229+f_check_fail
230+
231
232=== modified file 'run/job-parts/build_prescribe.sh'
233--- run/job-parts/build_prescribe.sh 2017-04-18 19:39:32 +0000
234+++ run/job-parts/build_prescribe.sh 2018-03-21 18:25:26 +0000
235@@ -9,6 +9,7 @@
236 f_line "Prescribing build and/or deploy needs"
237 f_skip_juju_foo
238 f_tool_refresh_bot_control
239+f_gerrit_trigger_whitelist_check
240 f_check_out_universal
241
242 f_layerci_get_asset_type $CO_DIR
243
244=== renamed file 'run/job-parts/osci_juju1_common.sh' => 'run/job-parts/deprecated/osci_juju1_common.sh'
245--- run/job-parts/osci_juju1_common.sh 2017-04-26 22:43:21 +0000
246+++ run/job-parts/deprecated/osci_juju1_common.sh 2018-03-21 18:25:26 +0000
247@@ -30,15 +30,15 @@
248 case "$JUJU_SOURCE" in
249 $JUJU_STABLE)
250 echo " . Juju stable"
251- JENV_NAME="$(grep "maas-${MOJO_SERIES}:$" ${juju_enviro_file} | head -n1 | cut -f1 -d ':' | xargs)"
252+ JENV_NAME="$(grep "maas-${UBUNTU_RELEASE}:$" ${juju_enviro_file} | head -n1 | cut -f1 -d ':' | xargs)"
253 ;;
254 $JUJU_PROPOSED)
255 echo " . Juju proposed"
256- JENV_NAME="$(grep .jprop:$ ${juju_enviro_file} | grep "maas-${MOJO_SERIES}" | head -n1 | cut -f1 -d ':' | xargs)"
257+ JENV_NAME="$(grep .jprop:$ ${juju_enviro_file} | grep "maas-${UBUNTU_RELEASE}" | head -n1 | cut -f1 -d ':' | xargs)"
258 ;;
259 $JUJU_DEVEL)
260 echo " . Juju devel"
261- JENV_NAME="$(grep .jdev:$ ${juju_enviro_file} | grep "maas-${MOJO_SERIES}" | head -n1 | cut -f1 -d ':' | xargs)"
262+ JENV_NAME="$(grep .jdev:$ ${juju_enviro_file} | grep "maas-${UBUNTU_RELEASE}" | head -n1 | cut -f1 -d ':' | xargs)"
263 ;;
264 *)
265 echo " ! Unknown JUJU_SOURCE value while determining jenv name."
266
267=== modified file 'run/job-parts/osci_gerrit_common.sh'
268--- run/job-parts/osci_gerrit_common.sh 2017-04-20 12:36:39 +0000
269+++ run/job-parts/osci_gerrit_common.sh 2018-03-21 18:25:26 +0000
270@@ -181,7 +181,7 @@
271 f_gerrit_create_artifact_index
272 echo "Uploading..."
273 f_novarc_artifactcloud
274- swift upload $UOSCI_BUCKET_NAME --object-name $UOSCI_BLOB_PATH ${WORKSPACE}
275+ timeout 600 swift upload $UOSCI_BUCKET_NAME --object-name $UOSCI_BLOB_PATH ${WORKSPACE}
276
277 # Set content-type for txt and html files
278 export OBJECT_MATCH_PATTERN="$UOSCI_BLOB_PATH"
279@@ -197,9 +197,9 @@
280 # The Liberty swift client does not set headers on upload (with radosgw
281 # object storage), hence the post after upload.
282 set -x
283- swift upload -c -H "content-type:text/html" $UOSCI_BUCKET_NAME index.html
284- swift post -H "content-type:text/html" $UOSCI_BUCKET_NAME index.html
285- swift stat $UOSCI_BUCKET_NAME index.html
286+ timeout 600 swift upload -c -H "content-type:text/html" $UOSCI_BUCKET_NAME index.html
287+ timeout 600 swift post -H "content-type:text/html" $UOSCI_BUCKET_NAME index.html
288+ timeout 600 swift stat $UOSCI_BUCKET_NAME index.html
289 set +x
290 }
291
292@@ -280,7 +280,7 @@
293 add_line " <table>"
294
295 # Get index string from key 4, reverse sort by key 2 (date)
296- INDICES=$(swift list uosci-artifacts -l | grep -e 'index.html$' | grep -v ' index.html' | sort -rk 2 | awk '{ print $4 }')
297+ INDICES=$(timeout 600 swift list uosci-artifacts -l | grep -e 'index.html$' | grep -v ' index.html' | sort -rk 2 | awk '{ print $4 }')
298
299 for i in $INDICES; do
300 # link="<a href=\"${i}\">VIEW</a>"
301@@ -397,7 +397,7 @@
302
303 echo " . Selecting .txt and .html files in $UOSCI_BUCKET_NAME..."
304 echo " . OBJECT_MATCH_PATTERN: $OBJECT_MATCH_PATTERN"
305- swift list $UOSCI_BUCKET_NAME | egrep ".txt$|.html$" | grep "$OBJECT_MATCH_PATTERN" > $tmp_object_list ||:
306+ timeout 600 swift list $UOSCI_BUCKET_NAME | egrep ".txt$|.html$" | grep "$OBJECT_MATCH_PATTERN" > $tmp_object_list ||:
307
308 if [[ "$(wc -l $tmp_object_list)" == "0 $tmp_object_list" ]]; then
309 echo " . No objects found to update"
310@@ -413,9 +413,9 @@
311 if [[ -n "$line" ]]; then
312 echo " - Updating object: $line"
313 if [[ "$line" == *.html ]]; then
314- swift post $UOSCI_BUCKET_NAME $line -H "content-type:text/html"
315+ timeout 600 swift post $UOSCI_BUCKET_NAME $line -H "content-type:text/html"
316 elif [[ "$line" == *.txt ]]; then
317- swift post $UOSCI_BUCKET_NAME $line -H "content-type:text/plain"
318+ timeout 600 swift post $UOSCI_BUCKET_NAME $line -H "content-type:text/plain"
319 else
320 echo " ! Ignoring: $line"
321 fi
322@@ -434,3 +434,9 @@
323 function add_line(){
324 echo "$1" >> $OUT_FILE
325 }
326+
327+
328+function f_gerrit_trigger_whitelist_check(){
329+ export GERRIT_ACCOUNT_WHITELIST="$UOSCI_BOT_CONTROL_ROOT/tactical/gerrit-trigger-whitelist.txt"
330+ $UOSCI_BOT_CONTROL_ROOT/tactical/gerrit-trigger-whitelist-check.sh
331+}
332
333=== modified file 'run/job-parts/osci_job_common.sh'
334--- run/job-parts/osci_job_common.sh 2017-04-26 22:43:21 +0000
335+++ run/job-parts/osci_job_common.sh 2018-03-21 18:25:26 +0000
336@@ -6,13 +6,25 @@
337 # set by the build parameters or the calling script(s).
338
339 . ${OSCI_ROOT}/run/job-parts/osci_repos_common.sh
340-. ${OSCI_ROOT}/run/job-parts/osci_juju1_common.sh
341 . ${OSCI_ROOT}/run/job-parts/osci_openstack_common.sh
342 . ${OSCI_ROOT}/run/job-parts/osci_mojo_common.sh
343 . ${OSCI_ROOT}/run/job-parts/osci_gerrit_common.sh
344 . ${OSCI_ROOT}/run/job-parts/osci_layerci_common.sh
345
346
347+function retry_command() {
348+# Work-around wrapper to deal with things like https://bugs.launchpad.net/juju/+bug/1709324
349+ command=$@
350+ i=0
351+ attempts=3
352+ while [ $i -lt $attempts ]; do
353+ $command && break
354+ let "i+=1"
355+ sleep 10
356+ done
357+}
358+
359+
360 function f_juju_wait() {
361 f_line $FUNCNAME
362 sleep 30
363@@ -62,6 +74,7 @@
364 f_line $FUNCNAME
365 f_workspace_cleanup
366 f_ssh_known_hosts_clean
367+ f_co_cleanup
368 if [[ "${SKIP_JUJU_FOO^^}" != "TRUE" ]]; then
369 f_tool_refresh_cti
370 f_tool_refresh_juju_wait
371@@ -113,8 +126,8 @@
372 # CLEANUP: delete neutron ext-net ports, commonly added by mojo or other
373 # post-deployment configuration for the network node's 2nd nic.
374 f_novarc_undercloud
375- if [[ -z "${JENV_NAME}" ]]; then
376- echo " ! Missing required env var JENV_NAME"
377+ if [[ -z "${MODEL_NAME}" ]]; then
378+ echo " ! Missing required env var MODEL_NAME"
379 exit 1
380 fi
381 if [[ ! -f "${UOSCI_BOT_CONTROL_ROOT}/tools/juju-sym-switch" ]]; then
382@@ -122,14 +135,10 @@
383 fi
384 if [[ "${JENV_NAME^^}" != *MAAS* ]]; then
385 f_line "Deleting undercloud tenant's neutron ext-net ports if they exist"
386- pwd
387- cd ${UOSCI_BOT_CONTROL_ROOT}/tools
388- deactivate ||:
389- tox -re port-cleanup
390- . .tox/port-cleanup/bin/activate
391- echo NOT DELETING: ${UOSCI_BOT_CONTROL_ROOT}/tools/port-cleanup -pn "juju-${JENV_NAME}.*-machine.*ext-port" -ps "DOWN" --delete
392- cd $WORKSPACE
393- pwd
394+ f_novarc_undercloud
395+ f_activate_botcontrol_tools_virtualenv
396+ echo "DELETING ext-ports:"
397+ ${UOSCI_BOT_CONTROL_ROOT}/tools/port-cleanup -pn "juju-.*-${MODEL_NAME}.*_ext-port" -ps "DOWN" --delete
398 fi
399 }
400
401@@ -192,14 +201,14 @@
402 # Generally run at the end of every build
403 if [[ "${NO_POST_DESTROY^^}" != "TRUE" ]]; then
404 f_tmp_cleanup
405+ f_co_cleanup
406 fi
407 if [[ "${NO_POST_DESTROY^^}" != "TRUE" ]] && [[ "${SKIP_JUJU_FOO^^}" != "TRUE" ]]; then
408 f_line "Destroy"
409 f_juju_destroy_model
410 f_post_destroy_info_dump
411
412- # XXX: revisit ext port delete only if still needed
413- # f_delete_neutron_ext_net_ports
414+ f_delete_neutron_ext_net_ports
415
416 # XXX: Disable cleanup until determined if still necessary; needs updated if so.
417 # f_line "Post-Destroy Additional Clean-up"
418@@ -271,6 +280,7 @@
419
420
421 function f_set_co_dir() {
422+# Set the checkout dir
423 mkdir -p $JENKINS_HOME/checkout/$EXECUTOR_NUMBER
424 export CO_DIR=$JENKINS_HOME/checkout/$EXECUTOR_NUMBER/$BASE_NAME
425 }
426@@ -461,7 +471,23 @@
427 export BOOTSTRAP_CONSTRAINTS="virt-type=kvm cores=4 mem=3G"
428 (
429 cd $CTI_CODIR
430- ./juju-openstack-controller-example.sh
431+ retry_command ./juju-openstack-controller-example.sh
432+ )
433+}
434+
435+
436+function f_juju_bootstrap_maas() {
437+ # Repo should be present before now, but if it's not, get it!
438+ stat $CTI_CODIR/tox.ini ||\
439+ f_tool_refresh_cti
440+
441+ export CLOUD_NAME="ruxton-maas"
442+ export CONTROLLER_NAME="ruxton-maas-${NODE_NAME}"
443+ export BOOTSTRAP_CONSTRAINTS="arch=$ARCH tags=uosci"
444+ export MODEL_CONSTRAINTS="$BOOTSTRAP_CONSTRAINTS"
445+ (
446+ cd $CTI_CODIR
447+ retry_command ./juju-maas-controller-example.sh
448 )
449 }
450
451@@ -479,9 +505,7 @@
452
453 function f_lolo_log_puller() {
454 f_line $FUNCNAME
455- stat $UOSCI_BOT_CONTROL_ROOT/tools/lolo-log-puller ||\
456- f_tool_refresh_bot_control
457-
458+ f_activate_botcontrol_tools_virtualenv
459 $UOSCI_BOT_CONTROL_ROOT/tools/lolo-log-puller $WORKSPACE/logs
460 }
461
462@@ -494,7 +518,7 @@
463 f_novarc_undercloud
464 (
465 cd $CTI_CODIR
466- ./juju-destroy-controller-and-models-example.sh -y
467+ retry_command ./juju-destroy-controller-and-models-example.sh -y
468 )
469 }
470
471@@ -507,7 +531,7 @@
472 f_novarc_undercloud
473 (
474 cd $CTI_CODIR
475- ./juju-destroy-model-example.sh -y
476+ retry_command ./juju-destroy-model-example.sh -y
477 )
478 }
479
480@@ -529,10 +553,37 @@
481 }
482
483
484+function f_activate_botcontrol_tools_virtualenv() {
485+ deactivate ||:
486+
487+ # Tool should be present before now, but if it's not, get it!
488+ stat $UOSCI_BOT_CONTROL_ROOT/tox.ini ||\
489+ f_tool_refresh_bot_control
490+
491+ # Venv may have already been built, but if not, build it!
492+ stat $UOSCI_BOT_CONTROL_ROOT/.tox/port-cleanup ||\
493+ (
494+ cd $UOSCI_BOT_CONTROL_ROOT/tools
495+ tox -e port-cleanup
496+ )
497+ . $UOSCI_BOT_CONTROL_ROOT/tools/.tox/port-cleanup/bin/activate
498+}
499+
500+
501 function f_tmp_cleanup(){
502 # Clean up tmp dir items as the jenkins user
503 f_line "Cleaning up /tmp (Safe to ignore file/dir permission errors)"
504- find /tmp -type f -user jenkins -writable -readable -mmin +60 | xargs rm -rf ||:
505+ time find /tmp -type f -user jenkins -writable -readable -mmin +60 | xargs rm -rf ||:
506+ time find /tmp -type d -user jenkins -writable -readable -mmin +60 | xargs rm -rf ||:
507+}
508+
509+
510+function f_co_cleanup(){
511+# Clean up checkout dir items as the jenkins user
512+ if [[ -d "$CO_DIR" ]] && [[ -n "$(echo $CO_DIR | grep '/var/lib/jenkins')" ]]; then
513+ f_line "Cleaning up checkout dir $CO_DIR"
514+ rm -rf $CO_DIR
515+ fi
516 }
517
518
519@@ -552,4 +603,10 @@
520 export NO_POST_DESTROY="true"
521 fi
522
523+# Charm store timeout value, consumed by libcharmstore
524+export CS_API_TIMEOUT=60
525+
526+# Charm-tools work-around
527+export USER="$(whoami)"
528+
529 f_line "osci_job_common complete"
530
531=== modified file 'run/job-parts/osci_mojo_common.sh'
532--- run/job-parts/osci_mojo_common.sh 2017-04-19 18:51:47 +0000
533+++ run/job-parts/osci_mojo_common.sh 2018-03-21 18:25:26 +0000
534@@ -12,15 +12,6 @@
535 }
536
537
538-function f_mojo_create_venv() {
539- cd $UOSCI_BOT_CONTROL_ROOT/tools/mojo-openstack
540- deactivate ||:
541- tox
542- . .tox/mojo/bin/activate
543- cd $WORKSPACE
544-}
545-
546-
547 function f_mojo_new_project() {
548 # Add mojo project.
549 if [[ -n "$(ls $WORKSPACE -1 | egrep '.failed|.bad')" ]]; then
550@@ -28,7 +19,7 @@
551 touch $WORKSPACE/fyi-${test:0:4}.mojo-project-new.skipped
552 else
553 set -x
554- mojo-project-new --series ${MOJO_SERIES} \
555+ mojo-project-new --series ${UBUNTU_RELEASE} \
556 --container containerless ${MOJO_PROJ} --mojo-root ${MOJO_ROOT} 2>&1 | tee $WORKSPACE/mojo-project-new.txt
557 # Error trap
558 if [[ "${PIPESTATUS[0]}" != "0" ]]; then
559@@ -48,8 +39,9 @@
560 touch $WORKSPACE/fyi-${test:0:4}.mojo-workspace-new.skipped
561 else
562 set -x
563- mojo --mojo-root ${MOJO_ROOT} workspace-new --project ${MOJO_PROJ} --series ${MOJO_SERIES} \
564- --stage ${MOJO_SPEC} ${MOJO_OPENSTACK_SPECS_REPO} ${MOJO_WKSP} \
565+ f_activate_clients
566+ mojo --mojo-root ${MOJO_ROOT} workspace-new --project ${MOJO_PROJ} --series ${UBUNTU_RELEASE} \
567+ --stage ${MOJO_SPEC}/${OPENSTACK_RELEASE} ${MOJO_OPENSTACK_SPECS_REPO} ${MOJO_WKSP} \
568 2>&1 | tee $WORKSPACE/mojo-workspace-new.txt
569
570 # Error trap
571@@ -69,12 +61,11 @@
572 echo " ! Skipping mojo run, one or more preceding steps are failed or bad."
573 touch $WORKSPACE/fyi-${test:0:4}.mojo-run.skipped
574 else
575- # Construct network env vars based on bootstrap node 0
576 f_openstack_set_network_env_vars
577- #f_amulet_set_network_env_vars
578 set -x
579- mojo --mojo-root ${MOJO_ROOT} run --project ${MOJO_PROJ} --series ${MOJO_SERIES} \
580- --stage ${MOJO_SPEC} ${MOJO_OPENSTACK_SPECS_REPO} ${MOJO_WKSP} \
581+ f_activate_clients
582+ mojo --mojo-root ${MOJO_ROOT} run --project ${MOJO_PROJ} --series ${UBUNTU_RELEASE} \
583+ --stage ${MOJO_SPEC}/${OPENSTACK_RELEASE} "${MOJO_OPENSTACK_SPECS_REPO};revno=${MOJO_OPENSTACK_SPECS_BRANCH}" ${MOJO_WKSP} \
584 2>&1 | tee $WORKSPACE/mojo-run.txt
585
586 # Error trap
587@@ -89,9 +80,8 @@
588
589 function f_mojo_handle_env_vars() {
590 # Validate and process mojo runner environment variables.
591-
592 # Basic confirmation of non-null values.
593- options="MOJO_OPENSTACK_SPECS_REPO MOJO_SPEC MOJO_SERIES"
594+ options="MOJO_OPENSTACK_SPECS_REPO MOJO_OPENSTACK_SPECS_BRANCH MOJO_SPEC UBUNTU_RELEASE OPENSTACK_RELEASE MOJO_SERIES"
595 for option in $options; do
596 if [[ -z "${!option}" ]]; then
597 echo " ! Failing on null option: ${option}"
598@@ -101,17 +91,6 @@
599 fi
600 done
601
602- # Check for custom mojo spec value.
603- if [[ "$MOJO_SPEC" == "MOJO_SPEC_CUSTOM" ]]; then
604- if [[ -n "$MOJO_SPEC_CUSTOM" ]]; then
605- MOJO_SPEC="${MOJO_SPEC_CUSTOM}"
606- echo "Using custom mojo spec: ${MOJO_SPEC}"
607- else
608- echo " ! Instructed to use a custom spec but did not provide a custom spec value!"
609- touch $WORKSPACE/fyi-${test:0:4}.${test}-mojo-env-vars.failed
610- fi
611- fi
612-
613 # Fatal if error. Aborts job build.
614 f_set_build_descr
615 f_check_fail
616
617=== modified file 'run/job-parts/osci_openstack_common.sh'
618--- run/job-parts/osci_openstack_common.sh 2017-04-25 21:57:48 +0000
619+++ run/job-parts/osci_openstack_common.sh 2018-03-21 18:25:26 +0000
620@@ -42,23 +42,20 @@
621 function f_openstack_uos_env_var_normalize() {
622 # Ensure that both representations of the Ubuntu Release x OpenStack Release
623 # environment variables are set.
624- if [[ -z "$UBUNTU_RELEASE" ]] && [[ -z "$OPENSTACK_RELEASE" ]] && [[ -n "$UOS_COMBO" ]]; then
625- echo " . Using UOS_COMBO to determine UBUNTU_RELEASE and OPENSTACK_RELEASE."
626- export UBUNTU_RELEASE=$(echo $UOS_COMBO | cut -f 1 -d "-")
627- export OPENSTACK_RELEASE=$(echo $UOS_COMBO | cut -f 2 -d "-")
628-
629- elif [[ -n "$UBUNTU_RELEASE" ]] && [[ -n "$OPENSTACK_RELEASE" ]] && [[ -z "$UOS_COMBO" ]]; then
630- echo " . Using UBUNTU_RELEASE and OPENSTACK_RELEASE to determine UOS_COMBO."
631- export UOS_COMBO="${UBUNTU_RELEASE}-${OPENSTACK_RELEASE}"
632-
633- elif [[ -n "$UBUNTU_RELEASE" ]] && [[ -n "$OPENSTACK_RELEASE" ]] && [[ -n "$UOS_COMBO" ]]; then
634- echo " . UBUNTU_RELEASE, OPENSTACK_RELEASE and UOS_COMBO are all set."
635-
636- # XXX: No longer have this safety net; expect values.
637- # else
638- # export UBUNTU_RELEASE="xenial"
639- # export OPENSTACK_RELEASE="mitaka"
640- # export UOS_COMBO="${UBUNTU_RELEASE}-${OPENSTACK_RELEASE}"
641+ if [[ -z "$UBUNTU_RELEASE" ]] && [[ -z "$OPENSTACK_RELEASE" ]] && [[ -n "$U_OS" ]]; then
642+ echo " . Using U_OS to determine UBUNTU_RELEASE and OPENSTACK_RELEASE."
643+ export UBUNTU_RELEASE=$(echo $U_OS | cut -f 1 -d "-")
644+ export MOJO_SERIES=$UBUNTU_RELEASE
645+ export OPENSTACK_RELEASE=$(echo $U_OS | cut -f 2 -d "-")
646+
647+ elif [[ -n "$UBUNTU_RELEASE" ]] && [[ -n "$OPENSTACK_RELEASE" ]] && [[ -z "$U_OS" ]]; then
648+ echo " . Using UBUNTU_RELEASE and OPENSTACK_RELEASE to determine U_OS."
649+ export U_OS="${UBUNTU_RELEASE}-${OPENSTACK_RELEASE}"
650+ export MOJO_SERIES=$UBUNTU_RELEASE
651+
652+ elif [[ -n "$UBUNTU_RELEASE" ]] && [[ -n "$OPENSTACK_RELEASE" ]] && [[ -n "$U_OS" ]]; then
653+ echo " . UBUNTU_RELEASE, OPENSTACK_RELEASE and U_OS are all set."
654+ export MOJO_SERIES=$UBUNTU_RELEASE
655 fi
656 }
657
658@@ -225,8 +222,8 @@
659 export NAME_SERVER="$(awk '/^nameserver /{ print $2 }' /etc/resolv.conf | head -n 1 | xargs)"
660 export NET_ID="$NETWORK_ID"
661 export CIDR_EXT="$NETWORK_CIDR"
662- export GATEWAY="$(/sbin/route -n | awk '/^0.0.0.0 /{ print $2 }')"
663-
664+ # export GATEWAY="$(/sbin/route -n | awk '/^0.0.0.0 /{ print $2 }')"
665+ export GATEWAY="$(ipcalc $CIDR_EXT | awk '/HostMin:/{ print $2 }')"
666 CIDR_END="$(ipcalc $CIDR_EXT | awk '/^HostMax: /{ print $2 }')"
667 FIP_END="$(echo $CIDR_END | sed 's/254/239/g')"
668 # OSCI subnet dhcp pools end at the highest .199, so the
669@@ -272,6 +269,7 @@
670 echo " AMULET_OS_VIP11: $AMULET_OS_VIP11"
671 echo " AMULET_OS_VIP12: $AMULET_OS_VIP12"
672 echo " AMULET_OS_VIP13: $AMULET_OS_VIP13"
673+ echo " VIP_RANGE: $VIP_RANGE"
674 f_amulet_set_odl_location
675 f_amulet_to_mojo_env_vars
676 f_amulet_set_ldap_location
677@@ -306,7 +304,30 @@
678 export MOJO_OS_VIP12=$AMULET_OS_VIP12
679 export MOJO_OS_VIP13=$AMULET_OS_VIP13
680 export MOJO_OS_VIP=$AMULET_OS_VIP
681- export MOJO_VIP_RANGE=$AMULET_VIP_RANGE
682+ export MOJO_VIP_RANGE=$VIP_RANGE
683+ echo " + Setting mojo network env vars:"
684+ echo " MOJO_NAME_SERVER: $MOJO_NAME_SERVER"
685+ echo " MOJO_NET_ID: $MOJO_NET_ID"
686+ echo " MOJO_SUBNET_ID: $MOJO_SUBNET_ID"
687+ echo " MOJO_CIDR_EXT: $MOJO_CIDR_EXT"
688+ echo " MOJO_GATEWAY: $MOJO_GATEWAY"
689+ echo " MOJO_FIP_RANGE: $MOJO_FIP_RANGE"
690+ echo " MOJO_OS_VIP00: $MOJO_OS_VIP00"
691+ echo " MOJO_OS_VIP01: $MOJO_OS_VIP01"
692+ echo " MOJO_OS_VIP02: $MOJO_OS_VIP02"
693+ echo " MOJO_OS_VIP03: $MOJO_OS_VIP03"
694+ echo " MOJO_OS_VIP04: $MOJO_OS_VIP04"
695+ echo " MOJO_OS_VIP05: $MOJO_OS_VIP05"
696+ echo " MOJO_OS_VIP06: $MOJO_OS_VIP06"
697+ echo " MOJO_OS_VIP07: $MOJO_OS_VIP07"
698+ echo " MOJO_OS_VIP08: $MOJO_OS_VIP08"
699+ echo " MOJO_OS_VIP09: $MOJO_OS_VIP09"
700+ echo " MOJO_OS_VIP10: $MOJO_OS_VIP10"
701+ echo " MOJO_OS_VIP11: $MOJO_OS_VIP11"
702+ echo " MOJO_OS_VIP12: $MOJO_OS_VIP12"
703+ echo " MOJO_OS_VIP13: $MOJO_OS_VIP13"
704+ echo " MOJO_OS_VIP: $MOJO_OS_VIP"
705+ echo " MOJO_VIP_RANGE: $MOJO_VIP_RANGE"
706 }
707
708
709
710=== modified file 'run/job-parts/osci_repos_common.sh'
711--- run/job-parts/osci_repos_common.sh 2017-05-27 00:22:19 +0000
712+++ run/job-parts/osci_repos_common.sh 2018-03-21 18:25:26 +0000
713@@ -3,7 +3,7 @@
714 # Common functions for UOSCI jobs, specific to refreshing tool repos/branches.
715
716 : ${EXECUTOR_NUMBER:="z"}
717-: ${BASE_CODIR:="${HOME}/tools/$EXECUTOR_NUMBER/"}
718+: ${BASE_CODIR:="${HOME}/tools/$EXECUTOR_NUMBER"}
719
720 : ${CTI_REPO:="https://github.com/openstack-charmers/charm-test-infra"}
721 : ${CTI_REPO_BRANCH:="master"}

Subscribers

People subscribed via source and target branches