In an environment running Neutron, a request from your instance must traverse a number of steps:
From the instance to a router,
Through a NAT rule in the router namespace,
To an instance of the neutron-ns-metadata-proxy,
To the actual Nova metadata service
When there are problem accessing the metadata, it can be helpful to verify that the metadata service itself is configured correctly and returning meaningful information.
end quoting and start reproducing on Controller of Two Node Neutron GRE+OVS+Gluster Fedora 20 Cluster
[root@dallas1 ~(keystone_admin)]$ ip netns list
qrouter-cb80b040-f13f-4a67-a39e-353b1c873a0d
qdhcp-166d9651-d299-47df-a5a1-b368e87b612f
Check on the Routing on Cloud controller's router namespace, it should show
port 80 for 169.254.169.254 routes to the host at port 8700
[root@dallas1 ~(keystone_admin)]$ ip netns exec qrouter-cb80b040-f13f-4a67-a39e-353b1c873a0d ip r
default via 192.168.1.1 dev qg-8fbb6202-3d
10.0.0.0/24 dev qr-2dd1ba70-34 proto kernel scope link src 10.0.0.1
192.168.1.0/24 dev qg-8fbb6202-3d proto kernel scope link src 192.168.1.100
[root@dallas1 ~(keystone_admin)]$ ip netns exec qrouter-cb80b040-f13f-4a67-a39e-353b1c873a0d netstat -na
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:8700 0.0.0.0:* LISTEN
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
[root@dallas1 ~(keystone_admin)]$ ip netns exec qdhcp-166d9651-d299-47df-a5a1-b368e87b612f netstat -na
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 10.0.0.3:53 0.0.0.0:* LISTEN
tcp6 0 0 fe80::f816:3eff:feef:53 :::* LISTEN
udp 0 0 10.0.0.3:53 0.0.0.0:*
udp 0 0 0.0.0.0:67 0.0.0.0:*
udp6 0 0 fe80::f816:3eff:feef:53 :::*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
[root@dfw02 ~(keystone_boris)]$ glance image-list
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
| a6e8ef59-e492-46e2-8147-fd8b1a65ed73 | CentOS 6.5 image | qcow2 | bare | 344457216 | active |
| dc992799-7831-4933-b6ee-7b81868f808b | CirrOS31 | qcow2 | bare | 13147648 | active |
| 03c9ad20-b0a3-4b71-aa08-2728ecb66210 | Fedora 19 x86_64 | qcow2 | bare | 237371392 | active |
| de93ee44-4085-4111-b022-a7437da8feac | Fedora 20 image | qcow2 | bare | 214106112 | active |
| e70591fc-6905-4e57-84b7-4ffa7c001864 | Ubuntu Server 13.10 | qcow2 | bare | 244514816 | active |
| 81734fc7-7300-48db-9b91-95e653e5ed5b | Ubuntu Trusty 03/25/2014 | qcow2 | bare | 251920896 | active |
| 23ac0b82-9579-4491-8a12-9dfb566361a1 | Ubuntu Trusty 03/26/2014 | qcow2 | bare | 251986432 | active |
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
Controller is dfw02.localdomain (192.168.1.127)
Compute is dfw01.localdomain (192.168.1.137)
Cluster Config
[root@dfw02 ~(keystone_admin)]$ openstack-status
== Nova services == openstack-nova-api: active
openstack-nova-cert: inactive (disabled on boot)
openstack-nova-compute: inactive (disabled on boot)
openstack-nova-network: inactive (disabled on boot) openstack-nova-scheduler: active
openstack-nova-volume: inactive (disabled on boot) openstack-nova-conductor: active
== Glance services ==
openstack-glance-api: active
openstack-glance-registry: active
== Keystone service ==
openstack-keystone: active
== Horizon service ==
openstack-dashboard: active
== neutron services ==
neutron-server: active
neutron-dhcp-agent: active
neutron-l3-agent: active
neutron-metadata-agent: active
neutron-lbaas-agent: inactive (disabled on boot)
neutron-openvswitch-agent: active
neutron-linuxbridge-agent: inactive (disabled on boot)
neutron-ryu-agent: inactive (disabled on boot)
neutron-nec-agent: inactive (disabled on boot)
neutron-mlnx-agent: inactive (disabled on boot)
== Cinder services ==
openstack-cinder-api: active
openstack-cinder-scheduler: active
openstack-cinder-volume: active
== Ceilometer services ==
openstack-ceilometer-api: inactive (disabled on boot)
openstack-ceilometer-central: inactive (disabled on boot)
openstack-ceilometer-compute: active
openstack-ceilometer-collector: inactive (disabled on boot)
openstack-ceilometer-alarm-notifier: inactive (disabled on boot)
openstack-ceilometer-alarm-evaluator: inactive (disabled on boot)
== Support services ==
mysqld: inactive (disabled on boot)
libvirtd: active
openvswitch: active
dbus: active
tgtd: active
qpidd: active
memcached: active
even ending up with "Error" status still creates glusterfs cinder
volume ( with system_id ) , which is quite healthy and may be utilized
for building new instance of F20 or Ubuntu 14.04, whatever original
image was, via CLI or via Dashboard. It looks like a kind of bug in
Nova&Neutron inter process communications. I would say
synchronization at boot up.
I have to notice that procedure above is actually a hack , bug is serious and well known . View :-
"Provide an API for external services to send defined events to the
compute service for synchronization. This includes immediate needs for
nova-neutron interaction around boot timing and network info updates"
When you first time boot cloud instance (RDO Havana) via `nova boot ..` or via Dashboard associated with ssh keypair , the default MTU value for eth0 of instance has been built would be 1500. The last one in case of GRE tunnelling makes useless attempt to connect to instance via ssh ( $ ssh -l fedora -i key2.pem Instance-IP ). What actually forces you to write customization script to log into instance via VNC console with account like "fedora","ubuntu","cloud-user" and set MTU manually to 1454 inside instance. However , it exists known approach to tune dhcp_agent.ini and dnsmasq.conf to assign internal IP for instance with MTU 1454 at the first boot up updating neutron-dhcp-agent.ini & dnsmasq.conf files as follows [ 1 ] :-
[root@dfw02 neutron(keystone_admin)]$ systemctl status neutron-dhcp-agent.service
neutron-dhcp-agent.service - OpenStack Quantum DHCP Agent
Loaded: loaded (/usr/lib/systemd/system/neutron-dhcp-agent.service; enabled)
Active: active (running) since Sun 2014-03-16 13:03:47 MSK; 9s ago
Main PID: 20767 (neutron-dhcp-ag)
CGroup: /system.slice/neutron-dhcp-agent.service
├─20767 /usr/bin/python /usr/bin/neutron-dhcp-agent --config-file /usr/share/neutron/neutron-dist.con...
├─20814 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=ns-343b0090-24 --...
└─20816 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=ns-40dd712c-e4 --...
Mar 16 13:03:48 dfw02.localdomain dnsmasq[20816]: started, version 2.68 cachesize 150
Mar 16 13:03:48 dfw02.localdomain dnsmasq[20816]: compile time options: IPv6 GNU-getopt DBus no-i18n IDN DHC...auth
Mar 16 13:03:48 dfw02.localdomain dnsmasq[20816]: warning: no upstream servers configured
Mar 16 13:03:48 dfw02.localdomain dnsmasq-dhcp[20816]: DHCP, static leases only on 10.0.0.0, lease time 2m
Mar 16 13:03:48 dfw02.localdomain dnsmasq-dhcp[20816]: DHCP, sockets bound exclusively to interface ns-40dd712c-e4
Mar 16 13:03:48 dfw02.localdomain dnsmasq[20816]: cleared cache
Mar 16 13:03:48 dfw02.localdomain dnsmasq-dhcp[20816]: read /var/lib/neutron/dhcp/1eea88bb-4952-4aa4-9148-18b...ost
Mar 16 13:03:48 dfw02.localdomain dnsmasq-dhcp[20816]: read /var/lib/neutron/dhcp/1eea88bb-4952-4aa4-9148-18b...pts
Mar 16 13:03:58 dfw02.localdomain dnsmasq-dhcp[20814]: DHCPREQUEST(ns-343b0090-24) 40.0.0.6 fa:16:3e:d7:33:35
Mar 16 13:03:58 dfw02.localdomain dnsmasq-dhcp[20814]: DHCPNAK(ns-343b0090-24) 40.0.0.6 fa:16:3e:d7:33:35 lea...und
Mar 16 13:04:02 dfw02.localdomain dnsmasq-dhcp[20814]: DHCPDISCOVER(ns-343b0090-24) fa:16:3e:d7:33:35
Mar 16 13:04:02 dfw02.localdomain dnsmasq-dhcp[20814]: DHCPOFFER(ns-343b0090-24) 40.0.0.6 fa:16:3e:d7:33:35
Mar 16 13:04:02 dfw02.localdomain dnsmasq-dhcp[20814]: DHCPREQUEST(ns-343b0090-24) 40.0.0.6 fa:16:3e:d7:33:35
Mar 16 13:04:02 dfw02.localdomain dnsmasq-dhcp[20814]: DHCPACK(ns-343b0090-24) 40.0.0.6 fa:16:3e:d7:33:35 hos...0-6
Hint: Some lines were ellipsized, use -l to show in full.
Creating instance via dashboard manage as usually ( just submit ssh key-pair when launching instance)
It will now result :-
$ ssh -l fedora -i key2.pem 192.168.1.106 The authenticity of host '192.168.1.106 (192.168.1.106)' can't be established. RSA key fingerprint is 68:1a:79:33:c3:f8:2f:61:6a:a3:e1:40:9f:1c:76:33. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.1.106' (RSA) to the list of known hosts.
# tail -f /var/log/neutron/dnsmasq.log will report
Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 next server: 40.0.0.3 Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 1 option: 53 message-type 5 Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 4 option: 54 server-identifier 40.0.0.3 Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 4 option: 51 lease-time 2m Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 4 option: 58 T1 56s Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 4 option: 59 T2 1m41s Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 4 option: 1 netmask 255.255.255.0 Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 4 option: 28 broadcast 40.0.0.255 Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 14 option: 15 domain-name openstacklocal Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 13 option: 12 hostname host-40-0-0-7 Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 4 option: 3 router 40.0.0.1 Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 4 option: 6 dns-server 83.221.202.254 Mar 16 14:35:42 dnsmasq-dhcp[26111]: 1830014980 sent size: 2 option: 26 mtu 1454
[boris@dfw02 Downloads]$ ssh -l ubuntu -i key2.pem 192.168.1.109
The authenticity of host '192.168.1.109 (192.168.1.109)' can't be established.
ECDSA key fingerprint is 9f:c6:eb:23:ee:87:6b:47:b1:5f:f0:e6:e8:1c:80:45.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.109' (ECDSA) to the list of known hosts.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
SSH connect to newly built Ubuntu 14.04 instance :-
[boris@dallas1 Downloads]$ ssh -l ubuntu -i key2.pem 192.168.1.106
The authenticity of host '192.168.1.106 (192.168.1.106)' can't be established.
ECDSA key fingerprint is cf:6b:20:a9:6b:30:9b:30:c4:a0:13:7e:82:98:fc:3d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.106' (ECDSA) to the list of known hosts.
Welcome to Ubuntu Trusty Tahr (development branch) (GNU/Linux 3.13.0-19-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Mon Mar 24 06:34:23 UTC 2014
System load: 3.1 Processes: 55
Usage of /: 55.1% of 1.32GB Users logged in: 0
Memory usage: 3% IP address for eth0: 10.0.0.4
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
0 packages can be updated.
0 updates are security updates.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@ubuntuts024:~# apt-get upgrade -y Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntuts024:~# passwd ubuntu Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully