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.
This commit is contained in:
commit
07ee9639a1
@ -34,10 +34,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import twistd
|
from nova import twistd
|
||||||
|
from nova import utils
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
twistd.serve(__file__)
|
twistd.serve(__file__)
|
||||||
|
|
||||||
if __name__ == '__builtin__':
|
if __name__ == '__builtin__':
|
||||||
|
utils.default_flagfile()
|
||||||
application = service.Service.create() # pylint: disable=C0103
|
application = service.Service.create() # pylint: disable=C0103
|
||||||
|
@ -34,6 +34,7 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|||||||
if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
|
from nova import utils
|
||||||
from nova import twistd
|
from nova import twistd
|
||||||
from nova.compute import monitor
|
from nova.compute import monitor
|
||||||
|
|
||||||
@ -44,6 +45,7 @@ if __name__ == '__main__':
|
|||||||
twistd.serve(__file__)
|
twistd.serve(__file__)
|
||||||
|
|
||||||
if __name__ == '__builtin__':
|
if __name__ == '__builtin__':
|
||||||
|
utils.default_flagfile()
|
||||||
logging.warn('Starting instance monitor')
|
logging.warn('Starting instance monitor')
|
||||||
# pylint: disable-msg=C0103
|
# pylint: disable-msg=C0103
|
||||||
monitor = monitor.InstanceMonitor()
|
monitor = monitor.InstanceMonitor()
|
||||||
|
@ -467,7 +467,7 @@ def methods_of(obj):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Parse options and call the appropriate class/method."""
|
"""Parse options and call the appropriate class/method."""
|
||||||
utils.default_flagfile('/etc/nova/nova-manage.conf')
|
utils.default_flagfile()
|
||||||
argv = FLAGS(sys.argv)
|
argv = FLAGS(sys.argv)
|
||||||
|
|
||||||
if FLAGS.verbose:
|
if FLAGS.verbose:
|
||||||
|
@ -34,10 +34,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import twistd
|
from nova import twistd
|
||||||
|
from nova import utils
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
twistd.serve(__file__)
|
twistd.serve(__file__)
|
||||||
|
|
||||||
if __name__ == '__builtin__':
|
if __name__ == '__builtin__':
|
||||||
|
utils.default_flagfile()
|
||||||
application = service.Service.create() # pylint: disable-msg=C0103
|
application = service.Service.create() # pylint: disable-msg=C0103
|
||||||
|
@ -34,10 +34,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import twistd
|
from nova import twistd
|
||||||
|
from nova import utils
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
twistd.serve(__file__)
|
twistd.serve(__file__)
|
||||||
|
|
||||||
if __name__ == '__builtin__':
|
if __name__ == '__builtin__':
|
||||||
|
utils.default_flagfile()
|
||||||
application = service.Service.create()
|
application = service.Service.create()
|
||||||
|
@ -34,10 +34,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import twistd
|
from nova import twistd
|
||||||
|
from nova import utils
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
twistd.serve(__file__)
|
twistd.serve(__file__)
|
||||||
|
|
||||||
if __name__ == '__builtin__':
|
if __name__ == '__builtin__':
|
||||||
|
utils.default_flagfile()
|
||||||
application = service.Service.create() # pylint: disable-msg=C0103
|
application = service.Service.create() # pylint: disable-msg=C0103
|
||||||
|
Loading…
x
Reference in New Issue
Block a user