Hello community,

here is the log from the commit of package fence-agents for openSUSE:Factory 
checked in at 2016-03-07 13:23:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fence-agents (Old)
 and      /work/SRC/openSUSE:Factory/.fence-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fence-agents"

Changes:
--------
--- /work/SRC/openSUSE:Factory/fence-agents/fence-agents.changes        
2016-01-28 17:25:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.fence-agents.new/fence-agents.changes   
2016-03-07 13:23:25.000000000 +0100
@@ -1,0 +2,26 @@
+Mon Feb 22 09:18:30 UTC 2016 - [email protected]
+
+- Update to version 4.0.22+git.1455008135.15c5e92:
+  + fence_cisco_ucs: Obtain status of device from different endpoint
+  + fence_cisco_ucs: Add --missing-as-off
+
+- Patches for fence_compute (fate#320346) (bsc#964748)
+  - fence_compute: Add --insecure command line argument
+  - fence_compute: Add --region-name command line argument
+  - fence_compute: Create nova client with API 2.11
+  - fence_compute: Fix disabling force_down on node when action is on
+  - fence_compute: Evacuate instances on all tenants
+  - fence_compute: On list, don't list hypervisors but nova-compute services
+  - fence_compute: Only list nova-compute services when getting status
+  - fence_compute: Deprecate the domain option
+
+- Add 0001-fence_compute-Add-insecure-command-line-argument.patch
+- Add 0002-fence_compute-Add-region-name-command-line-argument.patch
+- Add 0003-fence_compute-Create-nova-client-with-API-2.11.patch
+- Add 0004-fence_compute-Fix-disabling-force_down-on-node-when-.patch
+- Add 0005-fence_compute-Evacuate-instances-on-all-tenants.patch
+- Add 0006-fence_compute-On-list-don-t-list-hypervisors-but-nov.patch
+- Add 0007-fence_compute-Only-list-nova-compute-services-when-g.patch
+- Add 0008-fence_compute-Deprecate-the-domain-option.patch
+
+-------------------------------------------------------------------

Old:
----
  fence-agents-4.0.22.tar.gz

New:
----
  0001-fence_compute-Add-insecure-command-line-argument.patch
  0002-fence_compute-Add-region-name-command-line-argument.patch
  0003-fence_compute-Create-nova-client-with-API-2.11.patch
  0004-fence_compute-Fix-disabling-force_down-on-node-when-.patch
  0005-fence_compute-Evacuate-instances-on-all-tenants.patch
  0006-fence_compute-On-list-don-t-list-hypervisors-but-nov.patch
  0007-fence_compute-Only-list-nova-compute-services-when-g.patch
  0008-fence_compute-Deprecate-the-domain-option.patch
  _service
  _servicedata
  fence-agents-4.0.22+git.1455008135.15c5e92.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fence-agents.spec ++++++
--- /var/tmp/diff_new_pack.9a5aON/_old  2016-03-07 13:23:26.000000000 +0100
+++ /var/tmp/diff_new_pack.9a5aON/_new  2016-03-07 13:23:26.000000000 +0100
@@ -22,10 +22,26 @@
 Summary:        Fence Agents for Pacemaker from RHCS
 License:        GPL-2.0 and LGPL-2.1
 Group:          Productivity/Clustering/HA
-Version:        4.0.22
+Version:        4.0.22+git.1455008135.15c5e92
 Release:        0
 Url:            https://github.com/ClusterLabs/fence-agents
-Source0:        %{name}-%{version}.tar.gz
+Source0:        %{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM: fence_compute: Add --insecure command line argument
+Patch1:         0001-fence_compute-Add-insecure-command-line-argument.patch
+# PATCH-FIX-UPSTREAM: fence_compute: Add --region-name command line argument
+Patch2:         0002-fence_compute-Add-region-name-command-line-argument.patch
+# PATCH-FIX-UPSTREAM: fence_compute: Create nova client with API 2.11
+Patch3:         0003-fence_compute-Create-nova-client-with-API-2.11.patch
+# PATCH-FIX-UPSTREAM: fence_compute: Fix disabling force_down on node when 
action is on
+Patch4:         0004-fence_compute-Fix-disabling-force_down-on-node-when-.patch
+# PATCH-FIX-UPSTREAM: fence_compute: Evacuate instances on all tenants
+Patch5:         0005-fence_compute-Evacuate-instances-on-all-tenants.patch
+# PATCH-FIX-UPSTREAM: fence_compute: On list, don't list hypervisors but 
nova-compute services
+Patch6:         0006-fence_compute-On-list-don-t-list-hypervisors-but-nov.patch
+# PATCH-FIX-UPSTREAM: fence_compute: Only list nova-compute services when 
getting status
+Patch7:         0007-fence_compute-Only-list-nova-compute-services-when-g.patch
+# PATCH-FIX-UPSTREAM: fence_compute: Deprecate the domain option
+Patch8:         0008-fence_compute-Deprecate-the-domain-option.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  autoconf
@@ -86,6 +102,14 @@
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 %build
 CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"

++++++ 0001-fence_compute-Add-insecure-command-line-argument.patch ++++++
From b3f74614a1ecbac509a84f291c17884866765317 Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Thu, 7 Jan 2016 22:07:27 +0100
Subject: [PATCH 1/8] fence_compute: Add --insecure command line argument

This makes it possible to have fence_compute work with OpenStack
deployments with SSL certificates that can't be verified (can be the
case in test systems).
---
 fence/agents/compute/fence_compute.py | 12 +++++++++++-
 tests/data/metadata/fence_compute.xml |  5 +++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/fence/agents/compute/fence_compute.py 
b/fence/agents/compute/fence_compute.py
index d9fe54a..ef066d4 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
@@ -242,6 +242,15 @@ def define_new_opts():
                "default" : "",
                "order": 1,
        }
+       all_opt["insecure"] = {
+               "getopt" : "",
+               "longopt" : "insecure",
+               "help" : "--insecure                     Explicitly allow agent 
to perform \"insecure\" TLS (https) requests",
+               "required" : "0",
+               "shortdesc" : "Allow Insecure TLS Requests",
+               "default" : "False",
+               "order": 2,
+       }
        all_opt["domain"] = {
                "getopt" : "d:",
                "longopt" : "domain",
@@ -286,7 +295,7 @@ def main():
 
        device_opt = ["login", "passwd", "tenant-name", "auth-url", 
"fabric_fencing", "on_target",
                "no_login", "no_password", "port", "domain", 
"no-shared-storage", "endpoint-type",
-               "record-only", "instance-filtering"]
+               "record-only", "instance-filtering", "insecure"]
        define_new_opts()
        all_opt["shell_timeout"]["default"] = "180"
 
@@ -331,6 +340,7 @@ def main():
                options["--password"],
                options["--tenant-name"],
                options["--auth-url"],
+               insecure=options["--insecure"],
                endpoint_type=options["--endpoint-type"])
 
        if options["--action"] in ["off", "reboot"]:
diff --git a/tests/data/metadata/fence_compute.xml 
b/tests/data/metadata/fence_compute.xml
index 290a2eb..5aeae40 100644
--- a/tests/data/metadata/fence_compute.xml
+++ b/tests/data/metadata/fence_compute.xml
@@ -43,6 +43,11 @@
                <content type="string" default=""  />
                <shortdesc lang="en">Keystone Admin Tenant</shortdesc>
        </parameter>
+       <parameter name="insecure" unique="0" required="0">
+               <getopt mixed="--insecure" />
+               <content type="boolean" default="False"  />
+               <shortdesc lang="en">Allow Insecure TLS Requests</shortdesc>
+       </parameter>
        <parameter name="domain" unique="0" required="0">
                <getopt mixed="-d, --domain=[string]" />
                <content type="string" default=""  />
-- 
2.6.2

++++++ 0002-fence_compute-Add-region-name-command-line-argument.patch ++++++
From 16d9f9108897c9335e759667ae091162c911cb08 Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Thu, 7 Jan 2016 22:17:51 +0100
Subject: [PATCH 2/8] fence_compute: Add --region-name command line argument

Useful for multi-region setups.
---
 fence/agents/compute/fence_compute.py | 12 +++++++++++-
 tests/data/metadata/fence_compute.xml |  5 +++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/fence/agents/compute/fence_compute.py 
b/fence/agents/compute/fence_compute.py
index ef066d4..d1d797e 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
@@ -242,6 +242,15 @@ def define_new_opts():
                "default" : "",
                "order": 1,
        }
+       all_opt["region-name"] = {
+               "getopt" : "",
+               "longopt" : "region-name",
+               "help" : "--region-name=[region]         Region Name",
+               "required" : "0",
+               "shortdesc" : "Region Name",
+               "default" : "",
+               "order": 1,
+       }
        all_opt["insecure"] = {
                "getopt" : "",
                "longopt" : "insecure",
@@ -295,7 +304,7 @@ def main():
 
        device_opt = ["login", "passwd", "tenant-name", "auth-url", 
"fabric_fencing", "on_target",
                "no_login", "no_password", "port", "domain", 
"no-shared-storage", "endpoint-type",
-               "record-only", "instance-filtering", "insecure"]
+               "record-only", "instance-filtering", "insecure", "region-name"]
        define_new_opts()
        all_opt["shell_timeout"]["default"] = "180"
 
@@ -341,6 +350,7 @@ def main():
                options["--tenant-name"],
                options["--auth-url"],
                insecure=options["--insecure"],
+               region_name=options["--region-name"],
                endpoint_type=options["--endpoint-type"])
 
        if options["--action"] in ["off", "reboot"]:
diff --git a/tests/data/metadata/fence_compute.xml 
b/tests/data/metadata/fence_compute.xml
index 5aeae40..e5c112c 100644
--- a/tests/data/metadata/fence_compute.xml
+++ b/tests/data/metadata/fence_compute.xml
@@ -38,6 +38,11 @@
                <content type="string"  />
                <shortdesc lang="en">Physical plug number on device, UUID or 
identification of machine</shortdesc>
        </parameter>
+       <parameter name="region-name" unique="0" required="0">
+               <getopt mixed="--region-name=[region]" />
+               <content type="boolean" default=""  />
+               <shortdesc lang="en">Region Name</shortdesc>
+       </parameter>
        <parameter name="tenant-name" unique="0" required="0">
                <getopt mixed="-t, --tenant-name=[tenant]" />
                <content type="string" default=""  />
-- 
2.6.2

++++++ 0003-fence_compute-Create-nova-client-with-API-2.11.patch ++++++
From 105f9a9066b3907da4cf1ecde3a484bd8c546b3f Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Wed, 3 Feb 2016 11:33:32 +0100
Subject: [PATCH 3/8] fence_compute: Create nova client with API 2.11

The force_down API requires to use version 2.11 or later.
---
 fence/agents/compute/fence_compute.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fence/agents/compute/fence_compute.py 
b/fence/agents/compute/fence_compute.py
index d1d797e..b443a3c 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
@@ -344,7 +344,7 @@ def main():
                        sys.exit(0)
 
        # The first argument is the Nova client version
-       nova = nova_client.Client('2',
+       nova = nova_client.Client('2.11',
                options["--username"],
                options["--password"],
                options["--tenant-name"],
-- 
2.6.2

++++++ 0004-fence_compute-Fix-disabling-force_down-on-node-when-.patch ++++++
From 6cbbe5d9e81ddeee91d06660f27a4a51117aa0ed Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Wed, 3 Feb 2016 13:45:52 +0100
Subject: [PATCH 4/8] fence_compute: Fix disabling force_down on node when
 action is on

When the action is on, the goal is to disable force_down for the
nova-compute service on the node.

However, we were only doing that if the nova-compute service was up;
which is impossible if it's forced to be down... So just always disable
force_down, and then, if it's up, do more things.
---
 fence/agents/compute/fence_compute.py | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/fence/agents/compute/fence_compute.py 
b/fence/agents/compute/fence_compute.py
index b443a3c..feb86c0 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
@@ -148,23 +148,23 @@ def set_power_status(_, options):
                return
 
        if options["--action"] == "on":
+               try:
+                       # Forcing the host back up
+                       nova.services.force_down(
+                               options["--plug"], "nova-compute", 
force_down=False)
+               except Exception as e:
+                       # In theory, if foce_down=False fails, that's for the 
exact
+                       # same possible reasons that below with force_down=True
+                       # eg. either an incompatible version or an old client.
+                       # Since it's about forcing back to a default value, 
there is
+                       # no real worries to just consider it's still okay even 
if the
+                       # command failed
+                       logging.info("Exception from attempt to force "
+                                         "host back up via nova API: "
+                                         "%s: %s" % (e.__class__.__name__, e))
                if get_power_status(_, options) == "on":
                        # Forcing the service back up in case it was disabled
                        nova.services.enable(options["--plug"], 'nova-compute')
-                       try:
-                               # Forcing the host back up
-                               nova.services.force_down(
-                                       options["--plug"], "nova-compute", 
force_down=False)
-                       except Exception as e:
-                               # In theory, if foce_down=False fails, that's 
for the exact
-                               # same possible reasons that below with 
force_down=True
-                               # eg. either an incompatible version or an old 
client.
-                               # Since it's about forcing back to a default 
value, there is
-                               # no real worries to just consider it's still 
okay even if the
-                               # command failed
-                               logging.info("Exception from attempt to force "
-                                             "host back up via nova API: "
-                                             "%s: %s" % (e.__class__.__name__, 
e))
                else:
                        # Pretend we're 'on' so that the fencing library 
doesn't loop forever waiting for the node to boot
                        override_status = "on"
-- 
2.6.2

++++++ 0005-fence_compute-Evacuate-instances-on-all-tenants.patch ++++++
From 7f059392abfb5bb72f08747f1fd9c3456bd0c766 Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Wed, 3 Feb 2016 16:57:45 +0100
Subject: [PATCH 5/8] fence_compute: Evacuate instances on all tenants

We don't want to evacuate instances in just one tenant, so when we list
the instances, we need to look at all tenants, not just the current one.
---
 fence/agents/compute/fence_compute.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fence/agents/compute/fence_compute.py 
b/fence/agents/compute/fence_compute.py
index feb86c0..be4d173 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
@@ -103,7 +103,7 @@ def _get_evacuable_images():
 
 def _host_evacuate(options):
        result = True
-       servers = nova.servers.list(search_opts={'host': options["--plug"]})
+       servers = nova.servers.list(search_opts={'host': options["--plug"], 
'all_tenants': 1})
        if options["--instance-filtering"] == "False":
                evacuables = servers
        else:
-- 
2.6.2

++++++ 0006-fence_compute-On-list-don-t-list-hypervisors-but-nov.patch ++++++
From a1f665a1f3da3afd94d9888432579ecea7c3bfbf Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Thu, 4 Feb 2016 09:59:43 +0100
Subject: [PATCH 6/8] fence_compute: On list, don't list hypervisors but
 nova-compute services

Everything we do (evacuate, force_down) is on nova-compute services, so
there's no reason to list hypervisors; just directly look for
nova-compute services.
---
 fence/agents/compute/fence_compute.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/fence/agents/compute/fence_compute.py 
b/fence/agents/compute/fence_compute.py
index be4d173..7d7aa49 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
@@ -202,15 +202,9 @@ def get_plugs_list(_, options):
        result = {}
 
        if nova:
-               hypervisors = nova.hypervisors.list()
-               for hypervisor in hypervisors:
-                       longhost = hypervisor.hypervisor_hostname
-                       if options["--domain"] != "":
-                               shorthost = longhost.replace("." + 
options["--domain"], "")
-                               result[longhost] = ("", None)
-                               result[shorthost] = ("", None)
-                       else:
-                               result[longhost] = ("", None)
+               services = nova.services.list(binary="nova-compute")
+               for service in services:
+                       result[service.host] = ("", None)
        return result
 
 
-- 
2.6.2

++++++ 0007-fence_compute-Only-list-nova-compute-services-when-g.patch ++++++
From 35a454b4a7b7e5890d204c1a9893b2909ddccd27 Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Thu, 4 Feb 2016 10:02:49 +0100
Subject: [PATCH 7/8] fence_compute: Only list nova-compute services when
 getting status

We don't care about other services.
---
 fence/agents/compute/fence_compute.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fence/agents/compute/fence_compute.py 
b/fence/agents/compute/fence_compute.py
index 7d7aa49..0273aa2 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
@@ -34,7 +34,7 @@ def get_power_status(_, options):
 
        if nova:
                try:
-                       services = nova.services.list(host=options["--plug"])
+                       services = nova.services.list(host=options["--plug"], 
binary="nova-compute")
                        for service in services:
                                logging.debug("Status of %s is %s" % 
(service.binary, service.state))
                                if service.binary == "nova-compute":
-- 
2.6.2

++++++ 0008-fence_compute-Deprecate-the-domain-option.patch ++++++
From 79d653464fa85cf09c98014f82b5874de250944b Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Thu, 4 Feb 2016 10:08:20 +0100
Subject: [PATCH 8/8] fence_compute: Deprecate the domain option

As far as I understand, this should not be needed anymore: the domain
option was really only useful to translate between hypervisor hostname
and nova service hostname, and we don't get hypervisor hostnames
anywhere anymore.

The option is left around to not break existing configurations that are
using it.
---
 fence/agents/compute/fence_compute.py | 8 ++------
 tests/data/metadata/fence_compute.xml | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/fence/agents/compute/fence_compute.py 
b/fence/agents/compute/fence_compute.py
index 0273aa2..eccab99 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
@@ -257,9 +257,9 @@ def define_new_opts():
        all_opt["domain"] = {
                "getopt" : "d:",
                "longopt" : "domain",
-               "help" : "-d, --domain=[string]          DNS domain in which 
hosts live, useful when the cluster uses short names and nova uses FQDN",
+               "help" : "-d, --domain=[string]          Deprecated option; do 
not do anything anymore",
                "required" : "0",
-               "shortdesc" : "DNS domain in which hosts live",
+               "shortdesc" : "Deprecated option",
                "default" : "",
                "order": 5,
        }
@@ -318,10 +318,6 @@ def main():
        except ImportError:
                fail_usage("nova not found or not accessible")
 
-       # Potentially we should make this a pacemaker feature
-       if options["--action"] != "list" and options["--domain"] != "" and 
options.has_key("--plug"):
-               options["--plug"] = options["--plug"] + "." + 
options["--domain"]
-
        if options["--record-only"] in [ "2", "Disabled", "disabled" ]:
                sys.exit(0)
 
diff --git a/tests/data/metadata/fence_compute.xml 
b/tests/data/metadata/fence_compute.xml
index e5c112c..82e0fde 100644
--- a/tests/data/metadata/fence_compute.xml
+++ b/tests/data/metadata/fence_compute.xml
@@ -56,7 +56,7 @@
        <parameter name="domain" unique="0" required="0">
                <getopt mixed="-d, --domain=[string]" />
                <content type="string" default=""  />
-               <shortdesc lang="en">DNS domain in which hosts live</shortdesc>
+               <shortdesc lang="en">Deprecated option</shortdesc>
        </parameter>
        <parameter name="instance-filtering" unique="0" required="0">
                <getopt mixed="--instance-filtering" />
-- 
2.6.2

++++++ _service ++++++
<services>
  <service name="tar_scm" mode="disabled">
    <param name="url">git://github.com/ClusterLabs/fence-agents.git</param>
    <param name="scm">git</param>
    <param name="exclude">.git</param>
    <param name="filename">fence-agents</param>
    <param name="versionformat">4.0.22+git.%ct.%h</param>
    <param name="revision">master</param>
    <param name="changesgenerate">enable</param>
  </service>

  <service name="recompress" mode="disabled">
    <param name="file">fence-agents*.tar</param>
    <param name="compression">xz</param>
  </service>

  <service name="set_version" mode="disabled">
    <param name="basename">fence-agents</param>
  </service>
</services>
++++++ _servicedata ++++++
<servicedata>
<service name="tar_scm">
            <param 
name="url">git://github.com/ClusterLabs/fence-agents.git</param>
          <param 
name="changesrevision">15c5e92481fc35aef7c36801e500b7913d70edc3</param></service></servicedata>

Reply via email to