Should I do something for meta-data server?

Asked by Hyunsun Moon

ami-tty image downloaded using 'nova.sh install' succeeds to run but instance console log reports some errors.
As a result, i could ping the instance but could not access with ssh to the instance.

...

Lease of 10.0.0.5 obtained, lease time 120^M
starting DHCP forEthernet interface eth0 [ ^[[1;32mOK^[[0;39m ]^M
cloud-setup: checking http://169.254.169.254/2009-04-04/meta-data/instance-id^M
cloud-setup: failed 1/30: up 7.97. iid had 1.0^M
cloud-setup: failed 2/30: up 9.18. iid had 1.0^M
cloud-setup: failed 3/30: up 10.35. iid had 1.0^M
cloud-setup: failed 4/30: up 11.52. iid had 1.0^M
cloud-setup: failed 5/30: up 12.70. iid had 1.0^M
cloud-setup: failed 6/30: up 13.88. iid had 1.0^M
cloud-setup: failed 7/30: up 15.06. iid had 1.0^M
cloud-setup: failed 8/30: up 16.24. iid had 1.0^M
cloud-setup: failed 9/30: up 17.43. iid had 1.0^M
cloud-setup: failed 10/30: up 18.62. iid had 1.0^M
cloud-setup: failed 11/30: up 19.81. iid had 1.0^M
cloud-setup: failed 12/30: up 21.00. iid had 1.0^M
cloud-setup: failed 13/30: up 22.20. iid had 1.0^M
cloud-setup: failed 14/30: up 23.40. iid had 1.0^M
cloud-setup: failed 15/30: up 24.60. iid had 1.0^M
cloud-setup: failed 16/30: up 25.80. iid had 1.0^M
cloud-setup: failed 17/30: up 27.01. iid had 1.0^M
cloud-setup: failed 18/30: up 28.22. iid had 1.0^M
cloud-setup: failed 19/30: up 29.43. iid had 1.0^M
cloud-setup: failed 20/30: up 30.65. iid had 1.0^M
cloud-setup: failed 21/30: up 31.86. iid had 1.0^M
cloud-setup: failed 22/30: up 33.08. iid had 1.0^M
cloud-setup: failed 23/30: up 34.30. iid had 1.0^M
cloud-setup: failed 24/30: up 35.60. iid had 1.0^M
cloud-setup: failed 25/30: up 36.89. iid had 1.0^M
cloud-setup: failed 26/30: up 38.11. iid had 1.0^M
cloud-setup: failed 27/30: up 39.34. iid had 1.0^M
cloud-setup: failed 28/30: up 40.56. iid had 1.0^M
cloud-setup: failed 29/30: up 41.82. iid had 1.0^M
cloud-setup: failed 30/30: up 43.05. iid had 1.0^M
cloud-setup: after 30 fails, debugging^M
cloud-setup: running debug (30 tries reached)^M
############ debug start ##############^M
### /etc/rc.d/init.d/sshd start^M
stty: /dev/console^M
generating DSS host key [^[[1;33mWATING^[[0;39m]^[[-11G^[[1;34m..^[[0;39m [ ^[[1;32mOK^[[0;39m ]^M
generating RSA host key [^[[1;33mWATING^[[0;39m]^[[-11G^[[1;34m..^[[0;39m [ ^[[1;32mOK^[[0;39m ]^M
startup dropbear [ ^[[1;32mOK^[[0;39m ]^M
### ifconfig -a^M
eth0 Link encap:Ethernet HWaddr 02:16:3E:57:D3:B5 ^M
...

I got similar error with UEC image.
I followed os-compute-admin-book.pdf, starting image section to run instance with UEC image.

[ 1.041552] devtmpfs: mounted^M
[ 1.042649] Freeing unused kernel memory: 828k freed^M
[ 1.060687] Write protecting the kernel read-only data: 10240k^M
[ 1.062651] Freeing unused kernel memory: 308k freed^M
[ 1.064583] Freeing unused kernel memory: 1612k freed^M
init: plymouth main process (49) killed by SEGV signal^M
init: plymouth-splash main process (304) terminated with status 2^M
cloud-init start-local running: Mon, 14 Feb 2011 09:05:34 +0000. up 57.65 seconds
no instance data found in start-local
init: cloud-init-local main process (263) terminated with status 1^M
cloud-init start running: Mon, 14 Feb 2011 09:06:12 +0000. up 68.19 seconds
found data source: DataSourceEc2
consuming user data failed!
Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 196, in <module>
    main()
  File "/usr/bin/cloud-init", line 87, in main
    cloud.consume_userdata,[],False)
  File "/usr/lib/python2.6/dist-packages/cloudinit/__init__.py", line 339, in sem_and_run
    if self.sem_has_run(semname,freq):
  File "/usr/lib/python2.6/dist-packages/cloudinit/__init__.py", line 297, in sem_has_run
    semfile = self.sem_getpath(name,freq)
  File "/usr/lib/python2.6/dist-packages/cloudinit/__init__.py", line 291, in sem_getpath
    freqtok = self.datasource.get_instance_id()
  File "/usr/lib/python2.6/dist-packages/cloudinit/DataSourceEc2.py", line 66, in get_instance_id
    return(self.metadata['instance-id'])
KeyError: 'instance-id'
init: cloud-init main process (373) terminated with status 1^M
mountall: Event failed
init: mountall main process (53) killed by PIPE signal^M
init: plymouth-stop pre-start process (394) terminated with status 1^M
General error mounting filesystems.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system.
Give root password for maintenance

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Everett Toews (everett-toews) said :
#1

Have you tried running the command,

sudo iptables -t nat -A PREROUTING -d 169.254.169.254/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination $NOVA_API_IP:8773

See http://wiki.openstack.org/NovaInstall/MultipleServer

Let me know if that works for you.

Revision history for this message
Hyunsun Moon (hyunsun-moon) said :
#2

Thanks Everett, but it still not work. Actually it worked well before, I don't know why it has just stopped working.
I tested the following command anyway.

GET http://$NOVA_API_IP:8773/latest/user-data

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__
    return app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/root/Work/openstack/nova/nova/api/ec2/__init__.py", line 60, in __call__
    rv = req.get_response(self.application)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 918, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 886, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/root/Work/openstack/nova/nova/api/ec2/metadatarequesthandler.py", line 74, in __call__
    meta_data = cc.get_metadata(remote_address)
  File "/root/Work/openstack/nova/nova/api/ec2/cloud.py", line 143, in get_metadata
    instance_ref = self.compute_api.get_all(ctxt, fixed_ip=address)
  File "/root/Work/openstack/nova/nova/compute/api.py", line 333, in get_all
    return self.db.fixed_ip_get_instance(context, fixed_ip)
  File "/root/Work/openstack/nova/nova/db/api.py", line 298, in fixed_ip_get_instance
    return IMPL.fixed_ip_get_instance(context, address)
  File "/root/Work/openstack/nova/nova/db/sqlalchemy/api.py", line 108, in wrapper
    return f(*args, **kwargs)
  File "/root/Work/openstack/nova/nova/db/sqlalchemy/api.py", line 607, in fixed_ip_get_instance
    fixed_ip_ref = fixed_ip_get_by_address(context, address)
  File "/root/Work/openstack/nova/nova/db/sqlalchemy/api.py", line 108, in wrapper
    return f(*args, **kwargs)
  File "/root/Work/openstack/nova/nova/db/sqlalchemy/api.py", line 597, in fixed_ip_get_by_address
    raise exception.NotFound(_('No floating ip for address %s') % address)
NotFound: No floating ip for address $NOVA_API_IP

Revision history for this message
Everett Toews (everett-toews) said :
#3

What network mode are you running?

I found that the FlatDHCPManager worked for me when I had this problem. See the answer to https://answers.launchpad.net/nova/+question/145820

Can you help with this problem?

Provide an answer of your own, or ask Hyunsun Moon for more information if necessary.

To post a message you must log in.