config_group_name missing in NeutronNetworkHelper

Bug #1439030 reported by li,chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
li,chen

Bug Description

How to reproduce:

1. In manila.conf
  a. remove neutron_admin_password in [DEFAULT]
  b. Add [net1]
  c. add neutron_admin_password in [net1]
  d. Add network_config_group=net1 in [generic1]

2. re-start manila-share service

Expected Result

manila-share start successfully

Actual result:

manila-share start failed with error:

cd /opt/stack/manila && /usr/local/bin/manila-share --config-file /etc/manila/manila.conf
2015-04-23 13:10:10.437 DEBUG oslo_concurrency.lockutils [-] Acquired file lock "/opt/stack/manila/manila_locks/manila-service_instance_get_service_network" after waiting 0.000s from (pid=5594) acquire /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:212
2015-04-23 13:10:10.437 DEBUG oslo_concurrency.lockutils [-] Lock "service_instance_get_service_network" acquired by "get_service_network_id" :: waited 0.001s from (pid=5594) inner /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:444
2015-04-23 13:10:10.437 DEBUG neutronclient.client [-]
REQ: curl -i http://localhost:5000/v2.0/tokens -X POST -H "User-Agent: python-neutronclient" -d '{"auth": {"tenantName": "service", "passwordCredentials": {"username": "neutron", "password": null}}}'
 from (pid=5594) http_log_req /usr/local/lib/python2.7/dist-packages/neutronclient/common/utils.py:130
2015-04-23 13:10:11.426 DEBUG neutronclient.client [-] RESP:401 CaseInsensitiveDict({'content-length': '135', 'vary': 'X-Auth-Token', 'server': 'Apache/2.4.7 (Ubuntu)', 'date': 'Thu, 23 Apr 2015 05:10:10 GMT', 'x-openstack-request-id': 'req-edfa7de5-abfd-4671-b679-fdbcab867ef2', 'content-type': 'application/json', 'www-authenticate': 'Keystone uri="http://localhost:5000"'}) {"error": {"message": "Invalid user / password (Disable debug mode to suppress these details.)", "code": 401, "title": "Unauthorized"}}
 from (pid=5594) http_log_resp /usr/local/lib/python2.7/dist-packages/neutronclient/common/utils.py:139
2015-04-23 13:10:11.426 DEBUG oslo_concurrency.lockutils [-] Releasing file lock "/opt/stack/manila/manila_locks/manila-service_instance_get_service_network" after holding it for 0.989s from (pid=5594) release /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:227
2015-04-23 13:10:11.426 DEBUG oslo_concurrency.lockutils [-] Lock "service_instance_get_service_network" released by "get_service_network_id" :: held 0.989s from (pid=5594) inner /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:456
2015-04-23 13:10:11.427 CRITICAL manila [-] NetworkException: {"error": {"message": "Invalid user / password (Disable debug mode to suppress these details.)", "code": 401, "title": "Unauthorized"}}

2015-04-23 13:10:11.427 TRACE manila Traceback (most recent call last):
2015-04-23 13:10:11.427 TRACE manila File "/usr/local/bin/manila-share", line 10, in <module>
2015-04-23 13:10:11.427 TRACE manila sys.exit(main())
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/cmd/share.py", line 51, in main
2015-04-23 13:10:11.427 TRACE manila binary='manila-share')
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/service.py", line 446, in create
2015-04-23 13:10:11.427 TRACE manila service_name=service_name)
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/service.py", line 350, in __init__
2015-04-23 13:10:11.427 TRACE manila *args, **kwargs)
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/share/manager.py", line 116, in __init__
2015-04-23 13:10:11.427 TRACE manila share_driver, configuration=self.configuration)
2015-04-23 13:10:11.427 TRACE manila File "/usr/local/lib/python2.7/dist-packages/oslo_utils/importutils.py", line 38, in import_object
2015-04-23 13:10:11.427 TRACE manila return import_class(import_str)(*args, **kwargs)
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/share/drivers/generic.py", line 136, in __init__
2015-04-23 13:10:11.427 TRACE manila driver_config=self.configuration))
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/share/drivers/service_instance.py", line 219, in __init__
2015-04-23 13:10:11.427 TRACE manila self.network_helper = self._get_network_helper()
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/share/drivers/service_instance.py", line 173, in _get_network_helper
2015-04-23 13:10:11.427 TRACE manila return NeutronNetworkHelper(self)
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/share/drivers/service_instance.py", line 615, in __init__
2015-04-23 13:10:11.427 TRACE manila self.service_network_id = self.get_service_network_id()
2015-04-23 13:10:11.427 TRACE manila File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 445, in inner
2015-04-23 13:10:11.427 TRACE manila return f(*args, **kwargs)
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/share/drivers/service_instance.py", line 637, in get_service_network_id
2015-04-23 13:10:11.427 TRACE manila for network in self.neutron_api.get_all_admin_project_networks():
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/network/neutron/api.py", line 135, in get_all_admin_project_networks
2015-04-23 13:10:11.427 TRACE manila search_opts = {'tenant_id': self.admin_project_id, 'shared': False}
2015-04-23 13:10:11.427 TRACE manila File "/opt/stack/manila/manila/network/neutron/api.py", line 131, in admin_project_id
2015-04-23 13:10:11.427 TRACE manila message=e.message)
2015-04-23 13:10:11.427 TRACE manila NetworkException: {"error": {"message": "Invalid user / password (Disable debug mode to suppress these details.)", "code": 401, "title": "Unauthorized"}}
2015-04-23 13:10:11.427 TRACE manila
m-shr failed to start

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
assignee: nobody → li,chen (chen-li)
status: New → In Progress
li,chen (chen-li)
description: updated
li,chen (chen-li)
description: updated
li,chen (chen-li)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/169647
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=e806522a6b403a3e2c638fd0e466bce90819a3d6
Submitter: Jenkins
Branch: master

commit e806522a6b403a3e2c638fd0e466bce90819a3d6
Author: Li, Chen <email address hidden>
Date: Tue Mar 31 17:04:46 2015 +0800

    Add config_group_name for NeutronNetworkHelper

    Manila is designed to look for network config options in the order by
    network_config_group, the share backend's config group and
    'DEFAULT' group.

    Currently, only 'DEFAULT' group has been searched by NeutronNetworkHelper.

    Closes-Bug: #1439030

    Change-Id: Id84d415766daa1fc2cec26fc03c2678eaeb00968

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-1 → 1.0.0
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.