OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 19.1 Legacy Series »
  • CARP role doesn't switch properly after updating to 19.1.8
« previous next »
  • Print
Pages: [1] 2 3

Author Topic: CARP role doesn't switch properly after updating to 19.1.8  (Read 22474 times)

bitmusician

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
    • View Profile
CARP role doesn't switch properly after updating to 19.1.8
« on: May 23, 2019, 11:17:10 am »
Hi,
as we updated and tested the functionality of our test cluster from version 19.1.6 to 19.1.8 and after that our productive cluster from 19.1.4 to 19.1.8, we noticed that there is a little problem with switching the CARP roles. After we finished updating both nodes in each cluster we wanted to know, if the role switching behavior works as before (when MASTER is set into maintenance mode he becomes BACKUP). So node 1 (MASTER) went into maintenance mode but unfortunately stayed Master for this Cluster. Deactivating CARP on this node and activating it again didn't make it work. The only thing that helped us having a normal switching behavior again when one of the nodes is set into maintenance mode was changing the skew of the advertising frequency of one VIP on the MASTER node from 0 to 1 and then back from 1 to 0 again.

Maybe this workaround helps somebody with the same problem.

Greeetz,
bitmusician
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #1 on: May 23, 2019, 11:58:34 am »
There was a change in 19.1.8 indeed, was it one time or is it reproducable?
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

bitmusician

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #2 on: May 23, 2019, 12:14:24 pm »
As I wrote i firstly noticed the problem on our test cluster (which is not a copy of the productive system) and then on our productive cluster too. It should be reproducable on any cluster after updating to 19.1.8 .
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #3 on: May 23, 2019, 01:02:18 pm »
I tested this successfully in dev, maybe you have configures some tunables manually?
Check here the details:
https://github.com/opnsense/core/issues/3163
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

bitmusician

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #4 on: May 23, 2019, 01:25:58 pm »
We didn't make any changes in the tunables and we also did not have packet loss.
Since I did the workaround we don't have the problem anymore.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17703
  • Karma: 1616
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #5 on: May 23, 2019, 01:33:37 pm »
The likely candidate is actually https://github.com/opnsense/core/commit/c5d6b6cacf but it would indicate you are relying on policy routing for a CARP setup which really shouldn't have it (best to use a dedicated CARP link).

# opnsense-patch c5d6b6cacf


Cheers,
Franco
Logged

ruffy91

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 9
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #6 on: May 23, 2019, 08:36:31 pm »
I had exactly the same symptoms, including that disabling CARP and reenabling did not help. Pfsync bulk was successful and skew got to 0 but it did not become master again.
Instead of the workaround I just rebooted it and it became master again.
Logged

Wayne Train

  • Full Member
  • ***
  • Posts: 194
  • Karma: 12
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #7 on: May 27, 2019, 10:50:53 am »
Hi,

I can confrim the issue exists. We're experiencing this behaviour on both of our Production-Clusters since upgrading to 19.1.8. I tried setting our secondary to "persistent carp maintenance mode", which usually makes the primary node master again, but this also failed. I'll reboot the secondary after work, to make it slave again.

Cheers,
Wayne
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #8 on: May 27, 2019, 02:49:57 pm »
Quote from: Wayne Train on May 27, 2019, 10:50:53 am
Hi,

I can confrim the issue exists. We're experiencing this behaviour on both of our Production-Clusters since upgrading to 19.1.8. I tried setting our secondary to "persistent carp maintenance mode", which usually makes the primary node master again, but this also failed. I'll reboot the secondary after work, to make it slave again.

Cheers,
Wayne

How many carp IPs do you have and which type?
My test cluster has 2 VIPs, both static (LAN, WAN), I can successfully switch forth and back.
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

ruffy91

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 9
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #9 on: May 27, 2019, 04:32:10 pm »
My setup has 3 VIP (WAN, LAN, DMZ) + an Alias IP on WAN and has Problems with switching between Firewalls.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #10 on: May 27, 2019, 04:50:12 pm »
Please, on machine 1 and 2 a "sysctl -a | grep carp", before, and after turning into mnt mode, and then when back.
On my side it looks good:

root@OPNsense1:~ # sysctl -a | grep carp
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240
root@OPNsense1:~ # sysctl -a | grep carp
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 240
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240
root@OPNsense1:~ # sysctl -a | grep carp
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240






 root@OPNsense2:~ # sysctl -a | grep carp
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240
root@OPNsense2:~ # sysctl -a | grep carp
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240
root@OPNsense2:~ # sysctl -a | grep carp
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Wayne Train

  • Full Member
  • ***
  • Posts: 194
  • Karma: 12
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #11 on: May 27, 2019, 04:56:18 pm »
Hi,
we use 11 CARP-VIPs., one for each VLAN.
Cheers,
Wayne
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #12 on: May 27, 2019, 04:57:53 pm »
Quote from: Wayne Train on May 27, 2019, 04:56:18 pm
Hi,
we use 11 CARP-VIPs., one for each VLAN.
Cheers,
Wayne

sysctl like above from you too please. Can't track this down without debugging ...
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

katamadone [CH]

  • Jr. Member
  • **
  • Posts: 95
  • Karma: 11
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #13 on: July 03, 2019, 09:35:39 pm »
coming from

Before maintenance:
#1
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240
#2
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240

#1 in persistent maintenance
#1
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 240
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240

#2
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240

#1 left perstitent maintenance
#1
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240
#2
net.inet.carp.ifdown_demotion_factor: 240
net.inet.carp.senderr_demotion_factor: 240
net.inet.carp.demotion: 0
net.inet.carp.log: 1
net.inet.carp.preempt: 1
net.inet.carp.allow: 1
net.pfsync.carp_demotion_factor: 240


« Last Edit: July 04, 2019, 10:42:54 am by katamadone [CH] »
Logged

katamadone [CH]

  • Jr. Member
  • **
  • Posts: 95
  • Karma: 11
    • View Profile
Re: CARP role doesn't switch properly after updating to 19.1.8
« Reply #14 on: July 03, 2019, 09:38:05 pm »
@mimugmail as I interpret you're looking at the *primary*
Code: [Select]
net.inet.carp.demotion: 240
so it should be the same at my side, as on your side. Did you check if Master / Backup was correctly display in the webui?
« Last Edit: July 04, 2019, 10:29:59 am by katamadone [CH] »
Logged

  • Print
Pages: [1] 2 3
« previous next »
  • OPNsense Forum »
  • Archive »
  • 19.1 Legacy Series »
  • CARP role doesn't switch properly after updating to 19.1.8
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2