Merge lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm-maas-trusty-ppc64 into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Francis Ginther on 2018-07-19
Status: Merged
Merged at revision: 803
Proposed branch: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm-maas-trusty-ppc64
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 90 lines (+30/-8)
2 files modified
templates/img-maasv2.tmpl (+15/-4)
templates/img-maasv3.tmpl (+15/-4)
To merge this branch: bzr merge lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm-maas-trusty-ppc64
Reviewer Review Type Date Requested Status
Robert C Jennings 2018-07-19 Approve on 2018-07-19
Dan Watkins 2018-07-19 Approve on 2018-07-19
Review via email: mp+349986@code.launchpad.net

Commit message

Update the maas templates to account for a different target tar device on ppc64 hosts

The device name is now conditional based on the host architecture.

Description of the change

I used this branch in a test run which passed on all arches:

https://cloud-images-jenkins.canonical.com/job/MAAS_v2_MasterBuilder/1364/

To post a comment you must log in.
review: Approve
Robert C Jennings (rcj) :
review: Needs Information
Francis Ginther (fginther) wrote :

Respond to @rcj's question.

Robert C Jennings (rcj) wrote :

Thx, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'templates/img-maasv2.tmpl'
2--- templates/img-maasv2.tmpl 2018-07-02 21:16:55 +0000
3+++ templates/img-maasv2.tmpl 2018-07-19 17:59:10 +0000
4@@ -7,7 +7,11 @@
5 fail() {
6 [ $# -eq 0 ] || error "$@";
7 echo "Failed" > /tmp/failed;
8- tar -C /tmp -cvf /dev/vdc failed build.log;
9+ TAR_DEVICE=/dev/vdb
10+ if [[ "$(uname -p)" =~ "ppc64" ]]; then
11+ TAR_DEVICE=/dev/vdc
12+ fi
13+ tar -C /tmp -cvf ${TAR_DEVICE} failed build.log;
14 shutdown -P now;
15 exit 1;
16 }
17@@ -56,7 +60,7 @@
18 MAASv=2;
19 }
20
21-# Extract /dev/vdc (which has all the goodies including the image
22+# Extract /dev/vdd (which has all the goodies including the image
23 # for conversion)
24 tar -C / -xvvf /dev/vdd
25
26@@ -127,10 +131,17 @@
27
28 done
29
30+# KVM running on our ppc64el host attaches devices in a different order
31+# compared to the other hosts
32+TAR_DEVICE=/dev/vdb
33+if [[ "$(uname -p)" =~ "ppc64" ]]; then
34+ TAR_DEVICE=/dev/vdc
35+fi
36+
37 # Finish the work
38-echo "Taring up artifacts to /dev/vdc!"
39+echo "Taring up artifacts to ${TAR_DEVICE}!"
40 touch /tmp/success
41-tar -C /tmp -cvf /dev/vdc maas_images /var/log/* logs success build.log "${OUT_D}" >> /dev/null
42+tar -C /tmp -cvf ${TAR_DEVICE} maas_images /var/log/* logs success build.log "${OUT_D}" >> /dev/null
43 sync
44 shutdown -P now
45
46
47=== modified file 'templates/img-maasv3.tmpl'
48--- templates/img-maasv3.tmpl 2018-07-02 21:16:55 +0000
49+++ templates/img-maasv3.tmpl 2018-07-19 17:59:10 +0000
50@@ -7,7 +7,11 @@
51 fail() {
52 [ $# -eq 0 ] || error "$@";
53 echo "Failed" > /tmp/failed;
54- tar -C /tmp -cvf /dev/vdc failed build.log;
55+ TAR_DEVICE=/dev/vdb
56+ if [[ "$(uname -p)" =~ "ppc64" ]]; then
57+ TAR_DEVICE=/dev/vdc
58+ fi
59+ tar -C /tmp -cvf ${TAR_DEVICE} failed build.log;
60 shutdown -P now;
61 exit 1;
62 }
63@@ -45,7 +49,7 @@
64 OUT_D="/tmp/maas_final"
65 mkdir -p "${OUT_D}"
66
67-# Extract /dev/vdc (which has all the goodies including the image
68+# Extract /dev/vdd (which has all the goodies including the image
69 # for conversion)
70 tar -C / -xvvf /dev/vdd
71
72@@ -75,10 +79,17 @@
73
74 done
75
76+# KVM running on our ppc64el host attaches devices in a different order
77+# compared to the other hosts
78+TAR_DEVICE=/dev/vdb
79+if [[ "$(uname -p)" =~ "ppc64" ]]; then
80+ TAR_DEVICE=/dev/vdc
81+fi
82+
83 # Finish the work
84-echo "Taring up artifacts to /dev/vdc!"
85+echo "Taring up artifacts to ${TAR_DEVICE}!"
86 touch /tmp/success
87-tar -C /tmp -cvf /dev/vdc maas_images /var/log/* logs success build.log "${OUT_D}" >> /dev/null
88+tar -C /tmp -cvf ${TAR_DEVICE} maas_images /var/log/* logs success build.log "${OUT_D}" >> /dev/null
89 sync
90 shutdown -P now
91

Subscribers

People subscribed via source and target branches

to all changes: