openstack-nova-metadata-api does not start

Solution Verified - Updated -

Issue

  • openstack-nova-metadata-api does not start due to some problem with iptables. The following error was found in the logs.
2014-07-12 22:13:50.932 24134 INFO nova.network.driver [-] Loading network driver 'nova.network.linux_net'
2014-07-12 22:13:50.939 24134 DEBUG nova.openstack.common.lockutils [-] Got semaphore "iptables" lock /usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py:168
2014-07-12 22:13:50.939 24134 DEBUG nova.openstack.common.lockutils [-] Attempting to grab file lock "iptables" lock /usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py:178
2014-07-12 22:13:50.940 24134 DEBUG nova.openstack.common.lockutils [-] Got file lock "iptables" at /var/lib/nova/tmp/nova-iptables lock /usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py:206
2014-07-12 22:13:50.940 24134 DEBUG nova.openstack.common.lockutils [-] Got semaphore / lock "_apply" inner /usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py:248
2014-07-12 22:13:50.941 24134 DEBUG nova.openstack.common.processutils [-] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-save -c execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:154
2014-07-12 22:13:50.997 24134 DEBUG nova.openstack.common.processutils [-] Result was 0 execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:187
2014-07-12 22:13:50.998 24134 DEBUG nova.openstack.common.processutils [-] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:154
2014-07-12 22:13:51.049 24134 DEBUG nova.openstack.common.processutils [-] Result was 2 execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:187
2014-07-12 22:13:51.049 24134 DEBUG nova.openstack.common.processutils [-] ['sudo', 'nova-rootwrap', '/etc/nova/rootwrap.conf', 'iptables-restore', '-c'] failed. Retrying. execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:199
2014-07-12 22:13:52.531 24134 DEBUG nova.openstack.common.processutils [-] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:154
2014-07-12 22:13:52.585 24134 DEBUG nova.openstack.common.processutils [-] Result was 2 execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:187
2014-07-12 22:13:52.585 24134 DEBUG nova.openstack.common.processutils [-] ['sudo', 'nova-rootwrap', '/etc/nova/rootwrap.conf', 'iptables-restore', '-c'] failed. Retrying. execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:199
2014-07-12 22:13:54.427 24134 DEBUG nova.openstack.common.processutils [-] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:154
2014-07-12 22:13:54.479 24134 DEBUG nova.openstack.common.processutils [-] Result was 2 execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:187
2014-07-12 22:13:54.479 24134 DEBUG nova.openstack.common.processutils [-] ['sudo', 'nova-rootwrap', '/etc/nova/rootwrap.conf', 'iptables-restore', '-c'] failed. Retrying. execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:199
2014-07-12 22:13:56.361 24134 DEBUG nova.openstack.common.processutils [-] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:154
2014-07-12 22:13:56.415 24134 DEBUG nova.openstack.common.processutils [-] Result was 2 execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:187
2014-07-12 22:13:56.415 24134 DEBUG nova.openstack.common.processutils [-] ['sudo', 'nova-rootwrap', '/etc/nova/rootwrap.conf', 'iptables-restore', '-c'] failed. Retrying. execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:199
2014-07-12 22:13:57.677 24134 DEBUG nova.openstack.common.processutils [-] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:154
2014-07-12 22:13:57.729 24134 DEBUG nova.openstack.common.processutils [-] Result was 2 execute /usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py:187
2014-07-12 22:13:57.730 24134 DEBUG nova.openstack.common.lockutils [-] Released file lock "iptables" at /var/lib/nova/tmp/nova-iptables lock /usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py:210
2014-07-12 22:13:57.730 24134 DEBUG nova.openstack.common.lockutils [-] Semaphore / lock released "_apply" inner /usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py:252
2014-07-12 22:13:57.731 24134 CRITICAL nova [-] ProcessExecutionError: Unexpected error while running command.
Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c
Exit code: 2
Stdout: ''
Stderr: "Bad argument `ACCEPT'\nError occurred at line: 48\nTry `iptables-restore -h' or 'iptables-restore --help' for more information.\n"
2014-07-12 22:13:57.731 24134 TRACE nova Traceback (most recent call last):
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/bin/nova-api-metadata", line 10, in <module>
2014-07-12 22:13:57.731 24134 TRACE nova     sys.exit(main())
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/cmd/api_metadata.py", line 50, in main
2014-07-12 22:13:57.731 24134 TRACE nova     server = service.WSGIService('metadata', use_ssl=should_use_ssl)
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/service.py", line 329, in __init__
2014-07-12 22:13:57.731 24134 TRACE nova     self.manager = self._get_manager()
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/service.py", line 373, in _get_manager
2014-07-12 22:13:57.731 24134 TRACE nova     return manager_class()
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/api/manager.py", line 30, in __init__
2014-07-12 22:13:57.731 24134 TRACE nova     self.network_driver.metadata_accept()
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 660, in metadata_accept
2014-07-12 22:13:57.731 24134 TRACE nova     iptables_manager.apply()
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 428, in apply
2014-07-12 22:13:57.731 24134 TRACE nova     self._apply()
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 249, in inner
2014-07-12 22:13:57.731 24134 TRACE nova     return f(*args, **kwargs)
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 457, in _apply
2014-07-12 22:13:57.731 24134 TRACE nova     attempts=5)
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1205, in _execute
2014-07-12 22:13:57.731 24134 TRACE nova     return utils.execute(*cmd, **kwargs)
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/utils.py", line 164, in execute
2014-07-12 22:13:57.731 24134 TRACE nova     return processutils.execute(*cmd, **kwargs)
2014-07-12 22:13:57.731 24134 TRACE nova   File "/usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py", line 193, in execute
2014-07-12 22:13:57.731 24134 TRACE nova     cmd=' '.join(cmd))
2014-07-12 22:13:57.731 24134 TRACE nova ProcessExecutionError: Unexpected error while running command.
2014-07-12 22:13:57.731 24134 TRACE nova Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c
2014-07-12 22:13:57.731 24134 TRACE nova Exit code: 2
2014-07-12 22:13:57.731 24134 TRACE nova Stdout: ''
2014-07-12 22:13:57.731 24134 TRACE nova Stderr: "Bad argument `ACCEPT'\nError occurred at line: 48\nTry `iptables-restore -h' or 'iptables-restore --help' for more information.\n"
2014-07-12 22:13:57.731 24134 TRACE nova

Environment

  • Red Hat Enterprise Linux OpenStack Platform 4.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In