|
|
60de42 |
From 4896a948713f748ba04d81ce028befe61ad3dace Mon Sep 17 00:00:00 2001
|
|
|
60de42 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
60de42 |
Date: Mon, 27 Mar 2017 14:32:18 -0500
|
|
|
60de42 |
Subject: [PATCH 1/5] Low: xml: re-indent for consistency
|
|
|
60de42 |
|
|
|
60de42 |
---
|
|
|
60de42 |
xml/resources-2.8.rng | 166 +++++++++++++++++++++++++-------------------------
|
|
|
60de42 |
1 file changed, 83 insertions(+), 83 deletions(-)
|
|
|
60de42 |
|
|
|
60de42 |
diff --git a/xml/resources-2.8.rng b/xml/resources-2.8.rng
|
|
|
60de42 |
index 870e804..e6dfa3a 100644
|
|
|
60de42 |
--- a/xml/resources-2.8.rng
|
|
|
60de42 |
+++ b/xml/resources-2.8.rng
|
|
|
60de42 |
@@ -68,89 +68,89 @@
|
|
|
60de42 |
|
|
|
60de42 |
<define name="element-bundle">
|
|
|
60de42 |
<element name="bundle">
|
|
|
60de42 |
- <attribute name="id"><data type="ID"/></attribute>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="description"><text/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <choice>
|
|
|
60de42 |
- <group>
|
|
|
60de42 |
- <element name="docker">
|
|
|
60de42 |
- <attribute name="image"><text/></attribute>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="replicas"><data type="integer"/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="replicas-per-host"><data type="integer"/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="masters"><data type="integer"/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="pcmk-remote-bin"> <text/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="options"><text/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- </element>
|
|
|
60de42 |
- </group>
|
|
|
60de42 |
- </choice>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <element name="network">
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="ip-range-start"><text/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="control-port"><data type="integer"/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="host-network"><text/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="host-netmask"><data type="integer"/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="docker-network"><text/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <zeroOrMore>
|
|
|
60de42 |
- <element name="port-mapping">
|
|
|
60de42 |
- <attribute name="id"><data type="ID"/></attribute>
|
|
|
60de42 |
- <choice>
|
|
|
60de42 |
- <group>
|
|
|
60de42 |
- <attribute name="port"><data type="integer"/></attribute>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="internal-port"><data type="integer"/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- </group>
|
|
|
60de42 |
- <attribute name="range">
|
|
|
60de42 |
- <data type="string">
|
|
|
60de42 |
- <param name="pattern">([0-9\-]+)</param>
|
|
|
60de42 |
- </data>
|
|
|
60de42 |
- </attribute>
|
|
|
60de42 |
- </choice>
|
|
|
60de42 |
- </element>
|
|
|
60de42 |
- </zeroOrMore>
|
|
|
60de42 |
- </element>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <element name="storage">
|
|
|
60de42 |
- <zeroOrMore>
|
|
|
60de42 |
- <element name="storage-mapping">
|
|
|
60de42 |
- <attribute name="id"><data type="ID"/></attribute>
|
|
|
60de42 |
- <choice>
|
|
|
60de42 |
- <attribute name="source-dir"><text/></attribute>
|
|
|
60de42 |
- <attribute name="source-dir-root"><text/></attribute>
|
|
|
60de42 |
- </choice>
|
|
|
60de42 |
- <attribute name="target-dir"><text/></attribute>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="options"><text/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- </element>
|
|
|
60de42 |
- </zeroOrMore>
|
|
|
60de42 |
- </element>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <ref name="element-primitive"/>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
+ <attribute name="id"><data type="ID"/></attribute>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="description"><text/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <choice>
|
|
|
60de42 |
+ <group>
|
|
|
60de42 |
+ <element name="docker">
|
|
|
60de42 |
+ <attribute name="image"><text/></attribute>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="replicas"><data type="integer"/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="replicas-per-host"><data type="integer"/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="masters"><data type="integer"/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="pcmk-remote-bin"> <text/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="options"><text/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ </element>
|
|
|
60de42 |
+ </group>
|
|
|
60de42 |
+ </choice>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <element name="network">
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="ip-range-start"><text/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="control-port"><data type="integer"/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="host-network"><text/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="host-netmask"><data type="integer"/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="docker-network"><text/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <zeroOrMore>
|
|
|
60de42 |
+ <element name="port-mapping">
|
|
|
60de42 |
+ <attribute name="id"><data type="ID"/></attribute>
|
|
|
60de42 |
+ <choice>
|
|
|
60de42 |
+ <group>
|
|
|
60de42 |
+ <attribute name="port"><data type="integer"/></attribute>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="internal-port"><data type="integer"/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ </group>
|
|
|
60de42 |
+ <attribute name="range">
|
|
|
60de42 |
+ <data type="string">
|
|
|
60de42 |
+ <param name="pattern">([0-9\-]+)</param>
|
|
|
60de42 |
+ </data>
|
|
|
60de42 |
+ </attribute>
|
|
|
60de42 |
+ </choice>
|
|
|
60de42 |
+ </element>
|
|
|
60de42 |
+ </zeroOrMore>
|
|
|
60de42 |
+ </element>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <element name="storage">
|
|
|
60de42 |
+ <zeroOrMore>
|
|
|
60de42 |
+ <element name="storage-mapping">
|
|
|
60de42 |
+ <attribute name="id"><data type="ID"/></attribute>
|
|
|
60de42 |
+ <choice>
|
|
|
60de42 |
+ <attribute name="source-dir"><text/></attribute>
|
|
|
60de42 |
+ <attribute name="source-dir-root"><text/></attribute>
|
|
|
60de42 |
+ </choice>
|
|
|
60de42 |
+ <attribute name="target-dir"><text/></attribute>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <attribute name="options"><text/></attribute>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ </element>
|
|
|
60de42 |
+ </zeroOrMore>
|
|
|
60de42 |
+ </element>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
+ <optional>
|
|
|
60de42 |
+ <ref name="element-primitive"/>
|
|
|
60de42 |
+ </optional>
|
|
|
60de42 |
</element>
|
|
|
60de42 |
</define>
|
|
|
60de42 |
|
|
|
60de42 |
--
|
|
|
60de42 |
1.8.3.1
|
|
|
60de42 |
|
|
|
60de42 |
|
|
|
60de42 |
From 7b5c34893ebd631c2d98269b19fa6226ebc4b5e2 Mon Sep 17 00:00:00 2001
|
|
|
60de42 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
60de42 |
Date: Mon, 27 Mar 2017 14:33:18 -0500
|
|
|
60de42 |
Subject: [PATCH 2/5] Low: libpe_status,xml: changes to new bundle syntax
|
|
|
60de42 |
|
|
|
60de42 |
Get rid of pcmk-remote-bin attribute, rename host-network to host-interface,
|
|
|
60de42 |
and change 'docker-network' attribute of network element to 'network' attribute
|
|
|
60de42 |
of docker element.
|
|
|
60de42 |
---
|
|
|
60de42 |
lib/pengine/container.c | 4 ++--
|
|
|
60de42 |
xml/resources-2.8.rng | 9 ++-------
|
|
|
60de42 |
2 files changed, 4 insertions(+), 9 deletions(-)
|
|
|
60de42 |
|
|
|
60de42 |
diff --git a/lib/pengine/container.c b/lib/pengine/container.c
|
|
|
60de42 |
index ed63b80..0d22bca 100644
|
|
|
60de42 |
--- a/lib/pengine/container.c
|
|
|
60de42 |
+++ b/lib/pengine/container.c
|
|
|
60de42 |
@@ -459,15 +459,15 @@ container_unpack(resource_t * rsc, pe_working_set_t * data_set)
|
|
|
60de42 |
|
|
|
60de42 |
container_data->docker_run_options = crm_element_value_copy(xml_obj, "options");
|
|
|
60de42 |
container_data->image = crm_element_value_copy(xml_obj, "image");
|
|
|
60de42 |
+ container_data->docker_network = crm_element_value_copy(xml_obj, "network");
|
|
|
60de42 |
|
|
|
60de42 |
xml_obj = first_named_child(rsc->xml, "network");
|
|
|
60de42 |
if(xml_obj) {
|
|
|
60de42 |
|
|
|
60de42 |
container_data->ip_range_start = crm_element_value_copy(xml_obj, "ip-range-start");
|
|
|
60de42 |
container_data->host_netmask = crm_element_value_copy(xml_obj, "host-netmask");
|
|
|
60de42 |
- container_data->host_network = crm_element_value_copy(xml_obj, "host-network");
|
|
|
60de42 |
+ container_data->host_network = crm_element_value_copy(xml_obj, "host-interface");
|
|
|
60de42 |
container_data->control_port = crm_element_value_copy(xml_obj, "control-port");
|
|
|
60de42 |
- container_data->docker_network = crm_element_value_copy(xml_obj, "docker-network");
|
|
|
60de42 |
|
|
|
60de42 |
for (xmlNode *xml_child = __xml_first_child_element(xml_obj); xml_child != NULL;
|
|
|
60de42 |
xml_child = __xml_next_element(xml_child)) {
|
|
|
60de42 |
diff --git a/xml/resources-2.8.rng b/xml/resources-2.8.rng
|
|
|
60de42 |
index e6dfa3a..3bc74be 100644
|
|
|
60de42 |
--- a/xml/resources-2.8.rng
|
|
|
60de42 |
+++ b/xml/resources-2.8.rng
|
|
|
60de42 |
@@ -73,7 +73,6 @@
|
|
|
60de42 |
<attribute name="description"><text/></attribute>
|
|
|
60de42 |
</optional>
|
|
|
60de42 |
<choice>
|
|
|
60de42 |
- <group>
|
|
|
60de42 |
<element name="docker">
|
|
|
60de42 |
<attribute name="image"><text/></attribute>
|
|
|
60de42 |
<optional>
|
|
|
60de42 |
@@ -86,13 +85,12 @@
|
|
|
60de42 |
<attribute name="masters"><data type="integer"/></attribute>
|
|
|
60de42 |
</optional>
|
|
|
60de42 |
<optional>
|
|
|
60de42 |
- <attribute name="pcmk-remote-bin"> <text/></attribute>
|
|
|
60de42 |
+ <attribute name="network"><text/></attribute>
|
|
|
60de42 |
</optional>
|
|
|
60de42 |
<optional>
|
|
|
60de42 |
<attribute name="options"><text/></attribute>
|
|
|
60de42 |
</optional>
|
|
|
60de42 |
</element>
|
|
|
60de42 |
- </group>
|
|
|
60de42 |
</choice>
|
|
|
60de42 |
<optional>
|
|
|
60de42 |
<element name="network">
|
|
|
60de42 |
@@ -103,14 +101,11 @@
|
|
|
60de42 |
<attribute name="control-port"><data type="integer"/></attribute>
|
|
|
60de42 |
</optional>
|
|
|
60de42 |
<optional>
|
|
|
60de42 |
- <attribute name="host-network"><text/></attribute>
|
|
|
60de42 |
+ <attribute name="host-interface"><text/></attribute>
|
|
|
60de42 |
</optional>
|
|
|
60de42 |
<optional>
|
|
|
60de42 |
<attribute name="host-netmask"><data type="integer"/></attribute>
|
|
|
60de42 |
</optional>
|
|
|
60de42 |
- <optional>
|
|
|
60de42 |
- <attribute name="docker-network"><text/></attribute>
|
|
|
60de42 |
- </optional>
|
|
|
60de42 |
<zeroOrMore>
|
|
|
60de42 |
<element name="port-mapping">
|
|
|
60de42 |
<attribute name="id"><data type="ID"/></attribute>
|
|
|
60de42 |
--
|
|
|
60de42 |
1.8.3.1
|
|
|
60de42 |
|
|
|
60de42 |
|
|
|
60de42 |
From 758c51110e8a1b0bf2f3f1fdcf4241a3e365ffa2 Mon Sep 17 00:00:00 2001
|
|
|
60de42 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
60de42 |
Date: Mon, 27 Mar 2017 10:51:13 -0500
|
|
|
60de42 |
Subject: [PATCH 3/5] Low: libpe_status: improve bundle docker defaults
|
|
|
60de42 |
|
|
|
60de42 |
Masters now defaults to 0 instead of 1.
|
|
|
60de42 |
Replicas now defaults to masters if masters > 0, otherwise 1.
|
|
|
60de42 |
Replicas and replicas-per-host are now constrained to be positive.
|
|
|
60de42 |
---
|
|
|
60de42 |
lib/pengine/container.c | 33 ++++++++++++++++++++++++---------
|
|
|
60de42 |
1 file changed, 24 insertions(+), 9 deletions(-)
|
|
|
60de42 |
|
|
|
60de42 |
diff --git a/lib/pengine/container.c b/lib/pengine/container.c
|
|
|
60de42 |
index 0d22bca..316f341 100644
|
|
|
60de42 |
--- a/lib/pengine/container.c
|
|
|
60de42 |
+++ b/lib/pengine/container.c
|
|
|
60de42 |
@@ -123,6 +123,7 @@ valid_network(container_variant_data_t *data)
|
|
|
60de42 |
if(data->replicas_per_host > 1) {
|
|
|
60de42 |
pe_err("Specifying the 'control-port' for %s requires 'replicas-per-host=1'", data->prefix);
|
|
|
60de42 |
data->replicas_per_host = 1;
|
|
|
60de42 |
+ /* @TODO to be sure: clear_bit(rsc->flags, pe_rsc_unique); */
|
|
|
60de42 |
}
|
|
|
60de42 |
return TRUE;
|
|
|
60de42 |
}
|
|
|
60de42 |
@@ -436,11 +437,24 @@ container_unpack(resource_t * rsc, pe_working_set_t * data_set)
|
|
|
60de42 |
return FALSE;
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
+ value = crm_element_value(xml_obj, "masters");
|
|
|
60de42 |
+ container_data->masters = crm_parse_int(value, "0");
|
|
|
60de42 |
+ if (container_data->masters < 0) {
|
|
|
60de42 |
+ pe_err("'masters' for %s must be nonnegative integer, using 0",
|
|
|
60de42 |
+ rsc->id);
|
|
|
60de42 |
+ container_data->masters = 0;
|
|
|
60de42 |
+ }
|
|
|
60de42 |
+
|
|
|
60de42 |
value = crm_element_value(xml_obj, "replicas");
|
|
|
60de42 |
- if(value == NULL) {
|
|
|
60de42 |
- value = crm_element_value(xml_obj, "masters");
|
|
|
60de42 |
+ if ((value == NULL) && (container_data->masters > 0)) {
|
|
|
60de42 |
+ container_data->replicas = container_data->masters;
|
|
|
60de42 |
+ } else {
|
|
|
60de42 |
+ container_data->replicas = crm_parse_int(value, "1");
|
|
|
60de42 |
+ }
|
|
|
60de42 |
+ if (container_data->replicas < 1) {
|
|
|
60de42 |
+ pe_err("'replicas' for %s must be positive integer, using 1", rsc->id);
|
|
|
60de42 |
+ container_data->replicas = 1;
|
|
|
60de42 |
}
|
|
|
60de42 |
- container_data->replicas = crm_parse_int(value, "1");
|
|
|
60de42 |
|
|
|
60de42 |
/*
|
|
|
60de42 |
* Communication between containers on the same host via the
|
|
|
60de42 |
@@ -449,14 +463,15 @@ container_unpack(resource_t * rsc, pe_working_set_t * data_set)
|
|
|
60de42 |
*/
|
|
|
60de42 |
value = crm_element_value(xml_obj, "replicas-per-host");
|
|
|
60de42 |
container_data->replicas_per_host = crm_parse_int(value, "1");
|
|
|
60de42 |
-
|
|
|
60de42 |
- if(container_data->replicas_per_host == 1) {
|
|
|
60de42 |
+ if (container_data->replicas_per_host < 1) {
|
|
|
60de42 |
+ pe_err("'replicas-per-host' for %s must be positive integer, using 1",
|
|
|
60de42 |
+ rsc->id);
|
|
|
60de42 |
+ container_data->replicas_per_host = 1;
|
|
|
60de42 |
+ }
|
|
|
60de42 |
+ if (container_data->replicas_per_host == 1) {
|
|
|
60de42 |
clear_bit(rsc->flags, pe_rsc_unique);
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
- value = crm_element_value(xml_obj, "masters");
|
|
|
60de42 |
- container_data->masters = crm_parse_int(value, "1");
|
|
|
60de42 |
-
|
|
|
60de42 |
container_data->docker_run_options = crm_element_value_copy(xml_obj, "options");
|
|
|
60de42 |
container_data->image = crm_element_value_copy(xml_obj, "image");
|
|
|
60de42 |
container_data->docker_network = crm_element_value_copy(xml_obj, "network");
|
|
|
60de42 |
@@ -517,7 +532,7 @@ container_unpack(resource_t * rsc, pe_working_set_t * data_set)
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
xml_obj = first_named_child(rsc->xml, "primitive");
|
|
|
60de42 |
- if(xml_obj && valid_network(container_data) && container_data->replicas > 0) {
|
|
|
60de42 |
+ if (xml_obj && valid_network(container_data)) {
|
|
|
60de42 |
char *value = NULL;
|
|
|
60de42 |
xmlNode *xml_set = NULL;
|
|
|
60de42 |
|
|
|
60de42 |
--
|
|
|
60de42 |
1.8.3.1
|
|
|
60de42 |
|
|
|
60de42 |
|
|
|
60de42 |
From e07efba927386780227d1e19789d50e8c91a6b91 Mon Sep 17 00:00:00 2001
|
|
|
60de42 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
60de42 |
Date: Tue, 28 Mar 2017 11:37:05 -0500
|
|
|
60de42 |
Subject: [PATCH 4/5] Log: libpe_status: ip-start-range is not only possible
|
|
|
60de42 |
networking
|
|
|
60de42 |
|
|
|
60de42 |
---
|
|
|
60de42 |
lib/pengine/container.c | 19 ++++++++++++++-----
|
|
|
60de42 |
1 file changed, 14 insertions(+), 5 deletions(-)
|
|
|
60de42 |
|
|
|
60de42 |
diff --git a/lib/pengine/container.c b/lib/pengine/container.c
|
|
|
60de42 |
index 316f341..7e99e68 100644
|
|
|
60de42 |
--- a/lib/pengine/container.c
|
|
|
60de42 |
+++ b/lib/pengine/container.c
|
|
|
60de42 |
@@ -113,6 +113,18 @@ create_op(xmlNode *parent, const char *prefix, const char *task, const char *int
|
|
|
60de42 |
crm_xml_add(xml_op, "name", task);
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
+/*!
|
|
|
60de42 |
+ * \internal
|
|
|
60de42 |
+ * \brief Check whether cluster can manage resource inside container
|
|
|
60de42 |
+ *
|
|
|
60de42 |
+ * \param[in] data Container variant data
|
|
|
60de42 |
+ *
|
|
|
60de42 |
+ * \return TRUE if networking configuration is acceptable, FALSE otherwise
|
|
|
60de42 |
+ *
|
|
|
60de42 |
+ * \note The resource is manageable if an IP range or control port has been
|
|
|
60de42 |
+ * specified. If a control port is used without an IP range, replicas per
|
|
|
60de42 |
+ * host must be 1.
|
|
|
60de42 |
+ */
|
|
|
60de42 |
static bool
|
|
|
60de42 |
valid_network(container_variant_data_t *data)
|
|
|
60de42 |
{
|
|
|
60de42 |
@@ -314,7 +326,7 @@ create_remote_resource(
|
|
|
60de42 |
resource_t *parent, container_variant_data_t *data, container_grouping_t *tuple,
|
|
|
60de42 |
pe_working_set_t * data_set)
|
|
|
60de42 |
{
|
|
|
60de42 |
- if(valid_network(data) && tuple->child) {
|
|
|
60de42 |
+ if (tuple->child && valid_network(data)) {
|
|
|
60de42 |
node_t *node = NULL;
|
|
|
60de42 |
xmlNode *xml_obj = NULL;
|
|
|
60de42 |
xmlNode *xml_remote = NULL;
|
|
|
60de42 |
@@ -573,11 +585,8 @@ container_unpack(resource_t * rsc, pe_working_set_t * data_set)
|
|
|
60de42 |
//crm_xml_add(xml_obj, XML_ATTR_ID, container_data->prefix);
|
|
|
60de42 |
add_node_copy(xml_resource, xml_obj);
|
|
|
60de42 |
|
|
|
60de42 |
- /* } else if(xml_obj && container_data->ip_range_start) { */
|
|
|
60de42 |
- /* xml_resource = copy_xml(xml_resource); */
|
|
|
60de42 |
-
|
|
|
60de42 |
} else if(xml_obj) {
|
|
|
60de42 |
- pe_err("Cannot control %s inside container %s without a value for ip-range-start",
|
|
|
60de42 |
+ pe_err("Cannot control %s inside %s without either ip-range-start or control-port",
|
|
|
60de42 |
rsc->id, ID(xml_obj));
|
|
|
60de42 |
return FALSE;
|
|
|
60de42 |
}
|
|
|
60de42 |
--
|
|
|
60de42 |
1.8.3.1
|
|
|
60de42 |
|
|
|
60de42 |
|
|
|
60de42 |
From 88d4114345adf5abacc3bb1fbea3f3d5c28373fd Mon Sep 17 00:00:00 2001
|
|
|
60de42 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
60de42 |
Date: Thu, 23 Mar 2017 17:16:02 -0500
|
|
|
60de42 |
Subject: [PATCH 5/5] Low: liblrmd: remote_proxy_end_session() should be static
|
|
|
60de42 |
|
|
|
60de42 |
Looks like that was intended but got lost in a merge
|
|
|
60de42 |
---
|
|
|
60de42 |
include/crm_internal.h | 1 -
|
|
|
60de42 |
lib/lrmd/proxy_common.c | 2 +-
|
|
|
60de42 |
2 files changed, 1 insertion(+), 2 deletions(-)
|
|
|
60de42 |
|
|
|
60de42 |
diff --git a/include/crm_internal.h b/include/crm_internal.h
|
|
|
60de42 |
index cf0f32d..ab96b8f 100644
|
|
|
60de42 |
--- a/include/crm_internal.h
|
|
|
60de42 |
+++ b/include/crm_internal.h
|
|
|
60de42 |
@@ -384,7 +384,6 @@ int remote_proxy_dispatch(const char *buffer, ssize_t length, gpointer userdata
|
|
|
60de42 |
void remote_proxy_disconnected(gpointer data);
|
|
|
60de42 |
void remote_proxy_free(gpointer data);
|
|
|
60de42 |
|
|
|
60de42 |
-void remote_proxy_end_session(remote_proxy_t *proxy);
|
|
|
60de42 |
void remote_proxy_relay_event(remote_proxy_t *proxy, xmlNode *msg);
|
|
|
60de42 |
void remote_proxy_relay_response(remote_proxy_t *proxy, xmlNode *msg, int msg_id);
|
|
|
60de42 |
|
|
|
60de42 |
diff --git a/lib/lrmd/proxy_common.c b/lib/lrmd/proxy_common.c
|
|
|
60de42 |
index 81796d4..67f310d 100644
|
|
|
60de42 |
--- a/lib/lrmd/proxy_common.c
|
|
|
60de42 |
+++ b/lib/lrmd/proxy_common.c
|
|
|
60de42 |
@@ -100,7 +100,7 @@ remote_proxy_relay_response(remote_proxy_t *proxy, xmlNode *msg, int msg_id)
|
|
|
60de42 |
free_xml(response);
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
-void
|
|
|
60de42 |
+static void
|
|
|
60de42 |
remote_proxy_end_session(remote_proxy_t *proxy)
|
|
|
60de42 |
{
|
|
|
60de42 |
if (proxy == NULL) {
|
|
|
60de42 |
--
|
|
|
60de42 |
1.8.3.1
|
|
|
60de42 |
|