diff --git a/ceph-mon/Chart.yaml b/ceph-mon/Chart.yaml index 41dafaa6d..e8e3c4ca2 100644 --- a/ceph-mon/Chart.yaml +++ b/ceph-mon/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ceph Mon name: ceph-mon -version: 0.1.16 +version: 0.1.17 home: https://github.com/ceph/ceph ... diff --git a/ceph-mon/templates/bin/moncheck/_start.sh.tpl b/ceph-mon/templates/bin/moncheck/_start.sh.tpl index 3e2c47ba5..6dd7dfbb6 100644 --- a/ceph-mon/templates/bin/moncheck/_start.sh.tpl +++ b/ceph-mon/templates/bin/moncheck/_start.sh.tpl @@ -41,11 +41,15 @@ function check_mon_addrs { for mon in ${mon_hostnames}; do local mon_endpoint=$(echo "${mon_dump}" | awk "/${mon}/{print \$2}") local mon_ip=$(jq -r ".subsets[0].addresses[] | select(.nodeName == \"${mon}\") | .ip" <<< ${mon_endpoints}) - local desired_endpoint=$(printf '[v1:%s:%s/0,v2:%s:%s/0]' ${mon_ip} ${v1_port} ${mon_ip} ${v2_port}) - if [[ "${mon_endpoint}" != "${desired_endpoint}" ]]; then - echo "endpoint for ${mon} is ${mon_endpoint}, setting it to ${desired_endpoint}" - ceph mon set-addrs ${mon} ${desired_endpoint} + # Skip this mon if it doesn't appear in the list of kubernetes endpoints + if [[ -n "${mon_ip}" ]]; then + local desired_endpoint=$(printf '[v1:%s:%s/0,v2:%s:%s/0]' ${mon_ip} ${v1_port} ${mon_ip} ${v2_port}) + + if [[ "${mon_endpoint}" != "${desired_endpoint}" ]]; then + echo "endpoint for ${mon} is ${mon_endpoint}, setting it to ${desired_endpoint}" + ceph mon set-addrs ${mon} ${desired_endpoint} + fi fi done } diff --git a/releasenotes/notes/ceph-mon.yaml b/releasenotes/notes/ceph-mon.yaml index 8bc451b00..5e491f7a0 100644 --- a/releasenotes/notes/ceph-mon.yaml +++ b/releasenotes/notes/ceph-mon.yaml @@ -17,4 +17,5 @@ ceph-mon: - 0.1.14 Update htk requirements - 0.1.15 Prevent mon-check from removing mons when down temporarily - 0.1.16 Correct Ceph Mon Check Ports + - 0.1.17 Skip monmap endpoint check for missing mons ...