-
Notifications
You must be signed in to change notification settings - Fork 8
OpenStack Juno Static IP Patch
There is a bug in OpenStack Juno that prevents BOSH from assigning static IPs. This can be quite an issue when trying to install Cloud Foundry on OpenStack.
This topic explains a very simple fix.
From the Mirantis Fuel Dashboard, navigate to Nodes > Controller and click on the gear icon. The FQDN will list the server you will need to log on to. For this example, ssh into the node-100.prod.myorg.com server:
ssh node-100
Then assign all the environment variables:
source openrc
To find the list of compute nodes, run the following:
nova service-list
The table below shows an example output. (Some columns were removed for easier reading.)
+----+------------------+-------------------------+---------+
| Id | Binary | Host | Status |
+----+------------------+-------------------------+---------+
| 1 | nova-consoleauth | node-100.prod.myorg.com | enabled |
| 2 | nova-scheduler | node-100.prod.myorg.com | enabled |
| 3 | nova-conductor | node-100.prod.myorg.com | enabled |
| 4 | nova-cert | node-100.prod.myorg.com | enabled |
| 5 | nova-compute | node-105.prod.myorg.com | enabled |
| 6 | nova-compute | node-106.prod.myorg.com | enabled |
| 7 | nova-compute | node-107.prod.myorg.com | enabled |
| 8 | nova-compute | node-108.prod.myorg.com | enabled |
| 9 | nova-compute | node-109.prod.myorg.com | enabled |
+----+------------------+-------------------------+---------+
Referring to the output table above, ssh into the first compute node, node-105:
ssh node-105
Once on this server, open the api.py file:
vi /usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py
Replace the following line:
port_req_body['port']['fixed_ips'] = [{'ip_address': fixed_ip}]
...with:
port_req_body['port']['fixed_ips'] = [{'ip_address': str(fixed_ip)}]
Save the file and restart nova-compute:
service openstack-nova-compute restart
You can repeat the previous section for the remaining compute nodes (node-106, node-107, node-108, and node-109), or leverage the first server fixed, copy the api.py file, and restart nova-compute.
To leverage the first compute server's patch, get the list of remaining compute servers you need to patch. When you ran nova service-list on the controller node, there were five compute nodes listed, starting with node-105 and ending with node-109. You've already done node-105 so you still need to patch node-106 through node-109.
for i in {106..109}
do
scp node-106:/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py node-$i:/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py
ssh node-$i service openstack-nova-compute restart
done
Now you can deploy Cloud Foundry and use static IPs.