Merge lp:~chris.macnaughton/openstack-mojo-specs/ha-upgrade into lp:openstack-mojo-specs

Proposed by Chris MacNaughton
Status: Merged
Merged at revision: 320
Proposed branch: lp:~chris.macnaughton/openstack-mojo-specs/ha-upgrade
Merge into: lp:openstack-mojo-specs
Diff against target: 189 lines (+59/-14)
5 files modified
helper/utils/mojo_utils.py (+10/-4)
specs/full_stack/stable_to_next_ha/icehouse/manifest (+2/-5)
specs/full_stack/stable_to_next_ha/kilo/manifest (+2/-5)
specs/full_stack/stable_to_next_ha/ocata/SPEC_INFO.txt (+2/-0)
specs/full_stack/stable_to_next_ha/ocata/manifest (+43/-0)
To merge this branch: bzr merge lp:~chris.macnaughton/openstack-mojo-specs/ha-upgrade
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Ryan Beisner Needs Fixing
Review via email: mp+334434@code.launchpad.net
To post a comment you must log in.
320. By Chris MacNaughton

update specs to grab from cs: proper links

321. By Chris MacNaughton

Apply gnuoy's patch to fix uprgade

Revision history for this message
Ryan Beisner (1chb1n) wrote :

All: please be sure to `make lint` on all mojo MPs and reviews.

helper/utils/mojo_utils.py:517:10: E111 indentation is not a multiple of four
helper/utils/mojo_utils.py:519:10: E111 indentation is not a multiple of four
checking helper/utils/os_versions.py
Makefile:5: recipe for target 'lint' failed
make: *** [lint] Error 1

review: Needs Fixing
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Why are we switching away from the explicit openstack-charmers stable charm namespace?

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

Per discussion in IRC, I can undo that change if we'd rather, for reference:

10:47:28 <gnuoy> icey, ok, so lets do what you suggested and just switch the spec to pull from cs:$name and upgrade to cs:openstack-charmers-next/$name
10:47:50 across all targets
10:47:57 <icey> gnuoy: I /think/ I'm ok pulling from cs:openstack-charmers/$name since (I believe) that cs:$name is basically a pointer at that
10:48:12 I'll update the change with that and then run another OSCI spec
10:48:17 <gnuoy> icey, I see no reason to do that
10:48:40 <icey> gnuoy: use the openstack-charmers (not -next) bits?
10:48:56 <gnuoy> Use cs:openstack-charmers/$name rather than cs:$name
10:49:36 I think we should be testing an upgrade from cs:$name to cs:openstack-charmers-next/$name and making no assumption about pointers

322. By Chris MacNaughton

fix spacing

323. By Chris MacNaughton

revert to openstack-charmers urls

Revision history for this message
Ryan Beisner (1chb1n) wrote :

I think we need to be consistent across the collection files. Historically, and in other spec collect files, we use the explicit charm namespace. If there is a reason to move to cs:foo, let's talk about that and change them all, separately.

Revision history for this message
Liam Young (gnuoy) wrote :

LGTM, thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'helper/utils/mojo_utils.py'
2--- helper/utils/mojo_utils.py 2017-09-25 21:34:17 +0000
3+++ helper/utils/mojo_utils.py 2017-11-30 14:53:10 +0000
4@@ -511,8 +511,12 @@
5 git_checkout_branch(charm_dir, branch)
6
7
8-def upgrade_service(svc, switch=None):
9- charm_dir = os.path.join(get_charm_dir(), svc)
10+def upgrade_service(svc, charm_name=None, switch=None):
11+ if charm_name and os.path.exists(os.path.join(get_charm_dir(),
12+ charm_name)):
13+ charm_dir = os.path.join(get_charm_dir(), charm_name)
14+ else:
15+ charm_dir = os.path.join(get_charm_dir(), svc)
16 logging.info('Upgrading ' + svc)
17 cmd = [kiki.cmd(), 'upgrade-charm']
18 # Switch and path are now mutually exclusive
19@@ -531,13 +535,15 @@
20 'keystone']
21 for svc in base_charms:
22 if svc in juju_status[kiki.applications()]:
23- upgrade_service(svc, switch=switch)
24+ charm_name = juju_status['applications'][svc]['charm-name']
25+ upgrade_service(svc, charm_name=charm_name, switch=switch)
26 time.sleep(30)
27 time.sleep(60)
28 # Upgrade the rest
29 for svc in juju_status[kiki.applications()]:
30 if svc not in base_charms:
31- upgrade_service(svc, switch=switch)
32+ charm_name = juju_status['applications'][svc]['charm-name']
33+ upgrade_service(svc, charm_name=charm_name, switch=switch)
34 time.sleep(30)
35
36
37
38=== added symlink 'specs/full_stack/stable_to_next_ha/icehouse/collect-next-ha'
39=== target is u'../../../../helper/collect/collect-next-ha'
40=== removed symlink 'specs/full_stack/stable_to_next_ha/icehouse/collect-next-ha-trusty'
41=== target was u'../../../../helper/collect/collect-next-ha'
42=== added symlink 'specs/full_stack/stable_to_next_ha/icehouse/collect-stable-ha'
43=== target is u'../../../../helper/collect/collect-stable-ha'
44=== removed symlink 'specs/full_stack/stable_to_next_ha/icehouse/collect-stable-ha-trusty'
45=== target was u'../../../../helper/collect/collect-stable-ha-trusty'
46=== removed symlink 'specs/full_stack/stable_to_next_ha/icehouse/git_checkout_stable.py'
47=== target was u'../../../../helper/setup/git_checkout_stable.py'
48=== modified file 'specs/full_stack/stable_to_next_ha/icehouse/manifest'
49--- specs/full_stack/stable_to_next_ha/icehouse/manifest 2017-02-22 14:27:58 +0000
50+++ specs/full_stack/stable_to_next_ha/icehouse/manifest 2017-11-30 14:53:10 +0000
51@@ -1,8 +1,5 @@
52 # Collect the charm branches from Launchpad
53-collect config=collect-stable-ha-${MOJO_SERIES}
54-
55-# Checkout stable
56-script config=git_checkout_stable.py
57+collect config=collect-stable-ha
58
59 # Use juju deployer to add the relations for the deployment
60 deploy config=ha.yaml delay=0 wait=False target=${MOJO_SERIES}-icehouse-ha
61@@ -29,7 +26,7 @@
62 script config=wipe_charm_dir.py
63
64 # Collect the next (devel) charm branches from Launchpad
65-collect config=collect-next-ha-${MOJO_SERIES}
66+collect config=collect-next-ha
67
68 # Run upgrade-charm on all services
69 script config=upgrade_all_services.py
70
71=== added symlink 'specs/full_stack/stable_to_next_ha/kilo/collect-next-ha'
72=== target is u'../../../../helper/collect/collect-next-ha'
73=== removed symlink 'specs/full_stack/stable_to_next_ha/kilo/collect-next-ha-trusty'
74=== target was u'../../../../helper/collect/collect-next-ha'
75=== added symlink 'specs/full_stack/stable_to_next_ha/kilo/collect-stable-ha'
76=== target is u'../../../../helper/collect/collect-stable-ha'
77=== removed symlink 'specs/full_stack/stable_to_next_ha/kilo/collect-stable-ha-trusty'
78=== target was u'../../../../helper/collect/collect-stable-ha-trusty'
79=== removed symlink 'specs/full_stack/stable_to_next_ha/kilo/git_checkout_stable.py'
80=== target was u'../../../../helper/setup/git_checkout_stable.py'
81=== modified file 'specs/full_stack/stable_to_next_ha/kilo/manifest'
82--- specs/full_stack/stable_to_next_ha/kilo/manifest 2017-02-22 14:27:58 +0000
83+++ specs/full_stack/stable_to_next_ha/kilo/manifest 2017-11-30 14:53:10 +0000
84@@ -1,8 +1,5 @@
85 # Collect the charm branches from Launchpad
86-collect config=collect-stable-ha-${MOJO_SERIES}
87-
88-# Checkout stable
89-script config=git_checkout_stable.py
90+collect config=collect-stable-ha
91
92 # Use juju deployer to add the relations for the deployment
93 deploy config=ha.yaml delay=0 wait=False target=${MOJO_SERIES}-kilo-ha
94@@ -29,7 +26,7 @@
95 script config=wipe_charm_dir.py
96
97 # Collect the next (devel) charm branches from Launchpad
98-collect config=collect-next-ha-${MOJO_SERIES}
99+collect config=collect-next-ha
100
101 # Run upgrade-charm on all services
102 script config=upgrade_all_services.py
103
104=== added directory 'specs/full_stack/stable_to_next_ha/ocata'
105=== added file 'specs/full_stack/stable_to_next_ha/ocata/SPEC_INFO.txt'
106--- specs/full_stack/stable_to_next_ha/ocata/SPEC_INFO.txt 1970-01-01 00:00:00 +0000
107+++ specs/full_stack/stable_to_next_ha/ocata/SPEC_INFO.txt 2017-11-30 14:53:10 +0000
108@@ -0,0 +1,2 @@
109+This spec performs a phased ha deploy using the stable charms then upgrades
110+charms to the next branches then runs tests to validate the deployment
111
112=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/check_juju.py'
113=== target is u'../../../../helper/tests/check_juju.py'
114=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/collect-next-ha'
115=== target is u'../../../../helper/collect/collect-next-ha'
116=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/collect-stable-ha'
117=== target is u'../../../../helper/collect/collect-stable-ha'
118=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/ha.yaml'
119=== target is u'../../../../helper/bundles/ha.yaml'
120=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/image_setup.py'
121=== target is u'../../../../helper/setup/image_setup.py'
122=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/images.yaml'
123=== target is u'../../../../helper/setup/images.yaml'
124=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/keystone_setup.py'
125=== target is u'../../../../helper/setup/keystone_setup.py'
126=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/keystone_users.yaml'
127=== target is u'../../../../helper/setup/keystone_users.yaml'
128=== added file 'specs/full_stack/stable_to_next_ha/ocata/manifest'
129--- specs/full_stack/stable_to_next_ha/ocata/manifest 1970-01-01 00:00:00 +0000
130+++ specs/full_stack/stable_to_next_ha/ocata/manifest 2017-11-30 14:53:10 +0000
131@@ -0,0 +1,43 @@
132+# Collect the charm branches from Launchpad
133+collect config=collect-stable-ha
134+
135+# Use juju deployer to add the relations for the deployment
136+deploy config=ha.yaml delay=0 wait=False target=${MOJO_SERIES}-ocata-ha
137+
138+# Check juju statuses are green and that hooks have finished
139+#verify config=check_juju.py
140+
141+# Create sdn on overcloud
142+script config=network_setup.py
143+
144+# Setup glance images
145+script config=image_setup.py
146+
147+# Setup keystone users
148+script config=keystone_setup.py
149+
150+# Create 1 * tiny cirros and 1 * small precise instances on the overcloud
151+verify config=simple_os_checks.py MACHINES='cirros:m1.tiny:1 precise:m1.small:3' CLOUDINIT_WAIT="300"
152+
153+# Test obj store by sending and recieving files
154+verify config=test_obj_store.py
155+
156+# Remove charms directories
157+script config=wipe_charm_dir.py
158+
159+# Collect the next (devel) charm branches from Launchpad
160+collect config=collect-next-ha
161+
162+# Run upgrade-charm on all services
163+script config=upgrade_all_services.py
164+
165+# Check juju statuses are green and that hooks have finished
166+verify config=check_juju.py
167+
168+# Create 1 * tiny cirros and 1 * small precise instances on the overcloud
169+verify config=simple_os_checks.py MACHINES='cirros:m1.tiny:1 precise:m1.small:3' CLOUDINIT_WAIT="300"
170+
171+# Test obj store by sending and recieving files
172+verify config=test_obj_store.py
173+
174+# Success
175
176=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/network.yaml'
177=== target is u'../../../../helper/setup/network.yaml'
178=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/network_setup.py'
179=== target is u'../../../../helper/setup/network_setup.py'
180=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/simple_os_checks.py'
181=== target is u'../../../../helper/tests/simple_os_checks.py'
182=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/test_obj_store.py'
183=== target is u'../../../../helper/tests/test_obj_store.py'
184=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/upgrade_all_services.py'
185=== target is u'../../../../helper/setup/upgrade_all_services.py'
186=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/utils'
187=== target is u'../../../../helper/utils'
188=== added symlink 'specs/full_stack/stable_to_next_ha/ocata/wipe_charm_dir.py'
189=== target is u'../../../../helper/setup/wipe_charm_dir.py'

Subscribers

People subscribed via source and target branches