nova-manage --flagfile /etc/nova/nova.conf db sync

Asked by janson on 2011-02-16

following this url:

http://wiki.openstack.org/NovaInstall/CentOSNotes

when Creating the Database using this order:

nova-manage --flagfile /etc/nova/nova.conf db sync;

errors like this:

nova-manage --flagfile /etc/nova/nova.conf db sync
2011-02-16 16:17:08,249 CRITICAL nova.root [-] flag --network_size=<# of addrs>: invalid literal for long() with base 10: '<# of addrs>'
(nova.root): TRACE: Traceback (most recent call last):
(nova.root): TRACE: File "/usr/bin/nova-manage", line 5, in <module>
(nova.root): TRACE: pkg_resources.run_script('nova==2011.1', 'nova-manage')
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 489, in run_script
(nova.root): TRACE: self.require(requires)[0].run_script(script_name, ns)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1207, in run_script
(nova.root): TRACE: execfile(script_filename, namespace, namespace)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 694, in <module>
(nova.root): TRACE: main()
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 660, in main
(nova.root): TRACE: argv = FLAGS(sys.argv)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/flags.py", line 71, in __call__
(nova.root): TRACE: args = gflags.FlagValues.__call__(self, argv)
(nova.root): TRACE: File "build/bdist.linux-x86_64/egg/gflags.py", line 1114, in __call__
(nova.root): TRACE: flag.Parse(arg)
(nova.root): TRACE: File "build/bdist.linux-x86_64/egg/gflags.py", line 1651, in Parse
(nova.root): TRACE: raise IllegalFlagValue("flag --%s=%s: %s" % (self.name, argument, e))
(nova.root): TRACE: IllegalFlagValue: flag --network_size=<# of addrs>: invalid literal for long() with base 10: '<# of addrs>'
(nova.root): TRACE:

any suggestion ??? thank you!

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Christian Berendt
Solved:
2011-02-28
Last query:
2011-02-28
Last reply:
2011-02-25
Jay Pipes (jaypipes) said : #1

Replace <# of addrs> in /etc/nova/nova.conf with the size of the network (# of IP Addresses in the network). Looks like the docs on that wiki page need to be updated...

janson (janson071) said : #2

To Jay Pipes:

this is the content in /etc/nova/nova.conf :

--daemonize=1
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--sql_connection=mysql://root:nova@172.28.139.46/nova
--s3_host=172.28.139.46
--rabbit_host=172.28.139.46
--ec2_host=172.28.139.46
--verbose
--ec2_url=http://172.28.139.46:8773/services/Cloud
--network_manager=nova.network.manager.VlanManager
--fixed_range=<172.28.139.0/24>
--network_size=<#64>

Is it right???

but after I replace <# of addrs> in /etc/nova/nova.conf with the size of the network (# of IP Addresses in the network)

It seems does not work, errors as follows:

[root@localhost /]# nova-manage --flagfile /etc/nova/nova.conf db sync
2011-02-16 17:15:36,220 CRITICAL nova.root [-] flag --network_size=<64>: invalid literal for long() with base 10: '<64>'
(nova.root): TRACE: Traceback (most recent call last):
(nova.root): TRACE: File "/usr/bin/nova-manage", line 5, in <module>
(nova.root): TRACE: pkg_resources.run_script('nova==2011.1', 'nova-manage')
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 489, in run_script
(nova.root): TRACE: self.require(requires)[0].run_script(script_name, ns)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1207, in run_script
(nova.root): TRACE: execfile(script_filename, namespace, namespace)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 694, in <module>
(nova.root): TRACE: main()
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 660, in main
(nova.root): TRACE: argv = FLAGS(sys.argv)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/flags.py", line 71, in __call__
(nova.root): TRACE: args = gflags.FlagValues.__call__(self, argv)
(nova.root): TRACE: File "build/bdist.linux-x86_64/egg/gflags.py", line 1114, in __call__
(nova.root): TRACE: flag.Parse(arg)
(nova.root): TRACE: File "build/bdist.linux-x86_64/egg/gflags.py", line 1651, in Parse
(nova.root): TRACE: raise IllegalFlagValue("flag --%s=%s: %s" % (self.name, argument, e))
(nova.root): TRACE: IllegalFlagValue: flag --network_size=<64>: invalid literal for long() with base 10: '<64>'

Soren Hansen (soren) said : #3

> --network_size=<#64>
>
> Is it right???

No, just put --network_size=64

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

Jay Pipes (jaypipes) said : #4

And change this:

--fixed_range=<172.28.139.0/24>

to this:

--fixed_range=172.28.139.0/24

janson (janson071) said : #5

Thank you for your answer, after change , this error:
(nova.root): TRACE: IllegalFlagValue: flag --network_size=<64>: invalid literal for long()

was solved; but another error occurs like this:

[root@localhost ~]# nova-manage --flagfile /etc/nova/nova.conf db sync
2011-02-17 09:09:51,883 CRITICAL nova.root [-] cannot import name exceptions
(nova.root): TRACE: Traceback (most recent call last):
(nova.root): TRACE: File "/usr/bin/nova-manage", line 5, in <module>
(nova.root): TRACE: pkg_resources.run_script('nova==2011.1', 'nova-manage')
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 489, in run_script
(nova.root): TRACE: self.require(requires)[0].run_script(script_name, ns)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1207, in run_script
(nova.root): TRACE: execfile(script_filename, namespace, namespace)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 694, in <module>
(nova.root): TRACE: main()
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 686, in main
(nova.root): TRACE: fn(*argv)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 565, in sync
(nova.root): TRACE: return migration.db_sync(version)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/db/migration.py", line 33, in db_sync
(nova.root): TRACE: return IMPL.db_sync(version=version)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/utils.py", line 331, in __getattr__
(nova.root): TRACE: backend = self.__get_backend()
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/utils.py", line 326, in __get_backend
(nova.root): TRACE: self.__backend = __import__(name, None, None, fromlist)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/db/sqlalchemy/migration.py", line 25, in <module>
(nova.root): TRACE: from migrate.versioning import exceptions as versioning_exceptions
(nova.root): TRACE: ImportError: cannot import name exceptions
(nova.root): TRACE:

then, I used "easy_install-2.6 exception" to download relational package ,but can not found url address.

what can I do ???

Todd Willey (xtoddx) said : #6

There was a bug fix that just went in to trunk today that fixes this issue.

janson (janson071) said : #7

To Todd Willey:

sorry, "just went in to trunk today that fixes this issue"???

what does that mean???

Jay Pipes (jaypipes) said : #8

It means you need to pull the latest version of trunk in order to get
past this particular bug unfortunately.

On Wed, Feb 16, 2011 at 9:18 PM, janson
<email address hidden> wrote:
> Question #145577 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/145577
>
> janson posted a new comment:
> To Todd Willey:
>
> sorry, "just went in to trunk today that fixes this issue"???
>
> what does that mean???
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).
>

janson (janson071) said : #9

To Jay:

I'm very sorry, I am a newcomer.

but how to pull the latest version of trunk ???

and what is trunk???

Thank you very much!

Best Christian Berendt (berendt) said : #10

Take a look into the wiki: http://wiki.openstack.org/GettingTheCode and try again with the latest revision. Your problem should be solved.

janson (janson071) said : #11

Thanks Christian Berendt, that solved my question.