You can use the steps below if you need to change managed IP resources, for example, if you need to re-IP your RHEL OSP Overcloud endpoints.
In this example, we are changing a managed VIP from one IP to another.
First, we get a good look at the resource that we want to delete. Here we are going to delete the resource ip-184.108.40.206. This resource starts the VIP, 220.127.116.11.
# pcs resource show ip-18.104.22.168
Resource: ip-22.214.171.124 (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=126.96.36.199 cidr_netmask=32
Operations: start interval=0s timeout=20s (ip-188.8.131.52-start-interval-0s)
stop interval=0s timeout=20s (ip-184.108.40.206-stop-interval-0s)
monitor interval=10s timeout=20s (ip-220.127.116.11-monitor-interval-10s)
Now let’s actually delete it.
# pcs resource delete ip-18.104.22.168
Attempting to stop: ip-22.214.171.124…Stopped
Now lets create the replacement VIP
# pcs resource create ip-126.96.36.199 ocf:heartbeat:IPaddr2 ip=188.8.131.52 cidr_netmask=32 op monitor interval=10s
Now, let’s take a good look at it.
# pcs resource show ip-184.108.40.206
Resource: ip-220.127.116.11 (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=18.104.22.168 cidr_netmask=32
Operations: start interval=0s timeout=20s (ip-22.214.171.124-start-interval-0s)
stop interval=0s timeout=20s (ip-126.96.36.199-stop-interval-0s)
monitor interval=10s (ip-188.8.131.52-monitor-interval-10s)
Now we need to check to make sure that the VIP started on one of our OpenStack controllers.
# pcs status | grep 184.108.40.206
ip-220.127.116.11 (ocf::heartbeat:IPaddr2): Started ctrl01
For good measure, let’s make sure we can ping it.
# ping 18.104.22.168
PING 22.214.171.124 (126.96.36.199) 56(84) bytes of data.
64 bytes from 188.8.131.52: icmp_seq=1 ttl=64 time=0.781 ms
64 bytes from 184.108.40.206: icmp_seq=2 ttl=64 time=1.21 ms