For Linux users only, moving from ocf:heartbeat:IPaddr to ocf:heartbeat:IPaddr2 can be a good idea, especially since IPaddr had bug(s) in it (see my other pacemaker post[1]). I said “Linux users” because ocf:heartbeat:IPaddr2 uses /sbin/ip where IPaddr uses /sbin/ifconfig.
One of the main differences between /sbin/ifconfig and /sbin/ip is that the primer creates and manages aliases such as eth0.3:0 while the later creates and manages addresses only visible ip addr show. Read link[2] for comparison. If /sbin/ifconfig can’t handle /sbin/ip addresses, fortunatly the opposite isn’t true, this will help after the migration, you’ll understand #1
Let’s go ! You can move from IPaddr to IPaddr2 without reloading or restarting your resources, i.e: you can do it live (but don’t blame me please :p)
The process is quite simple:
- Enter
maintenance-mode: your resources aren’t managed anymore but keep their current state ; - Edit your resources and replace IPaddr with IPaddr2 ;
- At this state, Pacemaker replaces your old IPaddr resources with new IPaddr2 resources. It doesn’t create orphans. But, Pacemaker has to know the state of your new resources before commiting, it’s very important. Hence the
reprobe; - Once you reprobed, Pacemaker is aware your new IPaddr2 resources are up because the
monitoroperation found the previous IPaddr aliases up. That’s because/sbin/ipis aware of/sbin/ifconfigaliases #1 ; - Finally, after validating that your resources won't move with
ptest, you can leavemaintenance-modeand commit your changes.
crm options editor vim configure property maintenance-mode=true configure edit :%s/IPaddr/&2/gc :wq resource reprobe configure ptest scores configure property maintenance-mode=false exit
At this point, your cluster now handles IPaddr2 resources but the previous aliases are still used and visible in /sbin/ifconfig output, that's because has I said before #1 /sbin/ip handles aliases fine. Do not down them, they are in use ! These aliases will be removed and recreated with the new syntax as soon as the resource restarts.
[1] http://floriancrouzat.net/2011/09/pacemaker-tips/
[2] http://www.tty1.net/blog/2010-04-21-ifconfig-ip-comparison_en.html
No comments yet, d'oh!