import pcs-0.10.4-3.el8

This commit is contained in:
CentOS Sources 2020-01-21 11:12:42 -05:00 committed by Stepan Oksanichenko
parent 7a19f73189
commit 2090d271ae
6 changed files with 5263 additions and 25 deletions

8
.gitignore vendored
View File

@ -5,13 +5,13 @@ SOURCES/ffi-1.9.25.gem
SOURCES/json-2.1.0.gem
SOURCES/mustermann-1.0.3.gem
SOURCES/open4-1.3.4-1.gem
SOURCES/pcs-0.10.2.tar.gz
SOURCES/pcs-web-ui-0.1.1.tar.gz
SOURCES/pcs-web-ui-node-modules-0.1.1.tar.xz
SOURCES/pcs-0.10.4.tar.gz
SOURCES/pcs-web-ui-0.1.2.tar.gz
SOURCES/pcs-web-ui-node-modules-0.1.2.tar.xz
SOURCES/pyagentx-0.4.pcs.2.tar.gz
SOURCES/rack-2.0.6.gem
SOURCES/rack-protection-2.0.4.gem
SOURCES/rack-test-1.0.0.gem
SOURCES/sinatra-2.0.4.gem
SOURCES/tilt-2.0.9.gem
SOURCES/tornado-5.0.2.tar.gz
SOURCES/tornado-6.0.3.tar.gz

View File

@ -5,13 +5,13 @@ edf08f3a0d9e202048857d78ddda44e59294084c SOURCES/backports-3.11.4.gem
8b9e81a2a6ff57f97bec1f65940c61cc6b6d81be SOURCES/json-2.1.0.gem
2d090e7d3cd2a35efeaeacf006100fb83b828686 SOURCES/mustermann-1.0.3.gem
41a7fe9f8e3e02da5ae76c821b89c5b376a97746 SOURCES/open4-1.3.4-1.gem
0d10fd24bb7268013766c01867395486bad62dcb SOURCES/pcs-0.10.2.tar.gz
c81162a6dc4811a8b988c51182cf675938bcf227 SOURCES/pcs-web-ui-0.1.1.tar.gz
175427fbf15f292a0a3454eda132543a952cca96 SOURCES/pcs-web-ui-node-modules-0.1.1.tar.xz
d2b649f271580b18d39efffa93f62b55291ef55d SOURCES/pcs-0.10.4.tar.gz
8ac1291ce8f56073b74149ac56acc094337a3298 SOURCES/pcs-web-ui-0.1.2.tar.gz
52599fe9c17bda8cc0cad1acf830a9114b8b6db6 SOURCES/pcs-web-ui-node-modules-0.1.2.tar.xz
3176b2f2b332c2b6bf79fe882e83feecf3d3f011 SOURCES/pyagentx-0.4.pcs.2.tar.gz
b15267e1f94e69238a00a6f1bd48fb7683c03a78 SOURCES/rack-2.0.6.gem
c1376e5678322b401d988d261762a78bf2cf3361 SOURCES/rack-protection-2.0.4.gem
4c99cf0a82372a1bc5968c1551d9e606b68b4879 SOURCES/rack-test-1.0.0.gem
1c85f05c874bc8c0bf9c40291ea2d430090cdfd9 SOURCES/sinatra-2.0.4.gem
55a75a80e29731d072fe44dfaf865479b65c27fd SOURCES/tilt-2.0.9.gem
c8690c8108ce9edd6c55151f66ade61e0a11ab10 SOURCES/tornado-5.0.2.tar.gz
126c66189fc5b26a39c9b54eb17254652cca8b27 SOURCES/tornado-6.0.3.tar.gz

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
From 8058591d0d79942bf6c61f105a180592bac7cf69 Mon Sep 17 00:00:00 2001
From: Ondrej Mular <omular@redhat.com>
Date: Thu, 28 Nov 2019 16:57:24 +0100
Subject: [PATCH 2/3] fix error msg when cluster is not set up
---
CHANGELOG.md | 4 +++
pcs/cluster.py | 3 +++
pcs/lib/commands/qdevice.py | 2 ++
pcs_test/tier0/lib/commands/test_qdevice.py | 27 +++++++++++++++++++--
4 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 889436c3..5a7ec377 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,11 @@
- It is possible to configure a disaster-recovery site and display its status
([rhbz#1676431])
+### Fixed
+- Error messages in cases when cluster is not set up ([rhbz#1743731])
+
[rhbz#1676431]: https://bugzilla.redhat.com/show_bug.cgi?id=1676431
+[rhbz#1743731]: https://bugzilla.redhat.com/show_bug.cgi?id=1743731
## [0.10.4] - 2019-11-28
diff --git a/pcs/cluster.py b/pcs/cluster.py
index 9473675f..0e9b3365 100644
--- a/pcs/cluster.py
+++ b/pcs/cluster.py
@@ -190,6 +190,9 @@ def start_cluster(argv):
wait_for_nodes_started(nodes, wait_timeout)
return
+ if not utils.hasCorosyncConf():
+ utils.err("cluster is not currently configured on this node")
+
print("Starting Cluster...")
service_list = ["corosync"]
if utils.need_to_handle_qdevice_service():
diff --git a/pcs/lib/commands/qdevice.py b/pcs/lib/commands/qdevice.py
index 3d7af234..41f7c296 100644
--- a/pcs/lib/commands/qdevice.py
+++ b/pcs/lib/commands/qdevice.py
@@ -81,6 +81,8 @@ def qdevice_start(lib_env, model):
start qdevice now on local host
"""
_check_model(model)
+ if not qdevice_net.qdevice_initialized():
+ raise LibraryError(reports.qdevice_not_initialized(model))
_service_start(lib_env, qdevice_net.qdevice_start)
def qdevice_stop(lib_env, model, proceed_if_used=False):
diff --git a/pcs_test/tier0/lib/commands/test_qdevice.py b/pcs_test/tier0/lib/commands/test_qdevice.py
index b2c83ca4..af23db61 100644
--- a/pcs_test/tier0/lib/commands/test_qdevice.py
+++ b/pcs_test/tier0/lib/commands/test_qdevice.py
@@ -689,6 +689,7 @@ class QdeviceNetDisableTest(QdeviceTestCase):
)
+@mock.patch("pcs.lib.corosync.qdevice_net.qdevice_initialized")
@mock.patch("pcs.lib.external.start_service")
@mock.patch.object(
LibraryEnvironment,
@@ -696,9 +697,11 @@ class QdeviceNetDisableTest(QdeviceTestCase):
lambda self: "mock_runner"
)
class QdeviceNetStartTest(QdeviceTestCase):
- def test_success(self, mock_net_start):
+ def test_success(self, mock_net_start, mock_qdevice_initialized):
+ mock_qdevice_initialized.return_value = True
lib.qdevice_start(self.lib_env, "net")
mock_net_start.assert_called_once_with("mock_runner", "corosync-qnetd")
+ mock_qdevice_initialized.assert_called_once_with()
assert_report_item_list_equal(
self.mock_reporter.report_item_list,
[
@@ -719,11 +722,12 @@ class QdeviceNetStartTest(QdeviceTestCase):
]
)
- def test_failed(self, mock_net_start):
+ def test_failed(self, mock_net_start, mock_qdevice_initialized):
mock_net_start.side_effect = StartServiceError(
"test service",
"test error"
)
+ mock_qdevice_initialized.return_value = True
assert_raise_library_error(
lambda: lib.qdevice_start(self.lib_env, "net"),
@@ -737,6 +741,7 @@ class QdeviceNetStartTest(QdeviceTestCase):
)
)
mock_net_start.assert_called_once_with("mock_runner", "corosync-qnetd")
+ mock_qdevice_initialized.assert_called_once_with()
assert_report_item_list_equal(
self.mock_reporter.report_item_list,
[
@@ -750,6 +755,24 @@ class QdeviceNetStartTest(QdeviceTestCase):
]
)
+ def test_qdevice_not_initialized(
+ self, mock_net_start, mock_qdevice_initialized
+ ):
+ mock_qdevice_initialized.return_value = False
+
+ assert_raise_library_error(
+ lambda: lib.qdevice_start(self.lib_env, "net"),
+ (
+ severity.ERROR,
+ report_codes.QDEVICE_NOT_INITIALIZED,
+ {
+ "model": "net",
+ }
+ )
+ )
+ mock_net_start.assert_not_called()
+ mock_qdevice_initialized.assert_called_once_with()
+
@mock.patch("pcs.lib.corosync.qdevice_net.qdevice_status_cluster_text")
@mock.patch("pcs.lib.external.stop_service")
--
2.21.0

View File

@ -1,7 +1,7 @@
From 1dba8fa5c0d08cec25e73ed9f520371b4af532ef Mon Sep 17 00:00:00 2001
From b919e643ff75fa47dcecbf60fd4938ae9b076ce4 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 20 Nov 2018 15:03:56 +0100
Subject: [PATCH] do not support cluster setup with udp(u) transport
Subject: [PATCH 3/3] do not support cluster setup with udp(u) transport
---
pcs/pcs.8 | 2 ++
@ -10,10 +10,10 @@ Subject: [PATCH] do not support cluster setup with udp(u) transport
3 files changed, 6 insertions(+)
diff --git a/pcs/pcs.8 b/pcs/pcs.8
index 1e794c60..51104471 100644
index 651fda83..9a4673dd 100644
--- a/pcs/pcs.8
+++ b/pcs/pcs.8
@@ -254,6 +254,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
@@ -283,6 +283,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
Transports udp and udpu:
.br
@ -23,10 +23,10 @@ index 1e794c60..51104471 100644
.br
Transport options are: ip_version, netmtu
diff --git a/pcs/usage.py b/pcs/usage.py
index 2566d522..174e39ca 100644
index e4f5af32..63e1c061 100644
--- a/pcs/usage.py
+++ b/pcs/usage.py
@@ -647,6 +647,7 @@ Commands:
@@ -689,6 +689,7 @@ Commands:
hash=sha256. To disable encryption, set cipher=none and hash=none.
Transports udp and udpu:

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.10.2
Release: 1%{?dist}
Version: 0.10.4
Release: 3%{?dist}
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
# ASL 2.0: tornado
@ -13,17 +13,18 @@ Summary: Pacemaker Configuration System
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global version_or_commit %{version}
# %%global version_or_commit f556c4adb538c8a95d763472d370f3f5d27eb38a
# %%global version_or_commit 5c3f35d2819b0e8be0dcbe0ee8f81b9b24b20b54
%global pcs_source_name %{name}-%{version_or_commit}
# ui_commit can be determined by hash, tag or branch
%global ui_commit 0.1.1
%global ui_commit 0.1.2
%global ui_src_name pcs-web-ui-%{ui_commit}
%global pcs_snmp_pkg_name pcs-snmp
%global pyagentx_version 0.4.pcs.2
%global tornado_version 5.0.2
%global tornado_version 6.0.3
%global version_rubygem_backports 3.11.4
%global version_rubygem_ethon 0.11.0
%global version_rubygem_ffi 1.9.25
@ -67,8 +68,8 @@ Source0: %{url}/archive/%{version_or_commit}/%{pcs_source_name}.tar.gz
Source1: HAM-logo.png
Source2: pcsd-bundle-config-2
Source41: https://github.com/ondrejmular/pyagentx/archive/v%{pyagentx_version}.tar.gz#/pyagentx-%{pyagentx_version}.tar.gz
Source42: https://github.com/tornadoweb/tornado/archive/v%{tornado_version}.tar.gz#/tornado-%{tornado_version}.tar.gz
Source41: https://github.com/ondrejmular/pyagentx/archive/v%{pyagentx_version}/pyagentx-%{pyagentx_version}.tar.gz
Source42: https://github.com/tornadoweb/tornado/archive/v%{tornado_version}/tornado-%{tornado_version}.tar.gz
Source81: https://rubygems.org/downloads/backports-%{version_rubygem_backports}.gem
Source82: https://rubygems.org/downloads/ethon-%{version_rubygem_ethon}.gem
@ -88,10 +89,16 @@ Source92: https://rubygems.org/downloads/tilt-%{version_rubygem_tilt}.gem
Source100: https://github.com/idevat/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz
Source101: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_commit}/pcs-web-ui-node-modules-%{ui_commit}.tar.xz
# downstream patches
Patch101: do-not-support-cluster-setup-with-udp-u-transport.patch
# Patches from upstream.
# They should come before downstream patches to avoid unnecessary conflicts.
# Z-streams are exception here: they can come from upstream but should be
# applied at the end to keep z-stream changes as straightforward as possible.
Patch1: bz1676431-01-Display-status-of-disaster-recovery.patch
Patch2: bz1743731-01-fix-error-msg-when-cluster-is-not-set-up.patch
# upsream patches
# 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
# git for patches
BuildRequires: git
@ -124,6 +131,10 @@ BuildRequires: pacemaker-cli >= 2.0.0
BuildRequires: fence-agents-apc
BuildRequires: fence-agents-scsi
BuildRequires: fence-agents-ipmilan
# for tests
%ifarch i686 x86_64
BuildRequires: fence-virt
%endif
BuildRequires: booth-site
# pcsd fonts and font management tools for creating symlinks to fonts
BuildRequires: fontconfig
@ -246,11 +257,13 @@ update_times_patch(){
update_times ${patch_file_name} `diffstat -p1 -l ${patch_file_name}`
}
update_times_patch %{PATCH1}
update_times_patch %{PATCH2}
update_times_patch %{PATCH101}
cp -f %SOURCE1 pcsd/public/images
# prepare dirs/files necessary for building web ui
# inside SOURCE100 is only directory %{ui_src_name}
# inside SOURCE100 is only directory %%{ui_src_name}
tar -xzf %SOURCE100 -C %{pcsd_public_dir}
tar -xf %SOURCE101 -C %{pcsd_public_dir}/%{ui_src_name}
@ -390,6 +403,8 @@ run_all_tests(){
BUNDLED_LIB_LOCATION=$RPM_BUILD_ROOT%{pcs_libdir}/pcs/bundled/packages \
%{__python3} pcs_test/suite.py -v --vanilla --all-but \
pcs_test.tier0.lib.commands.test_resource_agent.DescribeAgentUtf8.test_describe \
pcs_test.tier0.daemon.app.test_app_remote.SyncConfigMutualExclusive.test_get_not_locked \
pcs_test.tier0.daemon.app.test_app_remote.SyncConfigMutualExclusive.test_post_not_locked \
test_result_python=$?
@ -493,6 +508,44 @@ remove_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Mon Dec 02 2019 Ivan Devat <idevat@redhat.com> - 0.10.4-3
- Added basic resource views in new webUI
- Resolves: rhbz#1744060
* Fri Nov 29 2019 Miroslav Lisik <mlisik@redhat.com> - 0.10.4-2
- Added disaster recovery support
- Fixed error message when cluster is not set up
- Removed '-g' option from rubygem's cflags because it does not generate .gnu_debugdata and option '-K' for strip command was removed
- Resolves: rhbz#1676431 rhbz#1743731
* Thu Nov 28 2019 Miroslav Lisik <mlisik@redhat.com> - 0.10.4-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Add '-g' to rubygem's cflags
- Resolves: rhbz#1743704 rhbz#1741586 rhbz#1750427
* Mon Nov 18 2019 Miroslav Lisik <mlisik@redhat.com> - 0.10.3-2
- Rebased to latest upstream sources (see CHANGELOG.md)
- Do not strip .gnu_debugdata section from binaries
- Resolves: rhbz#1631514 rhbz#1631519 rhbz#1734361 rhbz#1743704
* Mon Oct 21 2019 Miroslav Lisik <mlisik@redhat.com> - 0.10.3-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Resolves: rhbz#1442116 rhbz#1631514 rhbz#1631519 rhbz#1673835 rhbz#1698763 rhbz#1728890 rhbz#1734361 rhbz#1743704 rhbz#1743735 rhbz#1744056
* Tue Aug 13 2019 Tomas Jelinek <tojeline@redhat.com> - 0.10.2-4
- Generate 256 bytes long corosync authkey so clusters can start when FIPS is enabled
- Resolves: rhbz#1740218
* Mon Jul 08 2019 Ivan Devat <idevat@redhat.com> - 0.10.2-3
- Options starting with - and -- are no longer ignored for non-root users
- Resolves: rhbz#1725183
* Thu Jun 27 2019 Ivan Devat <idevat@redhat.com> - 0.10.2-2
- Fixed crashes in the `pcs host auth` command
- Command `pcs resource bundle reset` no longer accepts the container type
- Fixed id conflict with current bundle configuration in i`pcs resource bundle reset`
- Resolves: rhbz#1657166 rhbz#1676957
* Thu Jun 13 2019 Ivan Devat <idevat@redhat.com> - 0.10.2-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Added pam as required package