Ask Your Question
0

nova cloudpipe-create PROJECT_NAME fails

asked 2012-06-01 17:48:59 -0500

trapni gravatar image

Hey,

I was following a few guides on how to setup a cloudpipe image and how to proceed. However, executing the command nova cloudpipe-create production (production is the name of my project/tenant) fails with 500 and writes the following into my nova-scheduler.log:

2012-06-01 17:41:41 ERROR nova.rpc.amqp [req-895ca733-3f5a-4be8-bd63-cecb71d7e8d3 project-vpn production] Returning exception 'NoneType' object has no attribute 'get' to caller 2012-06-01 17:41:41 ERROR nova.rpc.amqp [req-895ca733-3f5a-4be8-bd63-cecb71d7e8d3 project-vpn production] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 252, in _process_data\n rval = node_func(context=ctxt, *node_args)\n', ' File "/usr/lib/python2.7/dist-packages/nova/scheduler/manager.py", line 115, in run_instance\n context, ex, *args, *kwargs)\n', ' File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__\n self.gen.next()\n', ' File "/usr/lib/python2.7/dist-packages/nova/scheduler/manager.py", line 105, in run_instance\n return self.driver.schedule_run_instance(args, *kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/nova/scheduler/multi.py", line 78, in schedule_run_instance\n return self.drivers[\'compute\'].schedule_run_instance(args, *kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/nova/scheduler/filter_scheduler.py", line 72, in schedule_run_instance\n args, *kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/nova/scheduler/filter_scheduler.py", line 194, in _schedule\n filter_properties)\n', ' File "/usr/lib/python2.7/dist-packages/nova/scheduler/host_manager.py", line 218, in filter_hosts\n if host.passes_filters(filter_fns, filter_properties):\n', ' File "/usr/lib/python2.7/dist-packages/nova/scheduler/host_manager.py", line 156, in passes_filters\n if not filter_fn(self, filter_properties):\n', ' File "/usr/lib/python2.7/dist-packages/nova/scheduler/filters/affinity_filter.py", line 41, in host_passes\n affinity_uuids = scheduler_hints.get(\'different_host\', [])\n', "AttributeError: 'NoneType' object has no attribute 'get'\n"]

Is this my fault or is this a bug? In the first case, how can I fix / work around this ?

Many thanks, Christian Parpart.

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2012-06-01 22:07:54 -0500

trapni gravatar image

Hey, many thanks for your reply, however, your very last statement worries me:

"also, you need to use the project_id/tenant_id not the project name. Nova doesn't keep track of project names."

you actually mean the keystone's tenant_id, right? because there is still a projects table in the nova database, which I filled initially, also (I did not know the impact of that table anyway <-- I'm still somewhat new to all around OpenStack :-)

Many thanks, Christian.

edit flag offensive delete link more
0

answered 2012-06-01 19:21:23 -0500

vishvananda gravatar image

This is a bug. Looks like affinity filters + cloudpipe is broken.

Fix is easy:

diff --git a/nova/scheduler/filters/affinity_filter.py b/nova/scheduler/filters/affinity_filter.py index e6e7a11..34c8e95 100644 --- a/nova/scheduler/filters/affinity_filter.py +++ b/nova/scheduler/filters/affinity_filter.py @@ -35,7 +35,7 @@ class DifferentHostFilter(AffinityFilter):

 def host_passes(self, host_state, filter_properties):
     context = filter_properties['context']

- scheduler_hints = filter_properties['scheduler_hints'] + scheduler_hints = filter_properties['scheduler_hints'] or {} me = host_state.host

     affinity_uuids = scheduler_hints.get('different_host', [])

@@ -54,7 +54,7 @@ class SameHostFilter(AffinityFilter):

 def host_passes(self, host_state, filter_properties):
     context = filter_properties['context']

- scheduler_hints = filter_properties['scheduler_hints'] + scheduler_hints = filter_properties['scheduler_hints'] or {} me = host_state.host

     affinity_uuids = scheduler_hints.get('same_host', [])

@@ -68,7 +68,7 @@ class SameHostFilter(AffinityFilter):

class SimpleCIDRAffinityFilter(AffinityFilter): def host_passes(self, host_state, filter_properties): - scheduler_hints = filter_properties['scheduler_hints'] + scheduler_hints = filter_properties['scheduler_hints'] or {}

     affinity_cidr = scheduler_hints.get('cidr', '/24')
     affinity_host_addr = scheduler_hints.get('build_near_host_ip')

also, you need to use the project_id/tenant_id not the project name. Nova doesn't keep track of project names.

edit flag offensive delete link more
0

answered 2012-06-01 23:23:31 -0500

vishvananda gravatar image

Yes the tenant_id from keystone. The project table in nova is only there to support migration from deprecated auth. It can safely remain empty along with the users table

edit flag offensive delete link more
0

answered 2012-06-02 01:20:41 -0500

trapni gravatar image

Many thanks for this side-note :-)

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

Stats

Asked: 2012-06-01 17:48:59 -0500

Seen: 41 times

Last updated: Jun 02 '12