2016-08-26 13:59:46 +00:00
|
|
|
From f892771543d67d4b7b354349b390b16418d6c181 Mon Sep 17 00:00:00 2001
|
2016-06-30 10:01:27 +00:00
|
|
|
From: Vincent Untz <vuntz@suse.com>
|
|
|
|
Date: Wed, 29 Jun 2016 09:51:37 +0200
|
|
|
|
Subject: [PATCH 8/9] fence_compute: Fix fix_plug_name when looking if plug has
|
|
|
|
domain
|
|
|
|
|
|
|
|
We shouldn't check if the plug name contains the domain, but if it ends
|
|
|
|
with the domain.
|
|
|
|
---
|
|
|
|
fence/agents/compute/fence_compute.py | 4 ++--
|
|
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/fence/agents/compute/fence_compute.py b/fence/agents/compute/fence_compute.py
|
2016-08-26 13:59:46 +00:00
|
|
|
index 1cb7df4..dd04e54 100644
|
2016-06-30 10:01:27 +00:00
|
|
|
--- a/fence/agents/compute/fence_compute.py
|
|
|
|
+++ b/fence/agents/compute/fence_compute.py
|
2016-08-26 13:59:46 +00:00
|
|
|
@@ -283,8 +283,8 @@ def fix_plug_name(options):
|
2016-06-30 10:01:27 +00:00
|
|
|
# Ensure any domain is stripped off since nova isn't using FQDN
|
|
|
|
options["--plug"] = short_plug
|
|
|
|
|
|
|
|
- elif options["--plug"].find(options["--domain"]):
|
|
|
|
- # Plug already contains the domain, don't re-add
|
|
|
|
+ elif options["--plug"].endswith(options["--domain"]):
|
|
|
|
+ # Plug already uses the domain, don't re-add
|
|
|
|
return
|
|
|
|
|
|
|
|
else:
|
|
|
|
--
|
2016-08-26 13:59:46 +00:00
|
|
|
2.9.0
|
2016-06-30 10:01:27 +00:00
|
|
|
|