Merge lp:~cprov/adt-cloud-worker/ps4-flavor into lp:adt-cloud-worker

Proposed by Celso Providelo
Status: Merged
Approved by: Celso Providelo
Approved revision: 31
Merged at revision: 31
Proposed branch: lp:~cprov/adt-cloud-worker/ps4-flavor
Merge into: lp:adt-cloud-worker
Diff against target: 41 lines (+8/-5)
2 files modified
adt_cloud_worker/_cloud_support.py (+4/-1)
adt_cloud_worker/tests/test_cloud.py (+4/-4)
To merge this branch: bzr merge lp:~cprov/adt-cloud-worker/ps4-flavor
Reviewer Review Type Date Requested Status
Joe Talbott (community) Approve
Review via email: mp+253686@code.launchpad.net

Commit message

Using a PS4 'canonical' nova flavor name "cpu2-ram2-disk10" instead of the custom "m1.adt.*".

Description of the change

Using a PS4 'canonical' nova flavor name "cpu2-ram2-disk10" instead of the custom "m1.adt.*".

Mainly because the "first flavor" fallback on ps4 is very poor choice, "cpu1-ram9-disk50".

We can revisit this change once we have better understand of jobs dynamics, but I am also inclined to move this responsibility away from the cloud-worker.

To post a comment you must log in.
Revision history for this message
Joe Talbott (joetalbott) wrote :

I'm not in love with seeing a string repeated that many times but I'll survive. :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'adt_cloud_worker/_cloud_support.py'
--- adt_cloud_worker/_cloud_support.py 2015-03-17 20:27:47 +0000
+++ adt_cloud_worker/_cloud_support.py 2015-03-20 15:02:16 +0000
@@ -50,7 +50,10 @@
5050
51 """51 """
52 flavor_names = [f.name for f in nova_query_flavor_fn()]52 flavor_names = [f.name for f in nova_query_flavor_fn()]
53 default = 'm1.adt.large'53 # XXX cprov 20150320: This is the preferred stackystack (ps4) flavor, we
54 # will work with IS to create specific flavors (m1.adt.*) soon.
55 default = 'cpu2-ram2-disk10'
56 # This is the alternative bootstack/cannistack/generic one.
54 alternative = 'm1.small'57 alternative = 'm1.small'
55 if default in flavor_names:58 if default in flavor_names:
56 return default59 return default
5760
=== modified file 'adt_cloud_worker/tests/test_cloud.py'
--- adt_cloud_worker/tests/test_cloud.py 2015-03-08 22:30:42 +0000
+++ adt_cloud_worker/tests/test_cloud.py 2015-03-20 15:02:16 +0000
@@ -47,9 +47,9 @@
47 q = create_flavor_query_fn(['m1.smaller', 'm1.small'])47 q = create_flavor_query_fn(['m1.smaller', 'm1.small'])
48 cs.get_default_testbed_flavor(q)48 cs.get_default_testbed_flavor(q)
49 self.assertEqual(49 self.assertEqual(
50 "Custom flavor 'm1.adt.large' not configured. Using "50 "Custom flavor 'cpu2-ram2-disk10' not configured. Using "
51 "'m1.small' instead. To reduce testbed memory consumption, "51 "'m1.small' instead. To reduce testbed memory consumption, "
52 "configure the 'm1.adt.large' flavor.\n",52 "configure the 'cpu2-ram2-disk10' flavor.\n",
53 f.output53 f.output
54 )54 )
5555
@@ -69,8 +69,8 @@
69 cs.get_default_testbed_flavor(q)69 cs.get_default_testbed_flavor(q)
70 self.assertEqual(70 self.assertEqual(
71 "Nova has not been configured with either the default flavor "71 "Nova has not been configured with either the default flavor "
72 "(m1.adt.large) of the alternative flavor (m1.small). Using "72 "(cpu2-ram2-disk10) of the alternative flavor (m1.small). "
73 "the first reported flavor 'unknown' instead.\n",73 "Using the first reported flavor 'unknown' instead.\n",
74 f.output74 f.output
75 )75 )
7676

Subscribers

People subscribed via source and target branches