|
|
b94b9d |
From 42dccdd20aff3ebf134c8041f79ab0a658975e69 Mon Sep 17 00:00:00 2001
|
|
|
b94b9d |
From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
|
|
|
b94b9d |
Date: Thu, 30 Aug 2018 18:02:51 +0200
|
|
|
b94b9d |
Subject: [PATCH] aws-vpc-move-ip: Fix broken shell quoting
|
|
|
b94b9d |
|
|
|
b94b9d |
The argument 4th to `ip` is passed with single quotes around which
|
|
|
b94b9d |
cannot be parsed as valid IP address. Furthermore, we need to expand the
|
|
|
b94b9d |
$OCF_RESKEY_ip for grep. This breaks correct detection of the assigned
|
|
|
b94b9d |
address.
|
|
|
b94b9d |
|
|
|
b94b9d |
Fixes 7632a85bcf642b484df52a25dbffbfa0031421bc.
|
|
|
b94b9d |
---
|
|
|
b94b9d |
heartbeat/aws-vpc-move-ip | 4 ++--
|
|
|
b94b9d |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
b94b9d |
|
|
|
b94b9d |
diff --git a/heartbeat/aws-vpc-move-ip b/heartbeat/aws-vpc-move-ip
|
|
|
b94b9d |
index 3bbbed474..ce3fc6b9a 100755
|
|
|
b94b9d |
--- a/heartbeat/aws-vpc-move-ip
|
|
|
b94b9d |
+++ b/heartbeat/aws-vpc-move-ip
|
|
|
b94b9d |
@@ -167,9 +167,9 @@ ec2ip_monitor() {
|
|
|
b94b9d |
ocf_log debug "monitor: Enhanced Monitoring disabled - omitting API call"
|
|
|
b94b9d |
fi
|
|
|
b94b9d |
|
|
|
b94b9d |
- cmd="ip addr show to '$OCF_RESKEY_ip' up"
|
|
|
b94b9d |
+ cmd="ip addr show to $OCF_RESKEY_ip up"
|
|
|
b94b9d |
ocf_log debug "executing command: $cmd"
|
|
|
b94b9d |
- RESULT=$($cmd | grep '$OCF_RESKEY_ip')
|
|
|
b94b9d |
+ RESULT=$($cmd | grep "$OCF_RESKEY_ip")
|
|
|
b94b9d |
if [ -z "$RESULT" ]; then
|
|
|
b94b9d |
ocf_log warn "IP $OCF_RESKEY_ip not assigned to running interface"
|
|
|
b94b9d |
return $OCF_NOT_RUNNING
|