Ask Your Question
1

EC2 metadata retuns ip of instance and ip of nova-api service node

asked 2014-06-22 10:39:37 -0500

NickS gravatar image

updated 2014-06-22 10:40:43 -0500

Hello

curl -vL http://169.254.169.254/latest/meta-data/local-ipv4/
* About to connect() to 169.254.169.254 port 80 (#0)
*   Trying 169.254.169.254... connected
* Connected to 169.254.169.254 (169.254.169.254) port 80 (#0)
> GET /latest/meta-data/local-ipv4/ HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 169.254.169.254
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: text/html; charset=UTF-8
< Content-Length: 12
< Date: Sun, 22 Jun 2014 15:15:52 GMT
< 
* Connection #0 to host 169.254.169.254 left intact
* Closing connection #0
192.168.0.22, 10.2.0.50

192.168.0.22 - instance ip 10.2.0.50 - controller ip

Happens only for /latest/meta-data/local-ipv4/

Quick investigation shows that the issue is caused by

https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L243 (https://github.com/openstack/nova/blo...)

'local-ipv4': self.address or fixed_ip, string

self.address variable contains "192.168.0.22, 10.2.0.50" while fixed_ip contains correct "192.168.0.22" value.

The temporary workaround is: swapping those two variables: 'local-ipv4': fixed_ip or self.address, and restart of all nova-compute services

Could anyone give more light into this ? Is this issue caused by incorrect configs or the solution provided fixes the issue completely?

Running latest RDO icehouse. yum list installed | grep nova

openstack-nova-api.noarch          2014.1-4.el6              @openstack-icehouse
openstack-nova-cert.noarch         2014.1-4.el6              @openstack-icehouse
openstack-nova-common.noarch       2014.1-4.el6              @openstack-icehouse
openstack-nova-conductor.noarch    2014.1-4.el6              @openstack-icehouse
openstack-nova-console.noarch      2014.1-4.el6              @openstack-icehouse
openstack-nova-novncproxy.noarch   2014.1-4.el6              @openstack-icehouse
openstack-nova-scheduler.noarch    2014.1-4.el6              @openstack-icehouse
python-nova.noarch                 2014.1-4.el6              @openstack-icehouse
python-novaclient.noarch           1:2.17.0-2.el6            @openstack-icehouse

will provide you with requested configs if you request any

Thanks. Nick

edit retag flag offensive close merge delete

Comments

Thanks Nick. I'd also suggest filing this as a bug in nova: https://bugs.launchpad.net/nova/+filebug tagged ec2 and ops

fifieldt gravatar imagefifieldt ( 2014-06-23 04:21:45 -0500 )edit

ok will do

NickS gravatar imageNickS ( 2014-06-26 12:59:24 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-26 16:57:53 -0500

NickS gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-06-22 10:39:37 -0500

Seen: 486 times

Last updated: Jun 26 '14