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