Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Ps 34 manual ha #59

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open

Ps 34 manual ha #59

wants to merge 26 commits into from

Conversation

cedricmeschin
Copy link
Contributor

Description

On recent OS (RHEL8 for example), the declaration of a VIP over if-cfg-@VIP_IF_NAME@:1 file is no working anymore, we can't enable or disable VIP with ifup and ifdown command, Interface name isn't recognized.
So we can use "nmcli" command who works on the different OS (RHEL8, CentOS7, OL8, etc...)
It's needed with documentation of centreon-ha in 21.10 centreon/centreon-documentation#1585

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

Target serie

  • 21.04.x
  • 21.10.x
  • 22.04.x
  • 22.10.x (master)

How this pull request can be tested ?

In replacement of ifup and ifdown commands after declaration of "VIP_IF_NAME:1"
We use nmcli commands for more compatibilities in recent OS (for ex on RHEL 8, "VIP_IF_NAME:1" is no more functionnal)

to add a VIP:
nmcli con mod "@CENTRAL_VIP_IFNAME@" +ipv4.addresses "@CENTRAL_VIP_IPADDR@/@CENTRAL_VIP_CIDR_NETMASK@"
and to take effect
nmcli connection up @CENTRAL_VIP_IFNAME@

to remove a VIP:
nmcli con mod "@CENTRAL_VIP_IFNAME@" -ipv4.addresses "@CENTRAL_VIP_IPADDR@/@CENTRAL_VIP_CIDR_NETMASK@"
and to take effect
nmcli connection up @CENTRAL_VIP_IFNAME@

This also prevents VIP up in slave node.

Checklist

Community contributors & Centreon team

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (master, maintenance).

@sonarqube-decoration
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Fix syntax through ssh sudo
fix syntax through ssh sudo
@sonarqube-decoration
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

1 similar comment
@sonarqube-decoration
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants