[Openstack-operators] Associating public ip addresses (NAT and floating ip issues)
Sharif Islam
islamsh at indiana.edu
Thu Aug 18 19:43:27 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I am following the steps described here:
http://docs.openstack.org/cactus/openstack-compute/admin/content/associating-public-ip.html
I was able to create a floating network and associate a public address
to an instance:
Let's say my public address is xxx,xxx,xx.170.
nova-manage floating create xxx,xxx,xx.170/32
and I was also able to ping xxx.xxx.xx.170 from the host.
my br100 is 10.0.1.1 with is attached to eth0.
my eth1 which is the public_interface shows the new assigned public ip
address.
# nova-manage network list
network netmask start address DNS
10.0.1.0/24 255.255.255.0 10.0.1.2 8.8.4.4
# nova-manage floating list
Command failed, please check log for more info
not sure why floating list is not working:
==========================================
tail -n20 /var/log/nova/nova-manage.log
(nova): TRACE: fn(*argv)
(nova): TRACE: File "/usr/bin/nova-manage", line 509, in list
(nova): TRACE: instance = floating_ip['fixed_ip']['instance']['ec2_id']
(nova): TRACE: File
"/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/models.py", line
74, in __getitem__
(nova): TRACE: return getattr(self, key)
(nova): TRACE: AttributeError: 'Instance' object has no attribute 'ec2_id'
(nova): TRACE:
2011-08-18 15:29:39,913 nova.utils: backend <module
'nova.db.sqlalchemy.api' from
'/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.pyc'>
2011-08-18 15:29:40,003 nova: 'Instance' object has no attribute 'ec2_id'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-manage", line 1122, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/usr/bin/nova-manage", line 1111, in main
(nova): TRACE: fn(*argv)
(nova): TRACE: File "/usr/bin/nova-manage", line 509, in list
(nova): TRACE: instance = floating_ip['fixed_ip']['instance']['ec2_id']
(nova): TRACE: File
"/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/models.py", line
74, in __getitem__
(nova): TRACE: return getattr(self, key)
(nova): TRACE: AttributeError: 'Instance' object has no attribute 'ec2_id'
(nova): TRACE:
Then I try this:
iptables -A nova-network-OUTPUT -d xxx.xxx.xx.170/32 -j DNAT
- --to-destination 10.0.1.1
I get the following in dmesg:
ip_tables: DNAT target: only valid in nat table, not filter
# iptables -L nova-network-OUTPUT
Chain nova-network-OUTPUT (1 references)
target prot opt source destination
#
I need some help with the NAT rules. I am assuming as I haven't setup
the NAT rules that is why I can't access this vm from outside.
Also how can I have a pool of floating ip addresses and get them
assigned when the instances are booting up?
thanks.
I am using cactus.
Python 2.6.6 (r266:84292, Apr 11 2011, 15:50:32)
[GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from nova import version
>>> version.version_string()
'2011.2'
- --sharif
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJOTWtfAAoJEACffes9SivFUSwIAMJoDKqQIOnzpdokGIiLTEV7
MeJ3F4Z3mrm5hQ0GylbQJ0DzU5rqVq8/tZ9E44csc1++OFiGxEtOsBLgXjuw5LaQ
MBLWWrd5dkP21pP8Nn8JXhb5ioYMS5CkJdtfzLAkjXkygo/4OMuyzMJGLcP+RA/z
pkWJX0hi/7umuiUhYXbBVVVdtebxx9JbZynzj8Vw6X08k2pzbcLCD7NnMZ7fw8sz
UGxmSqzD/qigb1xc7HcvP2ZuwKdNLpdL2gIOIX+tiEtbqrM8yoCDZ4sRONAoOw7e
j0YF+QR0dOdkMivuBDSjJAOfDjE3eyfuiFs7tX52s9+icUsM/O1KoJyVMLkKyx8=
=fbAh
-----END PGP SIGNATURE-----
More information about the Openstack-operators
mailing list