resource-agents icon indicating copy to clipboard operation
resource-agents copied to clipboard

IPv6 notation for ocf:heartbeat:IPaddr2

Open rajubi1981 opened this issue 6 years ago • 7 comments

Hi,

We are trying to add a resource to a group. For us only the short IPv6 notation works.

fd5d:d50a:8c17:2040::251

pcs resource create MNGT_VIP ocf:heartbeat:IPaddr2 ip=fd5d:d50a:8c17:2040::251 op monitor interval=10s --group MNGT

But if we try the below IPv6 notation

fd5d:d50a:8c17:2040:0000:0000:0000:0251 fd5d:d50a:8c17:2040:0:0:0:0251

And same with Upper Case notation.

We wanted to know is there any restriction from pcs package for specific IPv6 notation.

Can you please help.

rajubi1981 avatar Jun 20 '19 15:06 rajubi1981

It has to match the format the ip command shows it as after adding it, so you could add it manually to see how it's represented.

You can also disable the resource and run pcs resource debug-start --full MNGT_VIP and similar for monitor and stop to see why it fails/what it's comparing to.

oalbrigt avatar Jun 20 '19 16:06 oalbrigt

pcs resource debug-start --full MNGT_VIP

stderr: ++ 19:48:57: run_send_ua:855: ip -o -f inet6 addr show dev eth0 to fd5d:d50a:8c17:2040:0000:0000:0000:0250/64 stderr: + 19:48:57: run_send_ua:855: ipstatus='2: eth0 inet6 fd5d:d50a:8c17:2040::250/64 scope global tentative \ valid_lft forever preferred_lft forever stderr: 2: eth0 inet6 fd5d:d50a:8c17:2040::251/64 scope global \ valid_lft forever preferred_lft forever' stderr: + 19:48:57: run_send_ua:856: case "$ipstatus" in stderr: + 19:48:57: run_send_ua:866: '[' 1 -eq 10 ']' stderr: + 19:48:57: run_send_ua:874: sleep 1 stderr: + 19:48:58: run_send_ua:854: for i in '$(seq 1 10)' stderr: ++ 19:48:58: run_send_ua:855: ip -o -f inet6 addr show dev eth0 to fd5d:d50a:8c17:2040:0000:0000:0000:0250/64 stderr: + 19:48:58: run_send_ua:855: ipstatus='2: eth0 inet6 fd5d:d50a:8c17:2040::250/64 scope global tentative dadfailed \ valid_lft forever preferred_lft forever stderr: 2: eth0 inet6 fd5d:d50a:8c17:2040::251/64 scope global \ valid_lft forever preferred_lft forever' stderr: + 19:48:58: run_send_ua:856: case "$ipstatus" in stderr: + 19:48:58: run_send_ua:858: ocf_log err 'IPv6 address collision fd5d:d50a:8c17:2040:0000:0000:0000:0250 [DAD]' stderr: + 19:48:58: ocf_log:323: '[' 2 -lt 2 ']' stderr: + 19:48:58: ocf_log:327: __OCF_PRIO=err stderr: + 19:48:58: ocf_log:328: shift stderr: + 19:48:58: ocf_log:329: __OCF_MSG='IPv6 address collision fd5d:d50a:8c17:2040:0000:0000:0000:0250 [DAD]' stderr: + 19:48:58: ocf_log:331: case "${__OCF_PRIO}" in stderr: + 19:48:58: ocf_log:333: __OCF_PRIO=ERROR stderr: + 19:48:58: ocf_log:340: '[' ERROR = DEBUG ']' stderr: + 19:48:58: ocf_log:343: ha_log 'ERROR: IPv6 address collision fd5d:d50a:8c17:2040:0000:0000:0000:0250 [DAD]' stderr: + 19:48:58: ha_log:255: __ha_log 'ERROR: IPv6 address collision fd5d:d50a:8c17:2040:0000:0000:0000:0250 [DAD]' stderr: + 19:48:58: __ha_log:187: local ignore_stderr=false stderr: + 19:48:58: __ha_log:188: local loglevel stderr: + 19:48:58: __ha_log:190: '[' 'xERROR: IPv6 address collision fd5d:d50a:8c17:2040:0000:0000:0000:0250 [DAD]' = x--ignore-stderr ']' stderr: + 19:48:58: __ha_log:192: '[' none = '' ']'

Using the below notation , leading to DAD issue. fd5d:d50a:8c17:2040:0000:0000:0000:0251 fd5d:d50a:8c17:2040:0:0:0:0251

rajubi1981 avatar Jun 20 '19 20:06 rajubi1981

vm001 IPaddr2(MNGT_VIP)[25864]: ERROR: IPv6 address collision fd5d:d50a:8c17:2040:0000:0000:0000:0250 [DAD] vm001 IPaddr2(MNGT_VIP)[25864]: ERROR: run_send_ua failed. vm001 lrmd[4349]: notice: MNGT_VIP_start_0:25864:stderr [ ocf-exit-reason:run_send_ua failed. ] vm001 crmd[4352]: notice: Result of start operation for MNGT_VIP on vm001: 1 (unknown error) vm001 crmd[4352]: notice: vm001-MNGT_VIP_start_0:2124 [ ocf-exit-reason:run_send_ua failed.\n ] vm001 IPaddr2(MNGT_VIP)[25963]: INFO: IP status = no, IP_CIP= vm001 crmd[4352]: notice: Result of stop operation for MNGT_VIP on vm001: 0 (ok) vm001 IPaddr2(MNGT_VIP)[26011]: INFO: Adding inet6 address fd5d:d50a:8c17:2040:0000:0000:0000:0250/64 to device eth0 (with preferred_lft forever) vm001 IPaddr2(MNGT_VIP)[26011]: INFO: Bringing device eth0 up vm001 kernel: [ 9096.504198] IPv6: eth0: IPv6 duplicate address fd5d:d50a:8c17:2040::250 used by fa:16:3e:68:b9:02 detected! vm001 IPaddr2(MNGT_VIP)[26011]: ERROR: IPv6 address collision fd5d:d50a:8c17:2040:0000:0000:0000:0250 [DAD] vm001 IPaddr2(MNGT_VIP)[26011]: ERROR: run_send_ua failed. vm001 lrmd[4349]: notice: MNGT_VIP_start_0:26011:stderr [ ocf-exit-reason:run_send_ua failed. ] vm001 crmd[4352]: notice: Result of start operation for MNGT_VIP on vm001: 1 (unknown error) vm001 crmd[4352]: notice: vm001-MNGT_VIP_start_0:2126 [ ocf-exit-reason:run_send_ua failed.\n ] vm001 IPaddr2(MNGT_VIP)[26232]: INFO: IP status = no, IP_CIP= vm001 crmd[4352]: notice: Result of stop operation for MNGT_VIP on vm001: 0 (ok)

rajubi1981 avatar Jun 20 '19 20:06 rajubi1981

Oh. I misread this last night.

You have to use the format ip uses that you can see in your output above on the ipstatus= lines.

I tried figuring out a way to support any format, but there was some exceptions no matter which solution I tried as ip outputs its IPs in a combination of forced and some preferred parts from the IPv6 standard from what I recall.

oalbrigt avatar Jun 21 '19 07:06 oalbrigt

So, if I go by your response are you trying to say all IPv6 notation is not supported. Can you confirm out of the four notation provided below which all are supported.

2620:0:60:8bb:8768:164:161:2 ... ... Lower Case 2620:0:60:8BB:8768:164:161:2 ... ... Upper Case 2620::60:8bb:8768:164:161:2 ... ... Short ipv6 notation 620:0000:0060:08bb:8768:0164:0161:0002 ... Long ipv6 notation

rajubi1981 avatar Jun 21 '19 07:06 rajubi1981

I do not have a list of supported vs unsupported notation, but e.g. ip -o -f inet6 addr show dev eth0 to fd5d:d50a:8c17:2040:0000:0000:0000:0250/64 will show you which format it expects.

oalbrigt avatar Jun 21 '19 07:06 oalbrigt

@rajubi1981 please find #1396 to see if it would fix your issue. Thanks!

kskmori avatar Sep 12 '19 06:09 kskmori