Project

General

Profile

Actions

Bug #62276

closed

cephadm: keepalived configured with incorrect unicast IPs if VIP is in different subnet than IP cephadm knows the host by

Added by Adam King 10 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
reef, quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

For example, let's say we have networks set up like

[root@vm-00 ~]# cephadm list-networks
{
    "10.2.1.0/24": {
        "eth1": [
            "10.2.1.140" 
        ]
    },
    "192.168.122.0/24": {
        "eth0": [
            "192.168.122.86" 
        ]
    },
}

across all hosts so they have an eth0 and eth1 interface with different IP ranges. Then, if I add the hosts with the IPs from the eth0 interface
[ceph: root@vm-00 /]# ceph orch host ls
HOST   ADDR             LABELS  STATUS  
vm-00  192.168.122.86   _admin          
vm-01  192.168.122.186                  
vm-02  192.168.122.72                   
3 hosts in cluster

but then configure the VIP to be something like 10.2.1.100/24, which would go through the eth1 interface, the keepalive conf will still use the eth0 addresses and interface in the config

vrrp_instance VI_0 {
  state BACKUP
  priority 90
  interface eth0
  virtual_router_id 50
  advert_int 1
  authentication {
      auth_type PASS
      auth_pass mqfzkqar
  }
  unicast_src_ip 192.168.122.86
  unicast_peer {
    192.168.122.186
    192.168.122.72
  }
  virtual_ipaddress {
    10.2.1.100/24 dev eth0
  }
  track_script {
      check_backend
  }
}

This ultimately doesn't work. We need the conf to specify the eth1 addresses for the unicast IPs and specify "eth1" as the interface in order to line up with the VIP. A setup like the one posted above seems to result in all the keepalive daemons going into MASTER state as they fail to reach each other.

Cephadm already tracks the interfaces and addresses available for the host, we just need to choose the correct ones for the conf.


Related issues 2 (0 open2 closed)

Copied to Orchestrator - Backport #62471: quincy: cephadm: keepalived configured with incorrect unicast IPs if VIP is in different subnet than IP cephadm knows the host byResolvedAdam KingActions
Copied to Orchestrator - Backport #62472: reef: cephadm: keepalived configured with incorrect unicast IPs if VIP is in different subnet than IP cephadm knows the host byResolvedAdam KingActions
Actions

Also available in: Atom PDF