Page MenuHomeDevCentral

Automate CARP activation and parameter preemption
Needs ReviewPublic

Authored by yousra on Sun, Mar 15, 17:15.
Tags
None
Referenced Files
F24891117: D4006.id10440.diff
Mon, Mar 16, 07:59
F24891116: D4006.id10443.diff
Mon, Mar 16, 07:59
F24890918: D4006.id10440.diff
Mon, Mar 16, 07:37
F24890915: D4006.id10443.diff
Mon, Mar 16, 07:37
F24890166: D4006.diff
Mon, Mar 16, 06:15
F24888396: D4006.diff
Mon, Mar 16, 02:59

Details

Summary

Automate CARP configuration on router nodes. Preemption is also enabled (net.inet.carp.preempt=1) so that the router with the highest priority CARP regains
the MASTER role after recovery or after being start late.

Test Plan

1.Apply the state on router nodes.

2.Verify CARP states (MASTER/BACKUP).

3.Simulate failover and recovery.

4.Verify CARP states (MASTER/BACKUP).

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Skipped
Unit
No Test Coverage
Branch
role-router
Build Status
Buildable 6482
Build 6766: arc lint + arc unit

Event Timeline

yousra requested review of this revision.Sun, Mar 15, 17:15
yousra created this revision.
dereckson requested changes to this revision.Sun, Mar 15, 20:09
dereckson added inline comments.
roles/core/sysctl/files/sysctl.conf
46

By convention, we call those functions in the .sls, and pass the result here

context:

is_router: {{ salt["node.has_role"]("router") }}
roles/router/carp/init.sls
19

Not a Jinja template. We can omit that line.

This revision now requires changes to proceed.Sun, Mar 15, 20:09

Changes :

  1. roles/router/carp/files/carp-loader.conf rename on roles/router/carp/files/carp.conf
  2. roles/router/carp/files/carp.conf is not a Jinja template
  3. The Salt function is now called in the state and its result is passed to the template through the context, it is a convention.
roles/core/sysctl/files/sysctl.conf
45

Probably best to put that line too in the if block, so we don't have the orphan comment in non-router systems.

Put the line "# Enable CARP preemption" in the if block so we don't have the
orphan comment in non-router systems.

Fix : {{ in place of { {