Resolves: rhbz#2158790 rhbz#2159454
- Allow time values in stonith-watchdog-time property - Resource/stonith agent self-validation of instance attributes is now disabled by default, as many agents do not work with it properly. - Updated bundled rubygems: rack, rack-protection, sinatra - Added license for ruby2_keywords
This commit is contained in:
parent
9792d48c7b
commit
fb2ec1b90e
3
.gitignore
vendored
3
.gitignore
vendored
@ -185,3 +185,6 @@
|
||||
/ethon-0.16.0.gem
|
||||
/rack-protection-3.0.4.gem
|
||||
/sinatra-3.0.4.gem
|
||||
/rack-2.2.5.gem
|
||||
/rack-protection-3.0.5.gem
|
||||
/sinatra-3.0.5.gem
|
||||
|
506
bz2158790-01-fix-stonith-watchdog-timeout-validation.patch
Normal file
506
bz2158790-01-fix-stonith-watchdog-timeout-validation.patch
Normal file
@ -0,0 +1,506 @@
|
||||
From 5f6d6e0e9a064e210fa157f3e4a3b8c9b600c49c Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Lisik <mlisik@redhat.com>
|
||||
Date: Thu, 5 Jan 2023 16:21:44 +0100
|
||||
Subject: [PATCH 2/2] Fix stonith-watchdog-timeout validation
|
||||
|
||||
---
|
||||
CHANGELOG.md | 2 +
|
||||
pcs/lib/cluster_property.py | 25 ++++-
|
||||
pcs/lib/sbd.py | 15 ++-
|
||||
.../lib/commands/test_cluster_property.py | 50 ++++++++--
|
||||
pcs_test/tier0/lib/test_cluster_property.py | 98 ++++++++++++++-----
|
||||
pcs_test/tier1/test_cluster_property.py | 14 ++-
|
||||
6 files changed, 159 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/CHANGELOG.md b/CHANGELOG.md
|
||||
index 47212f00..0945d727 100644
|
||||
--- a/CHANGELOG.md
|
||||
+++ b/CHANGELOG.md
|
||||
@@ -11,6 +11,7 @@
|
||||
- Graceful stopping pcsd service using `systemctl stop pcsd` command
|
||||
- Displaying bool and integer values in `pcs resource config` command
|
||||
([rhbz#2151164], [ghissue#604])
|
||||
+- Allow time values in stonith-watchdog-time property ([rhbz#2158790])
|
||||
|
||||
### Changed
|
||||
- Resource/stonith agent self-validation of instance attributes is now
|
||||
@@ -22,6 +23,7 @@
|
||||
[rhbz#2151164]: https://bugzilla.redhat.com/show_bug.cgi?id=2151164
|
||||
[rhbz#2151524]: https://bugzilla.redhat.com/show_bug.cgi?id=2151524
|
||||
[rhbz#2159454]: https://bugzilla.redhat.com/show_bug.cgi?id=2159454
|
||||
+[rhbz#2158790]: https://bugzilla.redhat.com/show_bug.cgi?id=2158790
|
||||
|
||||
|
||||
## [0.11.4] - 2022-11-21
|
||||
diff --git a/pcs/lib/cluster_property.py b/pcs/lib/cluster_property.py
|
||||
index 3bbc093d..d3c8a896 100644
|
||||
--- a/pcs/lib/cluster_property.py
|
||||
+++ b/pcs/lib/cluster_property.py
|
||||
@@ -7,6 +7,7 @@ from lxml.etree import _Element
|
||||
|
||||
from pcs.common import reports
|
||||
from pcs.common.services.interfaces import ServiceManagerInterface
|
||||
+from pcs.common.tools import timeout_to_seconds
|
||||
from pcs.common.types import StringSequence
|
||||
from pcs.lib import (
|
||||
sbd,
|
||||
@@ -37,8 +38,21 @@ def _validate_stonith_watchdog_timeout_property(
|
||||
force: bool = False,
|
||||
) -> reports.ReportItemList:
|
||||
report_list: reports.ReportItemList = []
|
||||
+ original_value = value
|
||||
+ # if value is not empty, try to convert time interval string
|
||||
+ if value:
|
||||
+ seconds = timeout_to_seconds(value)
|
||||
+ if seconds is None:
|
||||
+ # returns empty list because this should be reported by
|
||||
+ # ValueTimeInterval validator
|
||||
+ return report_list
|
||||
+ value = str(seconds)
|
||||
if sbd.is_sbd_enabled(service_manager):
|
||||
- report_list.extend(sbd.validate_stonith_watchdog_timeout(value, force))
|
||||
+ report_list.extend(
|
||||
+ sbd.validate_stonith_watchdog_timeout(
|
||||
+ validate.ValuePair(original_value, value), force
|
||||
+ )
|
||||
+ )
|
||||
else:
|
||||
if value not in ["", "0"]:
|
||||
report_list.append(
|
||||
@@ -123,9 +137,6 @@ def validate_set_cluster_properties(
|
||||
# unknow properties are reported by NamesIn validator
|
||||
continue
|
||||
property_metadata = possible_properties_dict[property_name]
|
||||
- if property_metadata.name == "stonith-watchdog-timeout":
|
||||
- # needs extra validation
|
||||
- continue
|
||||
if property_metadata.type == "boolean":
|
||||
validators.append(
|
||||
validate.ValuePcmkBoolean(
|
||||
@@ -153,9 +164,13 @@ def validate_set_cluster_properties(
|
||||
)
|
||||
)
|
||||
elif property_metadata.type == "time":
|
||||
+ # make stonith-watchdog-timeout value not forcable
|
||||
validators.append(
|
||||
validate.ValueTimeInterval(
|
||||
- property_metadata.name, severity=severity
|
||||
+ property_metadata.name,
|
||||
+ severity=severity
|
||||
+ if property_metadata.name != "stonith-watchdog-timeout"
|
||||
+ else reports.ReportItemSeverity.error(),
|
||||
)
|
||||
)
|
||||
report_list.extend(
|
||||
diff --git a/pcs/lib/sbd.py b/pcs/lib/sbd.py
|
||||
index 1e3cfb37..38cd8767 100644
|
||||
--- a/pcs/lib/sbd.py
|
||||
+++ b/pcs/lib/sbd.py
|
||||
@@ -1,6 +1,9 @@
|
||||
import re
|
||||
from os import path
|
||||
-from typing import Optional
|
||||
+from typing import (
|
||||
+ Optional,
|
||||
+ Union,
|
||||
+)
|
||||
|
||||
from pcs import settings
|
||||
from pcs.common import reports
|
||||
@@ -392,7 +395,10 @@ def _get_local_sbd_watchdog_timeout() -> int:
|
||||
|
||||
|
||||
def validate_stonith_watchdog_timeout(
|
||||
- stonith_watchdog_timeout: str, force: bool = False
|
||||
+ stonith_watchdog_timeout: Union[
|
||||
+ validate.TypeOptionValue, validate.ValuePair
|
||||
+ ],
|
||||
+ force: bool = False,
|
||||
) -> reports.ReportItemList:
|
||||
"""
|
||||
Check sbd status and config when user is setting stonith-watchdog-timeout
|
||||
@@ -401,6 +407,7 @@ def validate_stonith_watchdog_timeout(
|
||||
|
||||
stonith_watchdog_timeout -- value to be validated
|
||||
"""
|
||||
+ stonith_watchdog_timeout = validate.ValuePair.get(stonith_watchdog_timeout)
|
||||
severity = reports.get_severity(reports.codes.FORCE, force)
|
||||
if _is_device_set_local():
|
||||
return (
|
||||
@@ -412,11 +419,11 @@ def validate_stonith_watchdog_timeout(
|
||||
),
|
||||
)
|
||||
]
|
||||
- if stonith_watchdog_timeout not in ["", "0"]
|
||||
+ if stonith_watchdog_timeout.normalized not in ["", "0"]
|
||||
else []
|
||||
)
|
||||
|
||||
- if stonith_watchdog_timeout in ["", "0"]:
|
||||
+ if stonith_watchdog_timeout.normalized in ["", "0"]:
|
||||
return [
|
||||
reports.ReportItem(
|
||||
severity,
|
||||
diff --git a/pcs_test/tier0/lib/commands/test_cluster_property.py b/pcs_test/tier0/lib/commands/test_cluster_property.py
|
||||
index 94c0938a..781222ab 100644
|
||||
--- a/pcs_test/tier0/lib/commands/test_cluster_property.py
|
||||
+++ b/pcs_test/tier0/lib/commands/test_cluster_property.py
|
||||
@@ -120,6 +120,34 @@ class StonithWatchdogTimeoutMixin(LoadMetadataMixin):
|
||||
)
|
||||
self.env_assist.assert_reports([])
|
||||
|
||||
+ def _set_invalid_value(self, forced=False):
|
||||
+ self.config.remove("services.is_enabled")
|
||||
+ self.env_assist.assert_raise_library_error(
|
||||
+ lambda: cluster_property.set_properties(
|
||||
+ self.env_assist.get_env(),
|
||||
+ {"stonith-watchdog-timeout": "15x"},
|
||||
+ [] if not forced else [reports.codes.FORCE],
|
||||
+ )
|
||||
+ )
|
||||
+ self.env_assist.assert_reports(
|
||||
+ [
|
||||
+ fixture.error(
|
||||
+ reports.codes.INVALID_OPTION_VALUE,
|
||||
+ option_name="stonith-watchdog-timeout",
|
||||
+ option_value="15x",
|
||||
+ allowed_values="time interval (e.g. 1, 2s, 3m, 4h, ...)",
|
||||
+ cannot_be_empty=False,
|
||||
+ forbidden_characters=None,
|
||||
+ ),
|
||||
+ ]
|
||||
+ )
|
||||
+
|
||||
+ def test_set_invalid_value(self):
|
||||
+ self._set_invalid_value(forced=False)
|
||||
+
|
||||
+ def test_set_invalid_value_forced(self):
|
||||
+ self._set_invalid_value(forced=True)
|
||||
+
|
||||
|
||||
class TestSetStonithWatchdogTimeoutSBDIsDisabled(
|
||||
StonithWatchdogTimeoutMixin, TestCase
|
||||
@@ -132,6 +160,9 @@ class TestSetStonithWatchdogTimeoutSBDIsDisabled(
|
||||
def test_set_zero(self):
|
||||
self._set_success({"stonith-watchdog-timeout": "0"})
|
||||
|
||||
+ def test_set_zero_time_suffix(self):
|
||||
+ self._set_success({"stonith-watchdog-timeout": "0s"})
|
||||
+
|
||||
def test_set_not_zero_or_empty(self):
|
||||
self.env_assist.assert_raise_library_error(
|
||||
lambda: cluster_property.set_properties(
|
||||
@@ -231,12 +262,12 @@ class TestSetStonithWatchdogTimeoutSBDIsEnabledWatchdogOnly(
|
||||
def test_set_zero_forced(self):
|
||||
self.config.env.push_cib(
|
||||
crm_config=fixture_crm_config_properties(
|
||||
- [("cib-bootstrap-options", {"stonith-watchdog-timeout": "0"})]
|
||||
+ [("cib-bootstrap-options", {"stonith-watchdog-timeout": "0s"})]
|
||||
)
|
||||
)
|
||||
cluster_property.set_properties(
|
||||
self.env_assist.get_env(),
|
||||
- {"stonith-watchdog-timeout": "0"},
|
||||
+ {"stonith-watchdog-timeout": "0s"},
|
||||
[reports.codes.FORCE],
|
||||
)
|
||||
self.env_assist.assert_reports(
|
||||
@@ -271,7 +302,7 @@ class TestSetStonithWatchdogTimeoutSBDIsEnabledWatchdogOnly(
|
||||
self.env_assist.assert_raise_library_error(
|
||||
lambda: cluster_property.set_properties(
|
||||
self.env_assist.get_env(),
|
||||
- {"stonith-watchdog-timeout": "9"},
|
||||
+ {"stonith-watchdog-timeout": "9s"},
|
||||
[],
|
||||
)
|
||||
)
|
||||
@@ -281,7 +312,7 @@ class TestSetStonithWatchdogTimeoutSBDIsEnabledWatchdogOnly(
|
||||
reports.codes.STONITH_WATCHDOG_TIMEOUT_TOO_SMALL,
|
||||
force_code=reports.codes.FORCE,
|
||||
cluster_sbd_watchdog_timeout=10,
|
||||
- entered_watchdog_timeout="9",
|
||||
+ entered_watchdog_timeout="9s",
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -289,12 +320,12 @@ class TestSetStonithWatchdogTimeoutSBDIsEnabledWatchdogOnly(
|
||||
def test_too_small_forced(self):
|
||||
self.config.env.push_cib(
|
||||
crm_config=fixture_crm_config_properties(
|
||||
- [("cib-bootstrap-options", {"stonith-watchdog-timeout": "9"})]
|
||||
+ [("cib-bootstrap-options", {"stonith-watchdog-timeout": "9s"})]
|
||||
)
|
||||
)
|
||||
cluster_property.set_properties(
|
||||
self.env_assist.get_env(),
|
||||
- {"stonith-watchdog-timeout": "9"},
|
||||
+ {"stonith-watchdog-timeout": "9s"},
|
||||
[reports.codes.FORCE],
|
||||
)
|
||||
self.env_assist.assert_reports(
|
||||
@@ -302,13 +333,13 @@ class TestSetStonithWatchdogTimeoutSBDIsEnabledWatchdogOnly(
|
||||
fixture.warn(
|
||||
reports.codes.STONITH_WATCHDOG_TIMEOUT_TOO_SMALL,
|
||||
cluster_sbd_watchdog_timeout=10,
|
||||
- entered_watchdog_timeout="9",
|
||||
+ entered_watchdog_timeout="9s",
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
def test_more_than_timeout(self):
|
||||
- self._set_success({"stonith-watchdog-timeout": "11"})
|
||||
+ self._set_success({"stonith-watchdog-timeout": "11s"})
|
||||
|
||||
|
||||
@mock.patch("pcs.lib.sbd.get_local_sbd_device_list", lambda: ["dev1", "dev2"])
|
||||
@@ -323,6 +354,9 @@ class TestSetStonithWatchdogTimeoutSBDIsEnabledSharedDevices(
|
||||
def test_set_to_zero(self):
|
||||
self._set_success({"stonith-watchdog-timeout": "0"})
|
||||
|
||||
+ def test_set_to_zero_time_suffix(self):
|
||||
+ self._set_success({"stonith-watchdog-timeout": "0min"})
|
||||
+
|
||||
def test_set_not_zero_or_empty(self):
|
||||
self.env_assist.assert_raise_library_error(
|
||||
lambda: cluster_property.set_properties(
|
||||
diff --git a/pcs_test/tier0/lib/test_cluster_property.py b/pcs_test/tier0/lib/test_cluster_property.py
|
||||
index 2feb728d..8d6f90b1 100644
|
||||
--- a/pcs_test/tier0/lib/test_cluster_property.py
|
||||
+++ b/pcs_test/tier0/lib/test_cluster_property.py
|
||||
@@ -83,6 +83,7 @@ FIXTURE_VALID_OPTIONS_DICT = {
|
||||
"integer_param": "10",
|
||||
"percentage_param": "20%",
|
||||
"select_param": "s3",
|
||||
+ "stonith-watchdog-timeout": "0",
|
||||
"time_param": "5min",
|
||||
}
|
||||
|
||||
@@ -96,6 +97,8 @@ FIXTURE_INVALID_OPTIONS_DICT = {
|
||||
"have-watchdog": "100",
|
||||
}
|
||||
|
||||
+STONITH_WATCHDOG_TIMEOUT_UNSET_VALUES = ["", "0", "0s"]
|
||||
+
|
||||
|
||||
def _fixture_parameter(name, param_type, default, enum_values):
|
||||
return ResourceAgentParameter(
|
||||
@@ -239,6 +242,7 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
sbd_enabled=False,
|
||||
sbd_devices=False,
|
||||
force=False,
|
||||
+ valid_value=True,
|
||||
):
|
||||
self.mock_is_sbd_enabled.return_value = sbd_enabled
|
||||
self.mock_sbd_devices.return_value = ["devices"] if sbd_devices else []
|
||||
@@ -254,9 +258,13 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
),
|
||||
expected_report_list,
|
||||
)
|
||||
- if "stonith-watchdog-timeout" in new_properties and (
|
||||
- new_properties["stonith-watchdog-timeout"]
|
||||
- or "stonith-watchdog-timeout" in configured_properties
|
||||
+ if (
|
||||
+ "stonith-watchdog-timeout" in new_properties
|
||||
+ and (
|
||||
+ new_properties["stonith-watchdog-timeout"]
|
||||
+ or "stonith-watchdog-timeout" in configured_properties
|
||||
+ )
|
||||
+ and valid_value
|
||||
):
|
||||
self.mock_is_sbd_enabled.assert_called_once_with(
|
||||
self.mock_service_manager
|
||||
@@ -266,7 +274,10 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
if sbd_devices:
|
||||
self.mock_sbd_timeout.assert_not_called()
|
||||
else:
|
||||
- if new_properties["stonith-watchdog-timeout"] in ["", "0"]:
|
||||
+ if (
|
||||
+ new_properties["stonith-watchdog-timeout"]
|
||||
+ in STONITH_WATCHDOG_TIMEOUT_UNSET_VALUES
|
||||
+ ):
|
||||
self.mock_sbd_timeout.assert_not_called()
|
||||
else:
|
||||
self.mock_sbd_timeout.assert_called_once_with()
|
||||
@@ -280,6 +291,8 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
self.mock_sbd_timeout.assert_not_called()
|
||||
|
||||
self.mock_is_sbd_enabled.reset_mock()
|
||||
+ self.mock_sbd_devices.reset_mock()
|
||||
+ self.mock_sbd_timeout.reset_mock()
|
||||
|
||||
def test_no_properties_to_set_or_unset(self):
|
||||
self.assert_validate_set(
|
||||
@@ -328,7 +341,7 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
)
|
||||
|
||||
def test_unset_stonith_watchdog_timeout_sbd_disabled(self):
|
||||
- for value in ["0", ""]:
|
||||
+ for value in STONITH_WATCHDOG_TIMEOUT_UNSET_VALUES:
|
||||
with self.subTest(value=value):
|
||||
self.assert_validate_set(
|
||||
["stonith-watchdog-timeout"],
|
||||
@@ -349,22 +362,27 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
)
|
||||
|
||||
def test_set_ok_stonith_watchdog_timeout_sbd_enabled_without_devices(self):
|
||||
- self.assert_validate_set(
|
||||
- [], {"stonith-watchdog-timeout": "15"}, [], sbd_enabled=True
|
||||
- )
|
||||
+ for value in ["15", "15s"]:
|
||||
+ with self.subTest(value=value):
|
||||
+ self.assert_validate_set(
|
||||
+ [],
|
||||
+ {"stonith-watchdog-timeout": value},
|
||||
+ [],
|
||||
+ sbd_enabled=True,
|
||||
+ )
|
||||
|
||||
def test_set_small_stonith_watchdog_timeout_sbd_enabled_without_devices(
|
||||
self,
|
||||
):
|
||||
self.assert_validate_set(
|
||||
[],
|
||||
- {"stonith-watchdog-timeout": "9"},
|
||||
+ {"stonith-watchdog-timeout": "9s"},
|
||||
[
|
||||
fixture.error(
|
||||
reports.codes.STONITH_WATCHDOG_TIMEOUT_TOO_SMALL,
|
||||
force_code=reports.codes.FORCE,
|
||||
cluster_sbd_watchdog_timeout=10,
|
||||
- entered_watchdog_timeout="9",
|
||||
+ entered_watchdog_timeout="9s",
|
||||
)
|
||||
],
|
||||
sbd_enabled=True,
|
||||
@@ -387,28 +405,54 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
force=True,
|
||||
)
|
||||
|
||||
- def test_set_not_a_number_stonith_watchdog_timeout_sbd_enabled_without_devices(
|
||||
+ def _set_invalid_value_stonith_watchdog_timeout(
|
||||
+ self, sbd_enabled=False, sbd_devices=False
|
||||
+ ):
|
||||
+ for value in ["invalid", "10x"]:
|
||||
+ with self.subTest(value=value):
|
||||
+ self.assert_validate_set(
|
||||
+ [],
|
||||
+ {"stonith-watchdog-timeout": value},
|
||||
+ [
|
||||
+ fixture.error(
|
||||
+ reports.codes.INVALID_OPTION_VALUE,
|
||||
+ option_name="stonith-watchdog-timeout",
|
||||
+ option_value=value,
|
||||
+ allowed_values="time interval (e.g. 1, 2s, 3m, 4h, ...)",
|
||||
+ cannot_be_empty=False,
|
||||
+ forbidden_characters=None,
|
||||
+ )
|
||||
+ ],
|
||||
+ sbd_enabled=sbd_enabled,
|
||||
+ sbd_devices=sbd_devices,
|
||||
+ valid_value=False,
|
||||
+ )
|
||||
+
|
||||
+ def test_set_invalid_value_stonith_watchdog_timeout_sbd_enabled_without_devices(
|
||||
self,
|
||||
):
|
||||
+ self._set_invalid_value_stonith_watchdog_timeout(
|
||||
+ sbd_enabled=True, sbd_devices=False
|
||||
+ )
|
||||
|
||||
- self.assert_validate_set(
|
||||
- [],
|
||||
- {"stonith-watchdog-timeout": "invalid"},
|
||||
- [
|
||||
- fixture.error(
|
||||
- reports.codes.STONITH_WATCHDOG_TIMEOUT_TOO_SMALL,
|
||||
- force_code=reports.codes.FORCE,
|
||||
- cluster_sbd_watchdog_timeout=10,
|
||||
- entered_watchdog_timeout="invalid",
|
||||
- )
|
||||
- ],
|
||||
- sbd_enabled=True,
|
||||
+ def test_set_invalid_value_stonith_watchdog_timeout_sbd_enabled_with_devices(
|
||||
+ self,
|
||||
+ ):
|
||||
+ self._set_invalid_value_stonith_watchdog_timeout(
|
||||
+ sbd_enabled=True, sbd_devices=True
|
||||
+ )
|
||||
+
|
||||
+ def test_set_invalid_value_stonith_watchdog_timeout_sbd_disabled(
|
||||
+ self,
|
||||
+ ):
|
||||
+ self._set_invalid_value_stonith_watchdog_timeout(
|
||||
+ sbd_enabled=False, sbd_devices=False
|
||||
)
|
||||
|
||||
def test_unset_stonith_watchdog_timeout_sbd_enabled_without_devices(
|
||||
self,
|
||||
):
|
||||
- for value in ["0", ""]:
|
||||
+ for value in STONITH_WATCHDOG_TIMEOUT_UNSET_VALUES:
|
||||
with self.subTest(value=value):
|
||||
self.assert_validate_set(
|
||||
["stonith-watchdog-timeout"],
|
||||
@@ -426,7 +470,7 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
def test_unset_stonith_watchdog_timeout_sbd_enabled_without_devices_forced(
|
||||
self,
|
||||
):
|
||||
- for value in ["0", ""]:
|
||||
+ for value in STONITH_WATCHDOG_TIMEOUT_UNSET_VALUES:
|
||||
with self.subTest(value=value):
|
||||
self.assert_validate_set(
|
||||
["stonith-watchdog-timeout"],
|
||||
@@ -459,7 +503,7 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
def test_set_stonith_watchdog_timeout_sbd_enabled_with_devices_forced(self):
|
||||
self.assert_validate_set(
|
||||
[],
|
||||
- {"stonith-watchdog-timeout": 15},
|
||||
+ {"stonith-watchdog-timeout": "15s"},
|
||||
[
|
||||
fixture.warn(
|
||||
reports.codes.STONITH_WATCHDOG_TIMEOUT_CANNOT_BE_SET,
|
||||
@@ -472,7 +516,7 @@ class TestValidateSetClusterProperties(TestCase):
|
||||
)
|
||||
|
||||
def test_unset_stonith_watchdog_timeout_sbd_enabled_with_devices(self):
|
||||
- for value in ["0", ""]:
|
||||
+ for value in STONITH_WATCHDOG_TIMEOUT_UNSET_VALUES:
|
||||
with self.subTest(value=value):
|
||||
self.assert_validate_set(
|
||||
["stonith-watchdog-timeout"],
|
||||
diff --git a/pcs_test/tier1/test_cluster_property.py b/pcs_test/tier1/test_cluster_property.py
|
||||
index 39d70b9d..cb2d8f5c 100644
|
||||
--- a/pcs_test/tier1/test_cluster_property.py
|
||||
+++ b/pcs_test/tier1/test_cluster_property.py
|
||||
@@ -169,7 +169,7 @@ class TestPropertySet(PropertyMixin, TestCase):
|
||||
|
||||
def test_set_stonith_watchdog_timeout(self):
|
||||
self.assert_pcs_fail(
|
||||
- "property set stonith-watchdog-timeout=5".split(),
|
||||
+ "property set stonith-watchdog-timeout=5s".split(),
|
||||
stderr_full=(
|
||||
"Error: stonith-watchdog-timeout can only be unset or set to 0 "
|
||||
"while SBD is disabled\n"
|
||||
@@ -179,6 +179,18 @@ class TestPropertySet(PropertyMixin, TestCase):
|
||||
)
|
||||
self.assert_resources_xml_in_cib(UNCHANGED_CRM_CONFIG)
|
||||
|
||||
+ def test_set_stonith_watchdog_timeout_invalid_value(self):
|
||||
+ self.assert_pcs_fail(
|
||||
+ "property set stonith-watchdog-timeout=5x".split(),
|
||||
+ stderr_full=(
|
||||
+ "Error: '5x' is not a valid stonith-watchdog-timeout value, use"
|
||||
+ " time interval (e.g. 1, 2s, 3m, 4h, ...)\n"
|
||||
+ "Error: Errors have occurred, therefore pcs is unable to "
|
||||
+ "continue\n"
|
||||
+ ),
|
||||
+ )
|
||||
+ self.assert_resources_xml_in_cib(UNCHANGED_CRM_CONFIG)
|
||||
+
|
||||
|
||||
class TestPropertyUnset(PropertyMixin, TestCase):
|
||||
def test_success(self):
|
||||
--
|
||||
2.39.0
|
||||
|
1471
bz2159454-01-add-agent-validation-option.patch
Normal file
1471
bz2159454-01-add-agent-validation-option.patch
Normal file
File diff suppressed because it is too large
Load Diff
23
pcs.spec
23
pcs.spec
@ -1,6 +1,6 @@
|
||||
Name: pcs
|
||||
Version: 0.11.4
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
|
||||
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
||||
# GPL-2.0-only: pcs
|
||||
@ -40,11 +40,11 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
|
||||
%global version_rubygem_eventmachine 1.2.7
|
||||
%global version_rubygem_ffi 1.15.5
|
||||
%global version_rubygem_mustermann 3.0.0
|
||||
%global version_rubygem_rack 2.2.4
|
||||
%global version_rubygem_rack_protection 3.0.4
|
||||
%global version_rubygem_rack 2.2.5
|
||||
%global version_rubygem_rack_protection 3.0.5
|
||||
%global version_rubygem_rack_test 2.0.2
|
||||
%global version_rubygem_ruby2_keywords 0.0.5
|
||||
%global version_rubygem_sinatra 3.0.4
|
||||
%global version_rubygem_sinatra 3.0.5
|
||||
%global version_rubygem_thin 1.8.1
|
||||
%global version_rubygem_tilt 2.0.11
|
||||
%global version_rubygem_webrick 1.7.0
|
||||
@ -112,6 +112,8 @@ Patch3: 01-smoke-test-fix.patch
|
||||
Patch4: 02-smoke-test-fix.patch
|
||||
Patch5: bz2151524-01-add-warning-when-updating-a-misconfigured-resource.patch
|
||||
Patch6: bz2151164-01-fix-displaying-bool-and-integer-values.patch
|
||||
Patch7: bz2159454-01-add-agent-validation-option.patch
|
||||
Patch8: bz2158790-01-fix-stonith-watchdog-timeout-validation.patch
|
||||
|
||||
# ui patches: >200
|
||||
# Patch201: bzNUMBER-01-name.patch
|
||||
@ -301,6 +303,8 @@ update_times_patch %{PATCH3}
|
||||
update_times_patch %{PATCH4}
|
||||
update_times_patch %{PATCH5}
|
||||
update_times_patch %{PATCH6}
|
||||
update_times_patch %{PATCH7}
|
||||
update_times_patch %{PATCH8}
|
||||
|
||||
# prepare dirs/files necessary for building all bundles
|
||||
# -----------------------------------------------------
|
||||
@ -354,7 +358,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/%{pcsd_public_dir}/images/
|
||||
ln -fs /etc/favicon.png ${RPM_BUILD_ROOT}%{_libdir}/%{pcsd_public_dir}/images/favicon.png
|
||||
|
||||
# prepare license files
|
||||
# some rubygems do not have a license file (ruby2_keywords, thin)
|
||||
# some rubygems do not have a license file (thin)
|
||||
mv %{rubygem_bundle_dir}/gems/backports-%{version_rubygem_backports}/LICENSE.txt backports_LICENSE.txt
|
||||
mv %{rubygem_bundle_dir}/gems/daemons-%{version_rubygem_daemons}/LICENSE daemons_LICENSE
|
||||
mv %{rubygem_bundle_dir}/gems/ethon-%{version_rubygem_ethon}/LICENSE ethon_LICENSE
|
||||
@ -368,6 +372,7 @@ mv %{rubygem_bundle_dir}/gems/childprocess-%{version_rubygem_childprocess}/LICEN
|
||||
mv %{rubygem_bundle_dir}/gems/rack-%{version_rubygem_rack}/MIT-LICENSE rack_MIT-LICENSE
|
||||
mv %{rubygem_bundle_dir}/gems/rack-protection-%{version_rubygem_rack_protection}/License rack-protection_License
|
||||
mv %{rubygem_bundle_dir}/gems/rack-test-%{version_rubygem_rack_test}/MIT-LICENSE.txt rack-test_MIT-LICENSE.txt
|
||||
mv %{rubygem_bundle_dir}/gems/ruby2_keywords-%{version_rubygem_ruby2_keywords}/LICENSE ruby2_keywords_LICENSE
|
||||
mv %{rubygem_bundle_dir}/gems/sinatra-%{version_rubygem_sinatra}/LICENSE sinatra_LICENSE
|
||||
mv %{rubygem_bundle_dir}/gems/tilt-%{version_rubygem_tilt}/COPYING tilt_COPYING
|
||||
mv %{rubygem_bundle_dir}/gems/webrick-%{version_rubygem_webrick}/LICENSE.txt webrick_LICENSE.txt
|
||||
@ -490,6 +495,7 @@ run_all_tests
|
||||
%license rack_MIT-LICENSE
|
||||
%license rack-protection_License
|
||||
%license rack-test_MIT-LICENSE.txt
|
||||
%license ruby2_keywords_LICENSE
|
||||
%license sinatra_LICENSE
|
||||
%license tilt_COPYING
|
||||
%license webrick_LICENSE.txt
|
||||
@ -533,6 +539,13 @@ run_all_tests
|
||||
%license pyagentx_LICENSE.txt
|
||||
|
||||
%changelog
|
||||
* Thu Jan 12 2023 Michal Pospisil <mpospisi@redhat.com> - 0.11.4-3
|
||||
- Allow time values in stonith-watchdog-time property
|
||||
- Resource/stonith agent self-validation of instance attributes is now disabled by default, as many agents do not work with it properly.
|
||||
- Updated bundled rubygems: rack, rack-protection, sinatra
|
||||
- Added license for ruby2_keywords
|
||||
- Resolves: rhbz#2158790 rhbz#2159454
|
||||
|
||||
* Wed Dec 14 2022 Michal Pospisil <mpospisi@redhat.com> - 0.11.4-2
|
||||
- Fixed stopping of pcsd service using systemctl stop pcsd command
|
||||
- Fixed smoke test execution during gating
|
||||
|
6
sources
6
sources
@ -6,7 +6,6 @@ SHA512 (daemons-1.4.1.gem) = c057a7cbafc16f9daa073ce9fd5680f5f978826554073f4e77f
|
||||
SHA512 (ffi-1.15.5.gem) = 074df34edffc7038ab08199350a97b32280d61ea15dd85d459b008bd3363ec5403b4e533621c8e460e5288f01fec944bff9b149851b819e85bab75ad2362227c
|
||||
SHA512 (ruby2_keywords-0.0.5.gem) = f6b9078b111e68c0017e0025ecdccb976c7a32f35c1a8adf9fd879db0c91f89eb9bd799f9527a846e28056f2a5fbf0f3610cda9538570288c493613c35c83a6f
|
||||
SHA512 (thin-1.8.1.gem) = c200ea03b7876b2a17b5875557fa967b8d01db20cc401811f314f3285f8249b8793e4709b7bc033a9c5813b9a51e3093c55f717b4a98b8fda171aa82813b7419
|
||||
SHA512 (rack-2.2.4.gem) = 7e7cd4f0e44e0cd7d26f35ca946a2b6fcee8ad73425583694a7ea9662816b39681325879ad84a2c0d31dbcc2ded1165b0a37d9278bf3d0b0f2bc4615b66b1ca2
|
||||
SHA512 (childprocess-4.1.0.gem) = e635c3acfa5ad85891c3879f240c7e96d47d7d5ec3f472f4ce6661552b0fb7bd72c5e3b9fb73f4f9312b749fbe554b4be388e56a31a3c63c39743d055d774def
|
||||
SHA512 (mustermann-3.0.0.gem) = c33d41281fe2ac80c0af0c5c31dbab2068c73b9da19a4b82b387bbe551019fc115675634d932a8e56b070c3a06a85d830c982a103e6c5193aff8647f599be6e3
|
||||
SHA512 (tilt-2.0.11.gem) = 757a292b05b3ddb2cb8de7680f09433cec85b433e03cd9f738534b99c836fb2129870003a9376c24b6a2f6acb732b51b27968cc0e197a832130d4a35b8dc8239
|
||||
@ -17,5 +16,6 @@ SHA512 (webrick-1.7.0.gem) = 5f242b50300046fe7c22ecd1640a73e5815e05a72bedfebe6bc
|
||||
SHA512 (pcs-web-ui-0.1.16.tar.gz) = d0451df5fe8d1c3bd14df807f3eeae2e617c7498f52d3db67187553585fa019ba7fe7304e670f430943619f9bdca6b7c0f220d94c3b2423d8e75a1a374cde88c
|
||||
SHA512 (pcs-0.11.4.tar.gz) = df5b7caab7c218676c92db7d8cb24135b3cee1b0aa947851f08659222d7be501e205438e49695339fbad8b14b5637d9cf790e14c9ccc5151e188345924dc0153
|
||||
SHA512 (ethon-0.16.0.gem) = 3b31affcee0d5a5be05b5497d4a8d13515f8393f54579a3a9c8de49f78d3f065bb92659434b023f0a8bf8e0cccfbc94b617695b93c4d3f744cccd1eff2e68905
|
||||
SHA512 (rack-protection-3.0.4.gem) = b898c66dcac38219c43b1a6ce3a2952ca35e44f81b604f00dbff43938b5493df4c9a654ae221f01675f8f4b8aaf90f31b435a648f46f70789ac78a0c4a0c4f12
|
||||
SHA512 (sinatra-3.0.4.gem) = c0f5d7937cb0d513cafe8c87bccfc597088e93b005b85dd4e1f09f0eae1ef22ca1d6a4378a9d471c7115f91a8d91d8b843475a1fc5695e331013cd5f68b0cb18
|
||||
SHA512 (rack-2.2.5.gem) = 0e34c8daecd453264fe794c4c16978e8b5b522f41cd134171c79c042ff79d4da59203f69aa5dd62039ef1a62822c069ace4153a82215fed9e4ad8999a8f1d634
|
||||
SHA512 (rack-protection-3.0.5.gem) = 4ed0ee9e8fe08532ff7f2905251af110f3fff0e419da5be50ae3e5a90906e43c39cf8edc219fcfe3e27a72591500c040afcc9552da875773375b170fb91aa9ff
|
||||
SHA512 (sinatra-3.0.5.gem) = 047969c56a2a601408a0b27cea9d3e1b7941fdda87ae05ad271be0be07b05f6597433f5fce36325720913bfeb12a3bd1568831a8898d8bff87e5e36d0b8766a6
|
||||
|
Loading…
Reference in New Issue
Block a user