import pcs-0.10.14-6.el8

This commit is contained in:
CentOS Sources 2022-11-18 04:11:59 +00:00 committed by Stepan Oksanichenko
parent 5b28c9c7eb
commit 00b6d9e040
10 changed files with 33 additions and 2802 deletions

14
.gitignore vendored
View File

@ -7,19 +7,19 @@ SOURCES/ethon-0.15.0.gem
SOURCES/eventmachine-1.2.7.gem
SOURCES/ffi-1.15.5.gem
SOURCES/json-2.6.2.gem
SOURCES/mustermann-1.1.1.gem
SOURCES/mustermann-2.0.2.gem
SOURCES/open4-1.3.4-1.gem
SOURCES/pcs-0.10.14.tar.gz
SOURCES/pcs-0.10.14.27-cb2fb.tar.gz
SOURCES/pcs-web-ui-0.1.13.tar.gz
SOURCES/pcs-web-ui-node-modules-0.1.13.tar.xz
SOURCES/pyagentx-0.4.pcs.2.tar.gz
SOURCES/python-dateutil-2.8.1.tar.gz
SOURCES/rack-2.2.3.1.gem
SOURCES/rack-protection-2.2.0.gem
SOURCES/rack-test-1.1.0.gem
SOURCES/rack-2.2.4.gem
SOURCES/rack-protection-2.2.2.gem
SOURCES/rack-test-2.0.2.gem
SOURCES/rexml-3.2.5.gem
SOURCES/ruby2_keywords-0.0.5.gem
SOURCES/sinatra-2.2.0.gem
SOURCES/sinatra-2.2.2.gem
SOURCES/thin-1.8.1.gem
SOURCES/tilt-2.0.10.gem
SOURCES/tilt-2.0.11.gem
SOURCES/tornado-6.1.0.tar.gz

View File

@ -7,19 +7,19 @@
7a5b2896e210fac9759c786ee4510f265f75b481 SOURCES/eventmachine-1.2.7.gem
97632b7975067266c0b39596de0a4c86d9330658 SOURCES/ffi-1.15.5.gem
86c10824191e8f351da3fe0a0b6db94a813ada3a SOURCES/json-2.6.2.gem
50a4e37904485810cb05e27d75c9783e5a8f3402 SOURCES/mustermann-1.1.1.gem
f5f804366823c1126791dfefd98dd0539563785c SOURCES/mustermann-2.0.2.gem
41a7fe9f8e3e02da5ae76c821b89c5b376a97746 SOURCES/open4-1.3.4-1.gem
825eab03553c98465e1de265c151ece149ddba04 SOURCES/pcs-0.10.14.tar.gz
bb87f540c48b929b4ebd7a7ed75d0dce1264f15d SOURCES/pcs-0.10.14.27-cb2fb.tar.gz
f7455776936492ce7b241f9801d6bbc946b0461a SOURCES/pcs-web-ui-0.1.13.tar.gz
bd18d97d611233914828719c97b4d98d079913d2 SOURCES/pcs-web-ui-node-modules-0.1.13.tar.xz
3176b2f2b332c2b6bf79fe882e83feecf3d3f011 SOURCES/pyagentx-0.4.pcs.2.tar.gz
bd26127e57f83a10f656b62c46524c15aeb844dd SOURCES/python-dateutil-2.8.1.tar.gz
be609467c819d263c138c417548431b81f8da216 SOURCES/rack-2.2.3.1.gem
21cfac2453436c6856da31e741bbfa59da4973e1 SOURCES/rack-protection-2.2.0.gem
b80bc5ca38a885e747271675ba91dd3d02136bf1 SOURCES/rack-test-1.1.0.gem
d884e586767313f8fcf8c863b5220831a95fccb8 SOURCES/rack-2.2.4.gem
4bebd27a0af0a30dbeba4c5a1b82e05f3418f6be SOURCES/rack-protection-2.2.2.gem
3c669527ecbcb9f915a83983ec89320c356e1fe3 SOURCES/rack-test-2.0.2.gem
e7f48fa5fb2d92e6cb21d6b1638fe41a5a7c4287 SOURCES/rexml-3.2.5.gem
d017b9e4d1978e0b3ccc3e2a31493809e4693cd3 SOURCES/ruby2_keywords-0.0.5.gem
5f0d7e63f9d8683f39ad23afe7e00b99602b87cc SOURCES/sinatra-2.2.0.gem
f4603e0742a3849cc9caf2d83f1112a91076bbbb SOURCES/sinatra-2.2.2.gem
1ac6292a98e17247b7bb847a35ff868605256f7b SOURCES/thin-1.8.1.gem
d265c822a6b228392d899e9eb5114613d65e6967 SOURCES/tilt-2.0.10.gem
360d77c80d2851a538fb13d43751093115c34712 SOURCES/tilt-2.0.11.gem
c23c617c7a0205e465bebad5b8cdf289ae8402a2 SOURCES/tornado-6.1.0.tar.gz

File diff suppressed because it is too large Load Diff

View File

@ -1,126 +0,0 @@
From d6258ba9643b4d7528ceff65d433024104942a4c Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 14 Jul 2022 16:46:05 +0200
Subject: [PATCH 2/4] make booth ticket mode value case insensitive
---
pcs/lib/booth/config_validators.py | 10 ++++++++
pcs/lib/commands/booth.py | 14 +++++++++---
pcs_test/tier0/lib/commands/test_booth.py | 28 ++++++++++++++++-------
3 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/pcs/lib/booth/config_validators.py b/pcs/lib/booth/config_validators.py
index 99badc46..6c4a4ddc 100644
--- a/pcs/lib/booth/config_validators.py
+++ b/pcs/lib/booth/config_validators.py
@@ -100,6 +100,16 @@ def remove_ticket(conf_facade, ticket_name):
return []
+def ticket_options_normalization() -> validate.TypeNormalizeFunc:
+ return validate.option_value_normalization(
+ {
+ "mode": (
+ lambda value: value.lower() if isinstance(value, str) else value
+ )
+ }
+ )
+
+
def validate_ticket_name(ticket_name: str) -> reports.ReportItemList:
if not __TICKET_NAME_RE.search(ticket_name):
return [
diff --git a/pcs/lib/commands/booth.py b/pcs/lib/commands/booth.py
index e7891fbe..fc1454ce 100644
--- a/pcs/lib/commands/booth.py
+++ b/pcs/lib/commands/booth.py
@@ -23,7 +23,10 @@ from pcs.common.reports.item import (
)
from pcs.common.services.errors import ManageServiceError
from pcs.common.str_tools import join_multilines
-from pcs.lib import tools
+from pcs.lib import (
+ tools,
+ validate,
+)
from pcs.lib.booth import (
config_files,
config_validators,
@@ -329,17 +332,22 @@ def config_ticket_add(
booth_env = env.get_booth_env(instance_name)
try:
booth_conf = booth_env.config.read_to_facade()
+ options_pairs = validate.values_to_pairs(
+ options, config_validators.ticket_options_normalization()
+ )
report_processor.report_list(
config_validators.add_ticket(
booth_conf,
ticket_name,
- options,
+ options_pairs,
allow_unknown_options=allow_unknown_options,
)
)
if report_processor.has_errors:
raise LibraryError()
- booth_conf.add_ticket(ticket_name, options)
+ booth_conf.add_ticket(
+ ticket_name, validate.pairs_to_values(options_pairs)
+ )
booth_env.config.write_facade(booth_conf, can_overwrite=True)
except RawFileError as e:
report_processor.report(raw_file_error_report(e))
diff --git a/pcs_test/tier0/lib/commands/test_booth.py b/pcs_test/tier0/lib/commands/test_booth.py
index 2b20a199..12b169c2 100644
--- a/pcs_test/tier0/lib/commands/test_booth.py
+++ b/pcs_test/tier0/lib/commands/test_booth.py
@@ -1194,7 +1194,7 @@ class ConfigTicketAdd(TestCase, FixtureMixin):
},
)
- def test_success_ticket_options(self):
+ def assert_success_ticket_options(self, options_command, options_config):
self.config.raw_file.read(
file_type_codes.BOOTH_CONFIG,
self.fixture_cfg_path(),
@@ -1203,17 +1203,29 @@ class ConfigTicketAdd(TestCase, FixtureMixin):
self.config.raw_file.write(
file_type_codes.BOOTH_CONFIG,
self.fixture_cfg_path(),
- self.fixture_cfg_content(
- ticket_list=[
- ["ticketA", [("retries", "10"), ("timeout", "20")]]
- ]
- ),
+ self.fixture_cfg_content(ticket_list=[["ticketA", options_config]]),
can_overwrite=True,
)
commands.config_ticket_add(
- self.env_assist.get_env(),
- "ticketA",
+ self.env_assist.get_env(), "ticketA", options_command
+ )
+
+ def test_success_ticket_options(self):
+ self.assert_success_ticket_options(
{"timeout": "20", "retries": "10"},
+ [("retries", "10"), ("timeout", "20")],
+ )
+
+ def test_success_ticket_options_mode(self):
+ self.assert_success_ticket_options(
+ {"timeout": "20", "retries": "10", "mode": "manual"},
+ [("mode", "manual"), ("retries", "10"), ("timeout", "20")],
+ )
+
+ def test_success_ticket_options_mode_case_insensitive(self):
+ self.assert_success_ticket_options(
+ {"timeout": "20", "retries": "10", "mode": "MaNuAl"},
+ [("mode", "manual"), ("retries", "10"), ("timeout", "20")],
)
def test_ticket_already_exists(self):
--
2.35.3

View File

@ -1,46 +0,0 @@
From 7e44b3cd51a3a5079d0d42d91a3445f3b8ae9d17 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Fri, 15 Jul 2022 15:55:57 +0200
Subject: [PATCH 3/4] booth sync: check whether /etc/booth exists
---
pcsd/pcsd_file.rb | 6 +-----
pcsd/remote.rb | 4 ++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pcsd/pcsd_file.rb b/pcsd/pcsd_file.rb
index d82b55d2..394db59a 100644
--- a/pcsd/pcsd_file.rb
+++ b/pcsd/pcsd_file.rb
@@ -112,12 +112,8 @@ module PcsdFile
end
end
- def dir()
- return BOOTH_CONFIG_DIR
- end
-
def full_file_name()
- @full_file_name ||= File.join(self.dir, @file[:name])
+ @full_file_name ||= File.join(BOOTH_CONFIG_DIR, @file[:name])
end
end
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index 9bf96db9..b7bee7e6 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2622,6 +2622,10 @@ def booth_set_config(params, request, auth_user)
check_permissions(auth_user, Permissions::WRITE)
data = check_request_data_for_json(params, auth_user)
+ if not File.directory?(BOOTH_CONFIG_DIR)
+ raise "Configuration directory for booth '/etc/booth' is missing. Is booth installed?"
+ end
+
PcsdExchangeFormat::validate_item_map_is_Hash('files', data)
PcsdExchangeFormat::validate_item_is_Hash('file', :config, data[:config])
if data[:authfile]
--
2.35.3

View File

@ -1,25 +0,0 @@
From c00b5851a01361bd809a803ab88ff90d584d60e7 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 4 Aug 2022 15:05:41 +0200
Subject: [PATCH 1/2] fix pcs quorum device remove
---
pcsd/remote.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index b7bee7e6..74151190 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2519,7 +2519,7 @@ def qdevice_net_client_destroy(param, request, auth_user)
end
stdout, stderr, retval = run_cmd(
auth_user,
- PCS, '--' 'qdevice', 'net-client', 'destroy'
+ PCS, '--', 'qdevice', 'net-client', 'destroy'
)
if retval != 0
return [400, stderr.join('')]
--
2.37.1

View File

@ -1,46 +0,0 @@
From 667f7bb5c6221037f40dd44bc89527e478ad7f7e Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Wed, 10 Aug 2022 14:47:53 +0200
Subject: [PATCH 1/2] fix ruby socket permissions
---
pcsd/rserver.rb | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/pcsd/rserver.rb b/pcsd/rserver.rb
index c37f9df4..a54509fe 100644
--- a/pcsd/rserver.rb
+++ b/pcsd/rserver.rb
@@ -7,6 +7,29 @@ require 'thin'
require 'settings.rb'
+# Replace Thin::Backends::UnixServer:connect
+# The only change is 'File.umask(0o777)' instead of 'File.umask(0)' to properly
+# set python-ruby socket permissions
+module Thin
+ module Backends
+ class UnixServer < Base
+ def connect
+ at_exit { remove_socket_file } # In case it crashes
+ old_umask = File.umask(0o077)
+ begin
+ EventMachine.start_unix_domain_server(@socket, UnixConnection, &method(:initialize_connection))
+ # HACK EventMachine.start_unix_domain_server doesn't return the connection signature
+ # so we have to go in the internal stuff to find it.
+ @signature = EventMachine.instance_eval{@acceptors.keys.first}
+ ensure
+ File.umask(old_umask)
+ end
+ end
+ end
+ end
+end
+
+
def pack_response(response)
return [200, {}, [response.to_json.to_str]]
end
--
2.37.2

View File

@ -1,25 +0,0 @@
From ef08dbdc4f1fbf86cee3842eec5de32da5468609 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Thu, 11 Aug 2022 16:06:29 +0200
Subject: [PATCH 1/2] fix enable sbd from webui
---
pcsd/remote.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index 74151190..a8aff853 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2412,7 +2412,7 @@ def remote_enable_sbd(params, request, auth_user)
end
_, stderr, retcode = run_cmd(
- auth_user, PCS, *flags, '--' 'stonith', 'sbd', 'enable', *arg_list
+ auth_user, PCS, *flags, '--', 'stonith', 'sbd', 'enable', *arg_list
)
if retcode != 0
--
2.37.1

View File

@ -1,7 +1,7 @@
From 96e5fd66c022e6ac7803c391598423b8940c46c3 Mon Sep 17 00:00:00 2001
From fb43e90eba67e00827efcbc5feba4528fb57e350 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 20 Nov 2018 15:03:56 +0100
Subject: [PATCH 2/2] do not support cluster setup with udp(u) transport
Subject: [PATCH] do not support cluster setup with udp(u) transport
---
pcs/pcs.8.in | 2 ++
@ -49,5 +49,4 @@ index 2f26e831..a7702ac4 100644
#csetup-transport-options.knet .without-knet
{
--
2.37.2
2.37.3

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.10.14
Release: 5%{?dist}
Release: 6%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
@ -19,8 +19,8 @@ Summary: Pacemaker Configuration System
#building only for architectures with pacemaker and corosync available
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global version_or_commit %{version}
# %%global version_or_commit %%{version}.48-15d27
# %%global version_or_commit %%{version}
%global version_or_commit %{version}.27-cb2fb
%global pcs_source_name %{name}-%{version_or_commit}
@ -42,16 +42,16 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global version_rubygem_eventmachine 1.2.7
%global version_rubygem_ffi 1.15.5
%global version_rubygem_json 2.6.2
%global version_rubygem_mustermann 1.1.1
%global version_rubygem_mustermann 2.0.2
%global version_rubygem_open4 1.3.4
%global version_rubygem_rack 2.2.3.1
%global version_rubygem_rack_protection 2.2.0
%global version_rubygem_rack_test 1.1.0
%global version_rubygem_rack 2.2.4
%global version_rubygem_rack_protection 2.2.2
%global version_rubygem_rack_test 2.0.2
%global version_rubygem_rexml 3.2.5
%global version_rubygem_ruby2_keywords 0.0.5
%global version_rubygem_sinatra 2.2.0
%global version_rubygem_sinatra 2.2.2
%global version_rubygem_thin 1.8.1
%global version_rubygem_tilt 2.0.10
%global version_rubygem_tilt 2.0.11
# javascript bundled libraries for old web-ui
%global ember_version 1.4.0
@ -118,16 +118,11 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_modu
# pcs patches: <= 200
# Patch1: bzNUMBER-01-name.patch
Patch1: bz1786964-01-code-formatting.patch
Patch2: bz1786964-02-make-booth-ticket-mode-value-case-insensitive.patch
Patch3: bz1791670-01-booth-sync-check-whether-etc-booth-exists.patch
Patch4: bz2115326-01-fix-pcs-quorum-device-remove.patch
Patch5: bz2117650-01-fix-enable-sbd-from-webui.patch
Patch6: bz2116838-01-fix-ruby-socket-permissions.patch
Patch1: do-not-support-cluster-setup-with-udp-u-transport.patch
# Downstream patches do not come from upstream. They adapt pcs for specific
# RHEL needs.
Patch101: do-not-support-cluster-setup-with-udp-u-transport.patch
# Patch101: do-not-support-cluster-setup-with-udp-u-transport.patch
# ui patches: >200
@ -323,12 +318,7 @@ update_times_patch(){
%autopatch -p1 -M 200
update_times_patch %{PATCH1}
update_times_patch %{PATCH2}
update_times_patch %{PATCH3}
update_times_patch %{PATCH4}
update_times_patch %{PATCH5}
update_times_patch %{PATCH6}
update_times_patch %{PATCH101}
# update_times_patch %{PATCH101}
cp -f %SOURCE1 %{pcsd_public_dir}/images
@ -577,9 +567,10 @@ remove_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Mon Sep 05 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.14-5
- Fixed ruby socket permissions
- Resolves: rhbz#2116838
* Tue Oct 25 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.14-6
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated rubygem bundled packages: mustermann, rack, rack-protection, rack-test, sinatra, tilt
- Resolves: rhbz#1816852 rhbz#1918527 rhbz#2112267 rhbz#2112291
* Wed Aug 17 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.14-4
- Fixed enable sbd from webui