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

awsvip monitor returns success when it shall not

Open SpitchAG opened this issue 3 years ago • 3 comments

currently the aws_monitor returns sucess when it can grep the secondary_ip from the awscli describe instance response. However, if the secondary private ip is a substring of the current primary private ip, it returns incorrectly success even when the secondary private ip is not attached to the instance.

SpitchAG avatar Mar 17 '21 11:03 SpitchAG

potential fix: instead of grep use: | awk -v v="$SECONDARY_PRIVATE_IP" '{ for(i=0;i<=NF;i++){if ($i==v) exit 0 }; exit 1}'

SpitchAG avatar Mar 17 '21 11:03 SpitchAG

I already made a fix in linked PR.

oalbrigt avatar Mar 17 '21 11:03 oalbrigt

Ah ok didnt see cool I also proposed a patch

Le mer. 17 mars 2021 à 12:48, Oyvind Albrigtsen @.***> a écrit :

I already made a fix in linked PR.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ClusterLabs/resource-agents/issues/1625#issuecomment-801019136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMUTU3I7IVLEM2MMAGR3M3TECJIDANCNFSM4ZKL2IYA .

SpitchAG avatar Mar 17 '21 11:03 SpitchAG