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 |
+--------------------------------------+--------------------+-----------------------------+-------------------+-------+-------+---------------------------+