I was working on using the PHP interface to create a CARP VIP and NAT to an IP and the first attempt on this involved me just adding to the config array, and not actually calling any of the functions that I needed to reset things. After doing this, I noticed that the result looked exactly like what it looks like when I create a CARP VIP on my Primary: namely that the info is synced, but no interface is assigned. Basically, I'd run something like:
$GLOBALS['config']['virtualip']['vip'][7]['mode'] = 'carp';
$GLOBALS['config']['virtualip']['vip'][7]['interface'] = 'wan';
$GLOBALS['config']['virtualip']['vip'][7]['vhid'] = 8;
$GLOBALS['config']['virtualip']['vip'][7]['advskew'] = 0;
$GLOBALS['config']['virtualip']['vip'][7]['password'] = '******';
$GLOBALS['config']['virtualip']['vip'][7]['descr'] = 'new interface';
$GLOBALS['config']['virtualip']['vip'][7]['type'] = 'single';
$GLOBALS['config']['virtualip']['vip'][7]['subnet_bits'] = 32;
$GLOBALS['config']['virtualip']['vip'][7]['subnet'] = '1.1.1.1';
write_config("Adding new interface");
exec
and it would add it but there would be no carp interface assigned. So I looked through the PHP used in the pages to add a VIP and discovered this particular group of functions:
config_lock();
services_proxyarp_configure();
reset_carp();
filter_configure();
config_unlock();
After running that, the interface came up. I'm wondering if the reset_carp() function is not being executed when the new VIP is synced over to the secondary firewall.