yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #04614
[Bug 1211829] Re: error when connecting to metadata service with neutron
** Changed in: neutron
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1211829
Title:
error when connecting to metadata service with neutron
Status in OpenStack Neutron (virtual network service):
Fix Released
Bug description:
When configured with neutron, I'm able to start a cirros instance and
ssh to it, but it fails to connect to the metadata service. From the
cirros console:
checking http://169.254.169.254/2009-04-04/instance-id
failed 1/20: up 9.25. iid had '<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>500 Internal Server Error</h1>
Remote metadata server experienced an internal server error.<br /><br />
From /opt/stack/logs/screen-q-l3.log:
REQ: curl -i http://localhost:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-neutronclient" -d '{"auth": {"tenantName": "%SERVICE_TENANT_NAME%", "passwordCredentials": {"username": "%SERVICE_USER%", "password": "REDACTED"}}}'
http_log_req /opt/stack/python-neutronclient/neutronclient/common/utils.py:173
2013-08-13 13:03:45.559 10939 DEBUG neutronclient.client [-] RESP:{'date': 'Tue, 13 Aug 2013 13:03:45 GMT', 'vary': 'X-Auth-Token', 'content-length': '100', 'status': '401', 'content-type': 'application/json'} {"error": {"message": "Could not find user, %SERVICE_USER%.", "code": 401, "title": "Unauthorized"}}
http_log_resp /opt/stack/python-neutronclient/neutronclient/common/utils.py:179
2013-08-13 13:03:45.560 10939 ERROR neutron.agent.metadata.agent [-] Unexpected error.
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent Traceback (most recent call last):
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/neutron/neutron/agent/metadata/agent.py", line 94, in __call__
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent instance_id = self._get_instance_id(req)
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/neutron/neutron/agent/metadata/agent.py", line 118, in _get_instance_id
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent device_owner=DEVICE_OWNER_ROUTER_INTF)['ports']
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 108, in with_params
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent ret = self.function(instance, *args, **kwargs)
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 278, in list_ports
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent **_params)
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 992, in list
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent for r in self._pagination(collection, path, **params):
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 1005, in _pagination
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent res = self.get(path, params=params)
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 978, in get
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent headers=headers, params=params)
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 963, in retry_request
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent headers=headers, params=params)
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 892, in do_request
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent self.httpclient.authenticate_and_fetch_endpoint_url()
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/client.py", line 172, in authenticate_and_fetch_endpoint_url
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent self.authenticate()
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/client.py", line 231, in authenticate
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent content_type="application/json")
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent File "/opt/stack/python-neutronclient/neutronclient/client.py", line 156, in _cs_request
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent raise exceptions.Unauthorized(message=body)
2013-08-13 13:03:45.560 10939 TRACE neutron.agent.metadata.agent Unauthorized: {"error": {"message": "Could not find user, %SERVICE_USER%.", "code": 401, "title":
It looks like devstack is not setting the keystone authentication options in /etc/neutron/metadata_agent.ini. Here are some lines from that file in my deployment:
# The Neutron user information for accessing the Neutron API.
auth_url = http://localhost:35357/v2.0
auth_region = RegionOne
admin_tenant_name = %SERVICE_TENANT_NAME%
admin_user = %SERVICE_USER%
admin_password = %SERVICE_PASSWORD%
Here's what my localrc looks like:
# Default passwords
ADMIN_PASSWORD=password
MYSQL_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
SCREEN_LOGDIR=/opt/stack/logs
HOST_IP=192.168.27.100
#
# Quantum
#
# https://wiki.openstack.org/wiki/NeutronDevstack
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service neutron
PUBLIC_NETWORK_GATEWAY=192.168.50.1
Q_FLOATING_ALLOCATION_POOL=start=192.168.50.2,end=192.168.50.50
FLOATING_RANGE=192.168.50.0/24
Q_USE_SECGROUP=False
I'm running ubuntu 12.04 inside of VirtualBox.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1211829/+subscriptions