Ask Your Question

not able to execute the openstack api !!

asked 2011-02-15 10:54:26 -0500

naved-shah gravatar image

I have done setup of the glance and glance-api and registry are running as expected. i am using filesystem to upload an image and thats working fine. Now i have couple of images uploaded on glance (/var/lib/glance/). TO test the openstack api i ran a command cloudservers image-list or flavor-list and came across below error Traceback (most recent call last): File "/usr/local/bin/cloudservers", line 9, in <module> load_entry_point('python-cloudservers==1.2', 'console_scripts', 'cloudservers')() File "/usr/local/lib/python2.6/dist-packages/python_cloudservers-1.2-py2.6.egg/cloudservers/", line 551, in main CloudserversShell().main(sys.argv[1:]) File "/usr/local/lib/python2.6/dist-packages/python_cloudservers-1.2-py2.6.egg/cloudservers/", line 144, in main args.func(args) File "/usr/local/lib/python2.6/dist-packages/python_cloudservers-1.2-py2.6.egg/cloudservers/", line 293, in do_image_list print_list(self.cs.images.list(), ['ID', 'Name', 'Status']) File "/usr/local/lib/python2.6/dist-packages/python_cloudservers-1.2-py2.6.egg/cloudservers/", line 39, in list return self._list("/images/detail", "images") File "/usr/local/lib/python2.6/dist-packages/python_cloudservers-1.2-py2.6.egg/cloudservers/", line 26, in _list resp, body = self.api.client.get(url) File "/usr/local/lib/python2.6/dist-packages/python_cloudservers-1.2-py2.6.egg/cloudservers/", line 83, in get return self._cs_request(url, 'GET', *kwargs) File "/usr/local/lib/python2.6/dist-packages/python_cloudservers-1.2-py2.6.egg/cloudservers/", line 70, in _cs_request *kwargs) File "/usr/local/lib/python2.6/dist-packages/python_cloudservers-1.2-py2.6.egg/cloudservers/", line 56, in request

I am trying to execute the command from network api server where i have defined the basic properties for glance and set the enviornment variable those are below :- --osapi_host= --osapi_port=8774 --osapi_path=/v1.0/ --allow_project_net_traffic=true --glance_host= --glance_port=9292 --image_service=nova.image.glance.GlanceImageService and variables :- export CLOUD_SERVERS_API_KEY="60ddc94f-77b8-4c7f-a493-80239cf0744d" export CLOUD_SERVERS_USERNAME="admin" export CLOUD_SERVERS_URL="" I also have removed ec2 parameters from the nova.conf file and nova-objectstore is not running any more as well (means only 3 services running on network server and 2 glance server in serperate machine). If i do GET from network server then i get proper response from Glance but if i run cloudservers commands i get exception (mentioned above). Below is the log messages from nova-api service :- 2011-02-15 02:46:09,645 DEBUG eventlet.wsgi.server [-] - - [15/Feb/2011 02:46:09] "GET /v1.0/ HTTP/1.1" 204 276 0.040602 from MainProcess (pid=28711) write /usr/local/lib/python2.6/dist-packages/nova-2011.2-py2.6.egg/nova/ 2011-02-15 02:46:09,666 ERROR nova.api.openstack [-] エラー id openstack のプロジェクトが存在しません。 をキャッチしました。 (nova.api.openstack): TRACE: Traceback (most recent call last): (nova.api.openstack): TRACE: File "/usr/local/lib/python2.6/dist-packages/nova-2011.2-py2.6.egg/nova/api/openstack/", line 52, in __call__ (nova.api.openstack): TRACE: return req.get_response(self.application) (nova ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2011-02-15 12:28:18 -0500

naved-shah gravatar image

Issue was from Nova:- Reason of not running was default project was absent in the DB >> projects and in access key if you see for EC2 there is project id as well present to relate the user and the project but if there is no project id in the access key that time nova code looks for default project and if its nor present in th DB then throws error :- raise exception.NotFound(_("No project with id %s") % id) To resolve this i ad to create a project using the same user which access key is been sourced to cloudserver/openstack api.

edit flag offensive delete link more

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


Asked: 2011-02-15 10:54:26 -0500

Seen: 25 times

Last updated: Feb 15 '11