[compute] Can not set metadata_listen for nova-metadata-api

Bug #1418797 reported by Wei Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
Fix Released
Undecided
Wei Hu

Bug Description

Reference to https://github.com/stackforge/cookbook-openstack-compute/blob/master/templates/default/nova.conf.erb#L170, user don't include metadata in enabled_apis,the "metadata_listen" and "metadata_listen_port" port will can not be setup in nova.conf though configured in environment. However, enable nova-metadata-api do not need to include metadata in enabled_apis. This logic should be changed.

Tags: compute
Wei Hu (huwei-xtu)
Changed in openstack-chef:
assignee: nobody → Wei Hu (huwei-xtu)
description: updated
Wei Hu (huwei-xtu)
tags: added: metadata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cookbook-openstack-compute (master)

Fix proposed to branch: master
Review: https://review.openstack.org/153925

Changed in openstack-chef:
status: New → In Progress
Revision history for this message
Mark Vanderwiel (vanderwl) wrote : Re: Can not set metadata_listen for nova-metadata-api

I'm confused. Why do you need to setup metadata_listen stuff when your not enabling the metadata api?

If you include the nova-metadata-api recipe, I would expect that the enabled_apis attribute would also include metadata. What is the use case for doing otherwise?

Revision history for this message
Wei Hu (huwei-xtu) wrote :

Either nova-metadata-api service or nova-api can provide metadata service. But if we use nova-metadata-api to provide metadata service, we should not include "metadata" in "enabled_apis". Because they listen the same port. See http://docs.openstack.org/admin-guide-cloud/content/section_metadata-service.html.

tags: added: compute
removed: metadata
Revision history for this message
Mark Vanderwiel (vanderwl) wrote :

Ok, I understand. So, we need to add some logic to the cookbooks to handle these cases and pick which one should be the default case. I like the idea of having the nova-metadata-api handle the metadata service. So, with that in mind, I think we need the following changes:

- remove metadata from enabled_apis
- add doc to readme and attribute/defaults to clearly state the relationship between the nova-api and the nova-metadata-api recipes and how the attributes are used in each case.
- add code in the recipes to check for this issue and report at least a warning. in nova-api, if enabled_apis contains metadata AND the nova-metadata-api recipe is in the runlist, output warning, but continue with assumption that enabled_apis is correct. in nova-metadata-api, check to see if the enabled_apis contains metadata, output warning (failure?) and exit early from recipe.
- your existing changes to nova.conf to allow the listen address and port to be specified in either case.
- specs to cover both paths.

Are the other services in the enabled_apis in this same situation? So we need other changes to really fix this completely?

summary: - Can not set metadata_listen for nova-metadata-api
+ [compute] Can not set metadata_listen for nova-metadata-api
Revision history for this message
Wei Hu (huwei-xtu) wrote :

Thanks, I'll check and fix it as you proposed. But because I'm out of office those days. The code will not being timely updated utill I'm back.

Revision history for this message
Mark Vanderwiel (vanderwl) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cookbook-openstack-compute (master)

Change abandoned by Mark Vanderwiel (<email address hidden>) on branch: master
Review: https://review.openstack.org/153925
Reason: Already done with https://review.openstack.org/159252

the other patch to address the two paths for metadata (compute api service and our recipe) is still wip.

JJ Asghar (d-jj)
Changed in openstack-chef:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.