import pcs-0.11.3-4.el9_1.1
This commit is contained in:
parent
3ab104fd63
commit
86d8a471df
@ -0,0 +1,128 @@
|
||||
From c0fc2b9e23fef4b07bea77e2b3caeea9f9bb6c8c Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Mular <omular@redhat.com>
|
||||
Date: Wed, 7 Dec 2022 15:53:25 +0100
|
||||
Subject: [PATCH] fix displaying bool and integer values in `pcs resource
|
||||
config` command
|
||||
|
||||
---
|
||||
pcs/cli/resource/output.py | 18 +++++++++---------
|
||||
pcs_test/resources/cib-resources.xml | 2 +-
|
||||
pcs_test/tier1/legacy/test_resource.py | 3 ++-
|
||||
pcs_test/tools/resources_dto.py | 4 ++--
|
||||
4 files changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/pcs/cli/resource/output.py b/pcs/cli/resource/output.py
|
||||
index 6dab4a1c..84363331 100644
|
||||
--- a/pcs/cli/resource/output.py
|
||||
+++ b/pcs/cli/resource/output.py
|
||||
@@ -69,9 +69,9 @@ def _resource_operation_to_pairs(
|
||||
pairs.append(("interval-origin", operation_dto.interval_origin))
|
||||
if operation_dto.timeout:
|
||||
pairs.append(("timeout", operation_dto.timeout))
|
||||
- if operation_dto.enabled:
|
||||
+ if operation_dto.enabled is not None:
|
||||
pairs.append(("enabled", _bool_to_cli_value(operation_dto.enabled)))
|
||||
- if operation_dto.record_pending:
|
||||
+ if operation_dto.record_pending is not None:
|
||||
pairs.append(
|
||||
("record-pending", _bool_to_cli_value(operation_dto.record_pending))
|
||||
)
|
||||
@@ -474,13 +474,13 @@ def _resource_bundle_container_options_to_pairs(
|
||||
options: CibResourceBundleContainerRuntimeOptionsDto,
|
||||
) -> List[Tuple[str, str]]:
|
||||
option_list = [("image", options.image)]
|
||||
- if options.replicas:
|
||||
+ if options.replicas is not None:
|
||||
option_list.append(("replicas", str(options.replicas)))
|
||||
- if options.replicas_per_host:
|
||||
+ if options.replicas_per_host is not None:
|
||||
option_list.append(
|
||||
("replicas-per-host", str(options.replicas_per_host))
|
||||
)
|
||||
- if options.promoted_max:
|
||||
+ if options.promoted_max is not None:
|
||||
option_list.append(("promoted-max", str(options.promoted_max)))
|
||||
if options.run_command:
|
||||
option_list.append(("run-command", options.run_command))
|
||||
@@ -505,7 +505,7 @@ def _resource_bundle_network_options_to_pairs(
|
||||
network_options.append(
|
||||
("ip-range-start", bundle_network_dto.ip_range_start)
|
||||
)
|
||||
- if bundle_network_dto.control_port:
|
||||
+ if bundle_network_dto.control_port is not None:
|
||||
network_options.append(
|
||||
("control-port", str(bundle_network_dto.control_port))
|
||||
)
|
||||
@@ -513,7 +513,7 @@ def _resource_bundle_network_options_to_pairs(
|
||||
network_options.append(
|
||||
("host-interface", bundle_network_dto.host_interface)
|
||||
)
|
||||
- if bundle_network_dto.host_netmask:
|
||||
+ if bundle_network_dto.host_netmask is not None:
|
||||
network_options.append(
|
||||
("host-netmask", str(bundle_network_dto.host_netmask))
|
||||
)
|
||||
@@ -528,9 +528,9 @@ def _resource_bundle_port_mapping_to_pairs(
|
||||
bundle_net_port_mapping_dto: CibResourceBundlePortMappingDto,
|
||||
) -> List[Tuple[str, str]]:
|
||||
mapping = []
|
||||
- if bundle_net_port_mapping_dto.port:
|
||||
+ if bundle_net_port_mapping_dto.port is not None:
|
||||
mapping.append(("port", str(bundle_net_port_mapping_dto.port)))
|
||||
- if bundle_net_port_mapping_dto.internal_port:
|
||||
+ if bundle_net_port_mapping_dto.internal_port is not None:
|
||||
mapping.append(
|
||||
("internal-port", str(bundle_net_port_mapping_dto.internal_port))
|
||||
)
|
||||
diff --git a/pcs_test/resources/cib-resources.xml b/pcs_test/resources/cib-resources.xml
|
||||
index 67cf5178..524b8fbb 100644
|
||||
--- a/pcs_test/resources/cib-resources.xml
|
||||
+++ b/pcs_test/resources/cib-resources.xml
|
||||
@@ -53,7 +53,7 @@
|
||||
</instance_attributes>
|
||||
</op>
|
||||
<op name="migrate_from" timeout="20s" interval="0s" id="R7-migrate_from-interval-0s"/>
|
||||
- <op name="migrate_to" timeout="20s" interval="0s" id="R7-migrate_to-interval-0s"/>
|
||||
+ <op name="migrate_to" timeout="20s" interval="0s" id="R7-migrate_to-interval-0s" enabled="false" record-pending="false"/>
|
||||
<op name="monitor" timeout="20s" interval="10s" id="R7-monitor-interval-10s"/>
|
||||
<op name="reload" timeout="20s" interval="0s" id="R7-reload-interval-0s"/>
|
||||
<op name="reload-agent" timeout="20s" interval="0s" id="R7-reload-agent-interval-0s"/>
|
||||
diff --git a/pcs_test/tier1/legacy/test_resource.py b/pcs_test/tier1/legacy/test_resource.py
|
||||
index 049c63f6..4ae0a5e9 100644
|
||||
--- a/pcs_test/tier1/legacy/test_resource.py
|
||||
+++ b/pcs_test/tier1/legacy/test_resource.py
|
||||
@@ -757,7 +757,7 @@ Error: moni=tor does not appear to be a valid operation action
|
||||
|
||||
o, r = pcs(
|
||||
self.temp_cib.name,
|
||||
- "resource create --no-default-ops OPTest ocf:heartbeat:Dummy op monitor interval=30s OCF_CHECK_LEVEL=1 op monitor interval=25s OCF_CHECK_LEVEL=1".split(),
|
||||
+ "resource create --no-default-ops OPTest ocf:heartbeat:Dummy op monitor interval=30s OCF_CHECK_LEVEL=1 op monitor interval=25s OCF_CHECK_LEVEL=1 enabled=0".split(),
|
||||
)
|
||||
ac(o, "")
|
||||
assert r == 0
|
||||
@@ -774,6 +774,7 @@ Error: moni=tor does not appear to be a valid operation action
|
||||
OCF_CHECK_LEVEL=1
|
||||
monitor: OPTest-monitor-interval-25s
|
||||
interval=25s
|
||||
+ enabled=0
|
||||
OCF_CHECK_LEVEL=1
|
||||
"""
|
||||
),
|
||||
diff --git a/pcs_test/tools/resources_dto.py b/pcs_test/tools/resources_dto.py
|
||||
index 8f46f6dd..a980ec80 100644
|
||||
--- a/pcs_test/tools/resources_dto.py
|
||||
+++ b/pcs_test/tools/resources_dto.py
|
||||
@@ -233,8 +233,8 @@ PRIMITIVE_R7 = CibResourcePrimitiveDto(
|
||||
start_delay=None,
|
||||
interval_origin=None,
|
||||
timeout="20s",
|
||||
- enabled=None,
|
||||
- record_pending=None,
|
||||
+ enabled=False,
|
||||
+ record_pending=False,
|
||||
role=None,
|
||||
on_fail=None,
|
||||
meta_attributes=[],
|
||||
--
|
||||
2.38.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: pcs
|
||||
Version: 0.11.3
|
||||
Release: 4%{?dist}
|
||||
Release: 4%{?dist}.1
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
|
||||
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
||||
# GPLv2: pcs
|
||||
@ -115,6 +115,7 @@ Patch3: bz2058243-01-code-formatting.patch
|
||||
Patch4: bz2058243-02-make-booth-ticket-mode-value-case-insensitive.patch
|
||||
Patch5: bz2026725-01-booth-sync-check-whether-etc-booth-exists.patch
|
||||
Patch6: bz2116841-01-fix-ruby-socket-permissions.patch
|
||||
Patch7: bz2151575-01-fix-displaying-bool-and-integer-values.patch
|
||||
|
||||
# ui patches: >200
|
||||
# Patch201: bzNUMBER-01-name.patch
|
||||
@ -304,6 +305,7 @@ update_times_patch %{PATCH3}
|
||||
update_times_patch %{PATCH4}
|
||||
update_times_patch %{PATCH5}
|
||||
update_times_patch %{PATCH6}
|
||||
update_times_patch %{PATCH7}
|
||||
|
||||
# prepare dirs/files necessary for building all bundles
|
||||
# -----------------------------------------------------
|
||||
@ -541,6 +543,10 @@ run_all_tests
|
||||
%license pyagentx_LICENSE.txt
|
||||
|
||||
%changelog
|
||||
* Mon Dec 19 2022 Michal Pospisil <mpospisi@redhat.com> - 0.11.3-4.el9_1.1
|
||||
- Fixed displaying of bool and integer values in `pcs resource config` command
|
||||
- Resolves: rhbz#2151575
|
||||
|
||||
* Mon Sep 05 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-4
|
||||
- Fixed ruby socket permissions
|
||||
- Resolves: rhbz#2116841
|
||||
|
Loading…
Reference in New Issue
Block a user