Merge lp:~soren/nova/unify-default-flagfile-location into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen
Status: Merged
Approved by: Devin Carlen
Approved revision: 412
Merged at revision: 422
Proposed branch: lp:~soren/nova/unify-default-flagfile-location
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 100 lines (+11/-1)
6 files modified
bin/nova-compute (+2/-0)
bin/nova-instancemonitor (+2/-0)
bin/nova-manage (+1/-1)
bin/nova-network (+2/-0)
bin/nova-scheduler (+2/-0)
bin/nova-volume (+2/-0)
To merge this branch: bzr merge lp:~soren/nova/unify-default-flagfile-location
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Jay Pipes (community) Approve
Review via email: mp+41589@code.launchpad.net

Description of the change

Make sure all workers look for their flagfile in the same spot.

Stop nova-manage from using /etc/nova/nova-manage.conf as its default
flagfile. This made made development awkward since everything but
nova-manage would use defaults for everything, but nova-manage would use
whatever config was in /etc/nova/nova-manage.conf which was likely put
there by a package of some sort.

This way, we can leave it to the packagers to set this default to
something else.

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

FYI, I also have a solution to this in the new configuration options processing work...for later on :)

review: Approve
Revision history for this message
Soren Hansen (soren) wrote :

2010/11/23 Jay Pipes <email address hidden>:
> Review: Approve
> FYI, I also have a solution to this in the new configuration options processing work...for later on :)

I expected nothing less :)

--
Soren Hansen
Ubuntu Developer    http://www.ubuntu.com/
OpenStack Developer http://www.openstack.org/

Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/nova-compute'
2--- bin/nova-compute 2010-09-08 04:19:46 +0000
3+++ bin/nova-compute 2010-11-23 12:48:36 +0000
4@@ -34,10 +34,12 @@
5
6 from nova import service
7 from nova import twistd
8+from nova import utils
9
10
11 if __name__ == '__main__':
12 twistd.serve(__file__)
13
14 if __name__ == '__builtin__':
15+ utils.default_flagfile()
16 application = service.Service.create() # pylint: disable=C0103
17
18=== modified file 'bin/nova-instancemonitor'
19--- bin/nova-instancemonitor 2010-09-08 08:45:39 +0000
20+++ bin/nova-instancemonitor 2010-11-23 12:48:36 +0000
21@@ -34,6 +34,7 @@
22 if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
23 sys.path.insert(0, possible_topdir)
24
25+from nova import utils
26 from nova import twistd
27 from nova.compute import monitor
28
29@@ -44,6 +45,7 @@
30 twistd.serve(__file__)
31
32 if __name__ == '__builtin__':
33+ utils.default_flagfile()
34 logging.warn('Starting instance monitor')
35 # pylint: disable-msg=C0103
36 monitor = monitor.InstanceMonitor()
37
38=== modified file 'bin/nova-manage'
39--- bin/nova-manage 2010-10-21 18:49:51 +0000
40+++ bin/nova-manage 2010-11-23 12:48:36 +0000
41@@ -467,7 +467,7 @@
42
43 def main():
44 """Parse options and call the appropriate class/method."""
45- utils.default_flagfile('/etc/nova/nova-manage.conf')
46+ utils.default_flagfile()
47 argv = FLAGS(sys.argv)
48
49 if FLAGS.verbose:
50
51=== modified file 'bin/nova-network'
52--- bin/nova-network 2010-09-08 04:19:46 +0000
53+++ bin/nova-network 2010-11-23 12:48:36 +0000
54@@ -34,10 +34,12 @@
55
56 from nova import service
57 from nova import twistd
58+from nova import utils
59
60
61 if __name__ == '__main__':
62 twistd.serve(__file__)
63
64 if __name__ == '__builtin__':
65+ utils.default_flagfile()
66 application = service.Service.create() # pylint: disable-msg=C0103
67
68=== modified file 'bin/nova-scheduler'
69--- bin/nova-scheduler 2010-09-09 09:30:07 +0000
70+++ bin/nova-scheduler 2010-11-23 12:48:36 +0000
71@@ -34,10 +34,12 @@
72
73 from nova import service
74 from nova import twistd
75+from nova import utils
76
77
78 if __name__ == '__main__':
79 twistd.serve(__file__)
80
81 if __name__ == '__builtin__':
82+ utils.default_flagfile()
83 application = service.Service.create()
84
85=== modified file 'bin/nova-volume'
86--- bin/nova-volume 2010-09-08 04:19:46 +0000
87+++ bin/nova-volume 2010-11-23 12:48:36 +0000
88@@ -34,10 +34,12 @@
89
90 from nova import service
91 from nova import twistd
92+from nova import utils
93
94
95 if __name__ == '__main__':
96 twistd.serve(__file__)
97
98 if __name__ == '__builtin__':
99+ utils.default_flagfile()
100 application = service.Service.create() # pylint: disable-msg=C0103