Ask Your Question
1

glance-control argument parse error

asked 2013-08-27 06:09:39 -0500

oodograss gravatar image

updated 2013-08-27 20:00:04 -0500

Hi all, I'm new to OpenStack and Python, and it seems I'm the only one with this weird question.

I am using Ubuntu 12.10, with default python 2.7.3, I followed the installation doc to set up glance from github. Then I tried to run glance-control and got the following:

vinc@aa:/etc/glance$ sudo glance-control 
Traceback (most recent call last):
File "/usr/local/bin/glance-control", line 10, in <module>
  sys.exit(main())
 File "/usr/local/lib/python2.7/dist-packages/glance/cmd/control.py", line 314, in main
   config.parse_args(usage=USAGE)
 File "/usr/local/lib/python2.7/dist-packages/glance/common/config.py", line 103, in parse_args
    default_config_files=default_config_files)
File "/usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1593, in __call__
   else sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py", line 2065, in _parse_cli_opts
   opt._add_to_cli(self._oparser, group)
File "/usr/local/lib/python2.7/dist-packages/oslo/config/cfg.py", line 986, in _add_to_cli
   self.handler(subparsers)
File "/usr/local/lib/python2.7/dist-packages/glance/cmd/control.py", line 273, in add_command_parsers
   parser = subparsers.add_parser(server, parents=[cmd_parser])
File "/usr/lib/python2.7/argparse.py", line 1064, in add_parser
  parser = self._parser_class(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'parents'

And when I run glance-api or glance-regristry, the process is up, looks all right. (No further test yet)

I'm pretty sure the glance source is corret, and the argparse.py is of latest version 1.2.1. And the oslo should come with glance. So where possibly could be wrong? My python's problem? I just can't find a place telling me the required python version.

Thanks for any tips!

edit retag flag offensive close merge delete

Comments

Seems code went wrong here has a lot to do with oslo, I will try to dig in.

oodograss gravatar imageoodograss ( 2013-08-27 20:00:13 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-08-28 06:56:06 -0500

ckmvishnu gravatar image

I did get the same issue when I ran unit test for grizzly-stable code.

pip-requires: olso.config>=1.1.0, so tox installed 1.2.x which caused the same issue mentioned above.

I altered pip-requires to oslo.config==1.1.0. which solved the problem

Its always better to point to targeted version using "==" rather than using ">="

Regards, Vishnu

edit flag offensive delete link more

Comments

There's olso >= 1.2.0 in my requirement.txt, and olso 1.1.0 just works for me too. Happy to get it going, thanks Vishnu!

oodograss gravatar imageoodograss ( 2013-08-28 19:50:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-08-27 06:09:39 -0500

Seen: 535 times

Last updated: Aug 28 '13