Openstack Stein metadata access error (not privatekey inserted)

asked 2020-04-11 04:40:42 -0500

Smart IP gravatar image

updated 2020-04-11 11:12:28 -0500

When I tried to access to instance through key, I'm getting error. After some investigations, I found in instance console log, metadata access error.

[  177.256435] cloud-init[1038]: 2020-04-10 21:45:05,083 - util.py[WARNING]: No active metadata service found
[  238.093904] cloud-init[1038]: 2020-04-10 21:46:06,462 - url_helper.py[WARNING]: Calling 
'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: request error
[HTTPConnectionPool(host='192.168.1.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x7f1af8d6c518>, 'Connection to 192.168.1.2 timed out. (connect timeout=50.0)'))]
[  437.737864] cloud-init[1038]: 2020-04-10 21:49:26,107 - url_helper.py[WARNING]: Calling 'http://192.168.1.2/latest/meta-data/instance-id' failed [119/120s]: request error

I have one controlleur and one compute node.

in /etc/neutron/dhcp_agent.ini I have already set

enable_isolated_metadata = true

and in nova.conf, I have already

enabled_apis = osapi_compute,metadata

From compute node I'm getting no route to host on curl command to 169.254.169.254

[root@compute01 /]# curl http://169.254.169.254/
curl: (7) Failed connect to 169.254.169.254:80; No route to host




[root@controller ~]# openstack network agent list
+--------------------------------------+--------------------+-----------------------------+-------------------+-------+-------+---------------------------+
| ID                                   | Agent Type         | Host                        | Availability Zone | Alive | State | Binary                    |
+--------------------------------------+--------------------+-----------------------------+-------------------+-------+-------+---------------------------+
| 0b82f089-fb28-412d-ae14-e67f5fe7688e | Linux bridge agent | controller.smartipgroup.com | None              | :-)   | UP    | neutron-linuxbridge-agent |
| 40f2f054-97bc-461d-8008-c9decf46ae54 | Metadata agent     | controller.smartipgroup.com | None              | :-)   | UP    | neutron-metadata-agent    |
| a88373ca-db62-4f75-8403-e0fcfcd62ee8 | Linux bridge agent | compute01.smartipgroup.com  | None              | :-)   | UP    | neutron-linuxbridge-agent |
| a9e6ec8b-5f7d-4050-8b07-342238ff01ba | DHCP agent         | controller.smartipgroup.com | nova              | :-)   | UP    | neutron-dhcp-agent        |
| e51539e9-e77d-4f1f-84a6-dc3a7595121f | L3 agent           | controller.smartipgroup.com | nova              | :-)   | UP    | neutron-l3-agent          |
+--------------------------------------+--------------------+-----------------------------+-------------------+-------+-------+---------------------------+
edit retag flag offensive close merge delete

Comments

How did you deploy neutron? The control node usually has a metadata service running. Check openstack network agent list If that is the case (which it probably isn’t)

eblock gravatar imageeblock ( 2020-04-11 08:31:54 -0500 )edit

The Agents: Linux bridge agent , Metadata agent ,DHCP agent and L3 agent are UP on my controller. Linux bridge agent is UP on my compute.

Smart IP gravatar imageSmart IP ( 2020-04-11 10:56:50 -0500 )edit
1

Do you see anything in the metadata logs on control node? Is the service_metadata_proxy set in both controller and compute nodes?

eblock gravatar imageeblock ( 2020-04-12 04:49:36 -0500 )edit

Great, On compute in /etc/nova/nova.conf I have set service_metadata_proxy to true and restart compute services. Many thanks @eblock

Smart IP gravatar imageSmart IP ( 2020-04-25 18:03:03 -0500 )edit