Resolves: rhbz#1283805 rhbz#1910644 rhbz#1910645 rhbz#1956703 rhbz#1956706 rhbz#1985981 rhbz#1991957 rhbz#1996062 rhbz#1996067

- Rebased to latest upstream sources (see CHANGELOG.md)
This commit is contained in:
Miroslav Lisik 2021-08-26 10:54:48 +02:00
parent 33ce0d3e0f
commit 2620cce992
7 changed files with 65 additions and 738 deletions

1
.gitignore vendored
View File

@ -143,3 +143,4 @@
/pcs-0.11.0.alpha.1.tar.gz
/pcs-web-ui-0.1.7.tar.gz
/pcs-web-ui-node-modules-0.1.7.tar.xz
/pcs-0.11.1.alpha.1.tar.gz

View File

@ -1,726 +0,0 @@
From 5a117f6dc584ce42150c24375491c043959664bb Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Mon, 14 Jun 2021 11:39:14 +0200
Subject: [PATCH 1/2] remove clufter commands
---
Makefile.am | 4 +-
README.md | 2 -
configure.ac | 9 +-
mypy.ini | 6 -
pcs/cli/common/parse_args.py | 4 -
pcs/cli/routing/config.py | 14 -
pcs/config.py | 377 -------------------
pcs/pcs.8.in | 2 -
pcs/settings.py.in | 3 -
pcs_test/Makefile.am | 1 -
pcs_test/resources/cluster.conf | 27 --
pcs_test/tier0/cli/common/test_parse_args.py | 2 -
pcsd/Makefile.am | 1 -
pcsd/test/cluster.conf | 27 --
rpm/pcs.spec.in | 15 -
15 files changed, 3 insertions(+), 491 deletions(-)
delete mode 100644 pcs_test/resources/cluster.conf
delete mode 100644 pcsd/test/cluster.conf
diff --git a/Makefile.am b/Makefile.am
index 6a7cc553..cba77d8d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -369,12 +369,10 @@ $(SPEC): $(SPEC).in .version config.status stamps/download_python_deps stamps/do
pylist="`ls rpm/*.tar.gz | grep -v ^rpm/pyagentx- | grep -v ^rpm/pcs- | sed -e 's#rpm/##g' -e 's#.tar.gz##'`" && \
pysrc="`base=42; for i in $$pylist; do echo 'Source'$$base': '$$i'.tar.gz' && let "base=base+1"; done`" && \
$(AWK) -i inplace -v r="$$pysrc" '{gsub(/@pysrc@/,r)}1' $@-t; \
- pybundle="`for i in $$pylist; do echo $$i | grep -v ^distro- | grep -v ^dataclasses- | sed 's/\(.*\)-\(.*\)/Provides: bundled(\1) = \2/'; done`" && \
+ pybundle="`for i in $$pylist; do echo $$i | grep -v ^dataclasses- | sed 's/\(.*\)-\(.*\)/Provides: bundled(\1) = \2/'; done`" && \
$(AWK) -i inplace -v r="$$pybundle" '{gsub(/@pybundle@/,r)}1' $@-t; \
pydataclassesbundle="`for i in $$pylist; do echo $$i | grep ^dataclasses- | sed 's/\(.*\)-\(.*\)/Provides: bundled(\1) = \2/'; done`" && \
$(AWK) -i inplace -v r="$$pydataclassesbundle" '{gsub(/@pydataclassesbundle@/,r)}1' $@-t; \
- pydistrobundle="`for i in $$pylist; do echo $$i | grep ^distro- | sed 's/\(.*\)-\(.*\)/Provides: bundled(\1) = \2/'; done`" && \
- $(AWK) -i inplace -v r="$$pydistrobundle" '{gsub(/@pydistrobundle@/,r)}1' $@-t; \
pycache="`echo $(MKDIR_P) $(PCS_BUNDLED_DIR_LOCAL)/src; base=41; for i in $$pylist pyagentx; do echo 'cp -f %SOURCE'$$base' rpm/' && let "base=base+1"; done`" && \
$(AWK) -i inplace -v r="$$pycache" '{gsub(/@pycache@/,r)}1' $@-t; \
gemlist="`for i in $$($(FIND) rpm/ -type f -name '*.gem'); do echo $$i | sed -e 's#rpm/##g' -e 's#.gem##g'; done`" && \
diff --git a/README.md b/README.md
index efca6deb..85ab1099 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,6 @@ These are the runtime dependencies of pcs and pcsd:
* python 3.6+
* python3-cryptography
* python3-dateutil 2.7.0+
-* python3-distro (for python 3.8+)
* python3-lxml
* python3-pycurl
* python3-setuptools
@@ -41,7 +40,6 @@ These are the runtime dependencies of pcs and pcsd:
* pacemaker 2.x
It is also recommended to have these:
-* python3-clufter
* liberation fonts (package liberation-sans-fonts or fonts-liberation or
fonts-liberation2)
* overpass fonts (package overpass-fonts)
diff --git a/configure.ac b/configure.ac
index ab92f780..5fd89a92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -316,13 +316,8 @@ if test "x$tests_only" != "xyes"; then
PCS_CHECK_PYMOD([dataclasses], [], [yes])
fi
- # python 3.8+ needs distro as well (removed from upstream lib)
- if printf '%s\n%s\n' "3.8" "$PYTHON_VERSION" | sort -V -C; then
- PCS_CHECK_PYMOD([distro], [], [yes])
- fi
-
- # special case, because we need to download from github
- AC_PIP_MODULE([pyagentx])
+# special case, because we need to download from github
+AC_PIP_MODULE([pyagentx])
if test "x$HAVE_PIPMOD_PYAGENTX" = "xno" && test "x$local_build" != "xyes"; then
AC_MSG_ERROR([Python module pyagentx not found])
diff --git a/mypy.ini b/mypy.ini
index 66d9109c..2d9cb7e8 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -127,15 +127,9 @@ ignore_errors = True
# External libraries
-[mypy-clufter.*]
-ignore_missing_imports = True
-
[mypy-dacite]
ignore_missing_imports = True
-[mypy-distro]
-ignore_missing_imports = True
-
[mypy-pyagentx]
ignore_errors = True
ignore_missing_imports = True
diff --git a/pcs/cli/common/parse_args.py b/pcs/cli/common/parse_args.py
index fa6c0a8a..ce28f58b 100644
--- a/pcs/cli/common/parse_args.py
+++ b/pcs/cli/common/parse_args.py
@@ -28,8 +28,6 @@ PCS_LONG_OPTIONS = [
"fullhelp",
"force",
"skip-offline",
- # TODO remove, deprecated command 'pcs config import-cman'
- "interactive",
"autodelete",
"simulate",
"all",
@@ -476,8 +474,6 @@ class InputModifiers:
# used only in deprecated 'pcs resource|stonith show'
"--groups": "--groups" in options,
"--hide-inactive": "--hide-inactive" in options,
- # TODO remove, deprecated command 'pcs config import-cman'
- "--interactive": "--interactive" in options,
"--local": "--local" in options,
"--master": "--master" in options,
"--monitor": "--monitor" in options,
diff --git a/pcs/cli/routing/config.py b/pcs/cli/routing/config.py
index 5d2663bd..7f878f4d 100644
--- a/pcs/cli/routing/config.py
+++ b/pcs/cli/routing/config.py
@@ -21,20 +21,6 @@ config_cmd = create_router(
["config", "checkpoint"],
default_cmd="list",
),
- # TODO remove, deprecated command
- "import-cman": config.config_import_cman,
- # TODO remove, deprecated command
- "export": create_router(
- {
- "pcs-commands": config.config_export_pcs_commands,
- "pcs-commands-verbose": lambda lib, argv, modifiers: (
- config.config_export_pcs_commands(
- lib, argv, modifiers, verbose=True
- )
- ),
- },
- ["config", "export"],
- ),
},
["config"],
default_cmd="show",
diff --git a/pcs/config.py b/pcs/config.py
index 71b28c13..a0290499 100644
--- a/pcs/config.py
+++ b/pcs/config.py
@@ -7,7 +7,6 @@ from io import BytesIO
import tarfile
import json
from xml.dom.minidom import parse
-import logging
import pwd
import grp
import tempfile
@@ -15,25 +14,6 @@ import time
import shutil
import difflib
-try:
- import distro
-
- no_distro_package = False
-except ImportError:
- no_distro_package = True
- import platform
-
-# TODO remove, deprecated
-try:
- import clufter.facts
- import clufter.format_manager
- import clufter.filter_manager
- import clufter.command_manager
-
- no_clufter = False
-except ImportError:
- no_clufter = True
-
from pcs import (
cluster,
constraint,
@@ -51,7 +31,6 @@ from pcs.cli.common.errors import CmdLineInputError
from pcs.cli.constraint import command as constraint_command
from pcs.cli.nvset import nvset_dto_list_to_lines
from pcs.cli.reports import process_library_reports
-from pcs.cli.reports.output import warn
from pcs.common.reports import constraints as constraints_reports
from pcs.common.str_tools import indent
from pcs.lib.commands import quorum as lib_quorum
@@ -807,359 +786,3 @@ def config_checkpoint_restore(lib, argv, modifiers):
except Exception as e:
utils.err("unable to read the checkpoint: %s" % e)
utils.replace_cib_configuration(snapshot_dom)
-
-
-# TODO remove, deprecated command
-def config_import_cman(lib, argv, modifiers):
- """
- Options:
- * --force - skip checks, overwrite files
- * --interactive - interactive issue resolving
- * --request-timeout - effective only when ouput is not specified
- """
- # pylint: disable=no-member
- del lib
- warn("This command is deprecated and will be removed.")
- modifiers.ensure_only_supported(
- "--force",
- "interactive",
- "--request-timeout",
- )
- if no_clufter:
- utils.err(
- "Unable to perform a CMAN cluster conversion due to missing "
- "python-clufter package"
- )
- clufter_supports_corosync3 = hasattr(clufter.facts, "cluster_pcs_camelback")
-
- # prepare convertor options
- cluster_conf = settings.cluster_conf_file
- dry_run_output = None
- output_format = "corosync.conf"
- dist = None
- invalid_args = False
- for arg in argv:
- if "=" in arg:
- name, value = arg.split("=", 1)
- if name == "input":
- cluster_conf = value
- elif name == "output":
- dry_run_output = value
- elif name == "output-format":
- if value in (
- "corosync.conf",
- "pcs-commands",
- "pcs-commands-verbose",
- ):
- output_format = value
- else:
- invalid_args = True
- elif name == "dist":
- dist = value
- else:
- invalid_args = True
- else:
- invalid_args = True
- if output_format not in ("pcs-commands", "pcs-commands-verbose") and (
- dry_run_output and not dry_run_output.endswith(".tar.bz2")
- ):
- dry_run_output += ".tar.bz2"
- if invalid_args or not dry_run_output:
- usage.config(["import-cman"])
- sys.exit(1)
- debug = modifiers.get("--debug")
- force = modifiers.get("--force")
- interactive = modifiers.get("--interactive")
-
- if dist is not None:
- if not clufter_supports_corosync3:
- utils.err(
- "Unable to perform a CMAN cluster conversion due to clufter "
- "not supporting Corosync 3. Please, upgrade clufter packages."
- )
- if not clufter.facts.cluster_pcs_camelback("linux", dist.split(",")):
- utils.err("dist does not match output-format")
- elif output_format == "corosync.conf":
- dist = _get_linux_dist()
- else:
- # for output-format=pcs-command[-verbose]
- dist = _get_linux_dist()
-
- clufter_args = {
- "input": str(cluster_conf),
- "cib": {"passin": "bytestring"},
- "nocheck": force,
- "batch": True,
- "sys": "linux",
- "dist": dist,
- }
- if interactive:
- if "EDITOR" not in os.environ:
- utils.err("$EDITOR environment variable is not set")
- clufter_args["batch"] = False
- clufter_args["editor"] = os.environ["EDITOR"]
- if debug:
- logging.getLogger("clufter").setLevel(logging.DEBUG)
- if output_format == "corosync.conf":
- clufter_args["coro"] = {"passin": "struct"}
- cmd_name = "ccs2pcs-camelback"
- elif output_format in ("pcs-commands", "pcs-commands-verbose"):
- clufter_args["output"] = {"passin": "bytestring"}
- clufter_args["start_wait"] = "60"
- clufter_args["tmp_cib"] = "tmp-cib.xml"
- clufter_args["force"] = force
- clufter_args["text_width"] = "80"
- clufter_args["silent"] = True
- clufter_args["noguidance"] = True
- if output_format == "pcs-commands-verbose":
- clufter_args["text_width"] = "-1"
- clufter_args["silent"] = False
- clufter_args["noguidance"] = False
- if clufter.facts.cluster_pcs_flatiron("linux", dist.split(",")):
- cmd_name = "ccs2pcscmd-flatiron"
- elif clufter.facts.cluster_pcs_needle("linux", dist.split(",")):
- cmd_name = "ccs2pcscmd-needle"
- elif clufter_supports_corosync3 and clufter.facts.cluster_pcs_camelback(
- "linux", dist.split(",")
- ):
- cmd_name = "ccs2pcscmd-camelback"
- else:
- utils.err(
- "unrecognized dist, try something recognized"
- + " (e. g. rhel,6.8 or redhat,7.3 or debian,7 or ubuntu,trusty)"
- )
- clufter_args_obj = type(str("ClufterOptions"), (object,), clufter_args)
-
- # run convertor
- run_clufter(
- cmd_name,
- clufter_args_obj,
- debug,
- force,
- "Error: unable to import cluster configuration",
- )
-
- # save commands
- if output_format in ("pcs-commands", "pcs-commands-verbose"):
- ok, message = utils.write_file(
- dry_run_output, clufter_args_obj.output["passout"].decode()
- )
- if not ok:
- utils.err(message)
- return
-
- # put new config files into tarball
- file_list = config_backup_path_list()
- for file_item in file_list.values():
- file_item["attrs"]["uname"] = "root"
- file_item["attrs"]["gname"] = "root"
- file_item["attrs"]["uid"] = 0
- file_item["attrs"]["gid"] = 0
- file_item["attrs"]["mode"] = 0o600
- tar_data = BytesIO()
- try:
- with tarfile.open(fileobj=tar_data, mode="w|bz2") as tarball:
- config_backup_add_version_to_tarball(tarball)
- utils.tar_add_file_data(
- tarball,
- clufter_args_obj.cib["passout"],
- "cib.xml",
- **file_list["cib.xml"]["attrs"],
- )
- # put uidgid into separate files
- fmt_simpleconfig = clufter.format_manager.FormatManager.init_lookup(
- "simpleconfig"
- ).plugins["simpleconfig"]
- corosync_struct = []
- uidgid_list = []
- for section in clufter_args_obj.coro["passout"][2]:
- if section[0] == "uidgid":
- uidgid_list.append(section[1])
- else:
- corosync_struct.append(section)
- corosync_conf_data = fmt_simpleconfig(
- "struct", ("corosync", (), corosync_struct)
- )("bytestring")
- utils.tar_add_file_data(
- tarball,
- corosync_conf_data,
- "corosync.conf",
- **file_list["corosync.conf"]["attrs"],
- )
- for uidgid in uidgid_list:
- uid = ""
- gid = ""
- for item in uidgid:
- if item[0] == "uid":
- uid = item[1]
- if item[0] == "gid":
- gid = item[1]
- filename = utils.get_uid_gid_file_name(uid, gid)
- uidgid_data = fmt_simpleconfig(
- "struct", ("corosync", (), [("uidgid", uidgid, None)])
- )("bytestring")
- utils.tar_add_file_data(
- tarball,
- uidgid_data,
- "uidgid.d/" + filename,
- **file_list["uidgid.d"]["attrs"],
- )
- except (tarfile.TarError, EnvironmentError) as e:
- utils.err("unable to create tarball: %s" % e)
- tar_data.seek(0)
-
- # save tarball / remote restore
- if dry_run_output:
- ok, message = utils.write_file(
- dry_run_output, tar_data.read(), permissions=0o600, binary=True
- )
- if not ok:
- utils.err(message)
- else:
- config_restore_remote(None, tar_data)
- tar_data.close()
-
-
-def _get_linux_dist():
- if no_distro_package:
- # For Python 3.8+, python3-distro is a required dependency and we
- # should never get here. Pylint, of course, cannot know that.
- # pylint: disable=deprecated-method
- # pylint: disable=no-member
- distribution = platform.linux_distribution(full_distribution_name=False)
- else:
- distribution = distro.linux_distribution(full_distribution_name=False)
- return ",".join(distribution)
-
-
-# TODO remove, deprecated command
-def config_export_pcs_commands(lib, argv, modifiers, verbose=False):
- """
- Options:
- * --force - skip checks, overwrite files
- * --interactive - interactive issue resolving
- * -f - CIB file
- * --corosync_conf
- """
- del lib
- warn("This command is deprecated and will be removed.")
- modifiers.ensure_only_supported(
- "--force", "--interactive", "-f", "--corosync_conf"
- )
- if no_clufter:
- utils.err(
- "Unable to perform export due to missing python-clufter package"
- )
-
- # parse options
- debug = modifiers.get("--debug")
- force = modifiers.get("--force")
- interactive = modifiers.get("--interactive")
- invalid_args = False
- output_file = None
- dist = None
- for arg in argv:
- if "=" in arg:
- name, value = arg.split("=", 1)
- if name == "output":
- output_file = value
- elif name == "dist":
- dist = value
- else:
- invalid_args = True
- else:
- invalid_args = True
- # check options
- if invalid_args:
- usage.config(["export pcs-commands"])
- sys.exit(1)
- # complete optional options
- if dist is None:
- dist = _get_linux_dist()
-
- # prepare convertor options
- clufter_args = {
- "nocheck": force,
- "batch": True,
- "sys": "linux",
- "dist": dist,
- "coro": settings.corosync_conf_file,
- "start_wait": "60",
- "tmp_cib": "tmp-cib.xml",
- "force": force,
- "text_width": "80",
- "silent": True,
- "noguidance": True,
- }
- if output_file:
- clufter_args["output"] = {"passin": "bytestring"}
- else:
- clufter_args["output"] = "-"
- if interactive:
- if "EDITOR" not in os.environ:
- utils.err("$EDITOR environment variable is not set")
- clufter_args["batch"] = False
- clufter_args["editor"] = os.environ["EDITOR"]
- if debug:
- logging.getLogger("clufter").setLevel(logging.DEBUG)
- if utils.usefile:
- clufter_args["cib"] = os.path.abspath(utils.filename)
- else:
- clufter_args["cib"] = ("bytestring", utils.get_cib())
- if verbose:
- clufter_args["text_width"] = "-1"
- clufter_args["silent"] = False
- clufter_args["noguidance"] = False
- clufter_args_obj = type(str("ClufterOptions"), (object,), clufter_args)
- cmd_name = "pcs2pcscmd-camelback"
-
- # run convertor
- run_clufter(
- cmd_name,
- clufter_args_obj,
- debug,
- force,
- "Error: unable to export cluster configuration",
- )
-
- # save commands if not printed to stdout by clufter
- if output_file:
- # pylint: disable=no-member
- ok, message = utils.write_file(
- output_file, clufter_args_obj.output["passout"].decode()
- )
- if not ok:
- utils.err(message)
-
-
-# TODO remove, deprecated
-def run_clufter(cmd_name, cmd_args, debug, force, err_prefix):
- """
- Commandline options: no options used but messages which include --force,
- --debug and --interactive are generated
- """
- # pylint: disable=broad-except
- try:
- result = None
- cmd_manager = clufter.command_manager.CommandManager.init_lookup(
- cmd_name
- )
- result = cmd_manager.commands[cmd_name](cmd_args)
- error_message = ""
- except Exception as e:
- error_message = str(e)
- if error_message or result != 0:
- hints = []
- hints.append("--interactive to solve the issues manually")
- if not debug:
- hints.append("--debug to get more information")
- if not force:
- hints.append("--force to override")
- hints_string = "\nTry using %s." % ", ".join(hints) if hints else ""
- sys.stderr.write(
- err_prefix
- + (": %s" % error_message if error_message else "")
- + hints_string
- + "\n"
- )
- sys.exit(1 if result is None else result)
diff --git a/pcs/pcs.8.in b/pcs/pcs.8.in
index ac093d69..0428f81c 100644
--- a/pcs/pcs.8.in
+++ b/pcs/pcs.8.in
@@ -1430,5 +1430,3 @@ http://clusterlabs.org/doc/
.BR boothd (8),
.BR sbd (8)
-
-.BR clufter (1)
diff --git a/pcs/settings.py.in b/pcs/settings.py.in
index 6df12997..68b18a53 100644
--- a/pcs/settings.py.in
+++ b/pcs/settings.py.in
@@ -31,9 +31,6 @@ pcsd_token_max_bytes = 256
booth_authkey_file_mode = 0o600
# Booth does not support keys longer than 64 bytes.
booth_authkey_bytes = 64
-# cluster conf is obsoleted and didn't support out-of-tree installation / run
-# hence it can stay hardcoded
-cluster_conf_file = "/etc/cluster/cluster.conf"
fence_agent_binaries = "@FASEXECPREFIX@/sbin"
pacemaker_local_state_dir = os.path.join(
"/", "@PCMKLOCALSTATEDIR@", "lib/pacemaker"
diff --git a/pcs_test/Makefile.am b/pcs_test/Makefile.am
index 708e9658..cfe53a40 100644
--- a/pcs_test/Makefile.am
+++ b/pcs_test/Makefile.am
@@ -16,7 +16,6 @@ EXTRA_DIST = \
resources/cib-largefile.xml \
resources/cib-large.xml \
resources/cib-tags.xml \
- resources/cluster.conf \
resources/corosync-3nodes.conf \
resources/corosync-3nodes-qdevice.conf \
resources/corosync-3nodes-qdevice-heuristics.conf \
diff --git a/pcs_test/resources/cluster.conf b/pcs_test/resources/cluster.conf
deleted file mode 100644
index 19889712..00000000
--- a/pcs_test/resources/cluster.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-<cluster config_version="9" name="test99">
- <fence_daemon/>
- <clusternodes>
- <clusternode name="rh7-1" nodeid="1">
- <fence>
- <method name="pcmk-method">
- <device name="pcmk-redirect" port="rh7-1"/>
- </method>
- </fence>
- </clusternode>
- <clusternode name="rh7-2" nodeid="2">
- <fence>
- <method name="pcmk-method">
- <device name="pcmk-redirect" port="rh7-2"/>
- </method>
- </fence>
- </clusternode>
- </clusternodes>
- <cman broadcast="no" expected_votes="1" transport="udpu" two_node="1"/>
- <fencedevices>
- <fencedevice agent="fence_pcmk" name="pcmk-redirect"/>
- </fencedevices>
- <rm>
- <failoverdomains/>
- <resources/>
- </rm>
-</cluster>
diff --git a/pcs_test/tier0/cli/common/test_parse_args.py b/pcs_test/tier0/cli/common/test_parse_args.py
index 9dbe2394..745433ea 100644
--- a/pcs_test/tier0/cli/common/test_parse_args.py
+++ b/pcs_test/tier0/cli/common/test_parse_args.py
@@ -603,8 +603,6 @@ class InputModifiersTest(TestCase):
# used only in deprecated 'pcs resource|stonith show'
"--groups",
"--hide-inactive",
- # TODO remove, deprecated command 'pcs config import-cman'
- "--interactive",
"--local",
"--master",
"--monitor",
diff --git a/pcsd/Makefile.am b/pcsd/Makefile.am
index 007d2194..0cd2e90d 100644
--- a/pcsd/Makefile.am
+++ b/pcsd/Makefile.am
@@ -2,7 +2,6 @@ EXTRA_DIST = \
pam/pcsd.debian \
pam/pcsd.fedora \
test/cib1.xml \
- test/cluster.conf \
test/corosync.conf \
test/crm1.xml \
test/crm2.xml \
diff --git a/pcsd/test/cluster.conf b/pcsd/test/cluster.conf
deleted file mode 100644
index 19889712..00000000
--- a/pcsd/test/cluster.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-<cluster config_version="9" name="test99">
- <fence_daemon/>
- <clusternodes>
- <clusternode name="rh7-1" nodeid="1">
- <fence>
- <method name="pcmk-method">
- <device name="pcmk-redirect" port="rh7-1"/>
- </method>
- </fence>
- </clusternode>
- <clusternode name="rh7-2" nodeid="2">
- <fence>
- <method name="pcmk-method">
- <device name="pcmk-redirect" port="rh7-2"/>
- </method>
- </fence>
- </clusternode>
- </clusternodes>
- <cman broadcast="no" expected_votes="1" transport="udpu" two_node="1"/>
- <fencedevices>
- <fencedevice agent="fence_pcmk" name="pcmk-redirect"/>
- </fencedevices>
- <rm>
- <failoverdomains/>
- <resources/>
- </rm>
-</cluster>
diff --git a/rpm/pcs.spec.in b/rpm/pcs.spec.in
index 918986e0..f421bc53 100644
--- a/rpm/pcs.spec.in
+++ b/rpm/pcs.spec.in
@@ -36,10 +36,6 @@ Summary: Pacemaker Configuration System
%define dataclasses_required 1
%endif
-%if "%{python3_version}" >= "3.8"
-%define distro_required 1
-%endif
-
# mangling shebang in /usr/lib/pcsd/vendor/bundle/ruby/gems/rack-2.0.5/test/cgi/test from /usr/bin/env ruby to #!/usr/bin/ruby
#*** ERROR: ./usr/lib/pcsd/vendor/bundle/ruby/gems/rack-2.0.5/test/cgi/test.ru has shebang which doesn't start with '/' (../../bin/rackup)
#mangling shebang in /usr/lib/pcsd/vendor/bundle/ruby/gems/rack-2.0.5/test/cgi/rackup_stub.rb from /usr/bin/env ruby to #!/usr/bin/ruby
@@ -105,14 +101,6 @@ Requires: python3-cryptography
Requires: python3-lxml
Requires: python3-pycurl
Requires: python3-pyparsing
-%if 0%{?fedora} <= 32
-# clufter and its dependencies
-Requires: python3-clufter => 0.70.0
-%endif
-%if 0%{?rhel} < 9
-# clufter and its dependencies
-Requires: python3-clufter => 0.70.0
-%endif
# ruby and gems for pcsd
Requires: ruby >= 2.2.0
Requires: rubygems
@@ -140,9 +128,6 @@ Recommends: overpass-fonts
%if %{defined dataclasses_required}
@pydataclassesbundle@
%endif
-%if %{defined distro_required}
-@pydistrobundle@
-%endif
@gembundle@
--
2.31.1

View File

@ -1,4 +1,4 @@
From 1d6644d5d91db4607474f50e4226a0ab8e4f231d Mon Sep 17 00:00:00 2001
From e5413e1afa3114673867bc6b3037434bb4109ce9 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 in RHEL9
@ -9,10 +9,10 @@ Subject: [PATCH] do not support cluster setup with udp(u) transport in RHEL9
2 files changed, 3 insertions(+)
diff --git a/pcs/pcs.8.in b/pcs/pcs.8.in
index 4e3a3204..eb6f593f 100644
index 77201a90..b311bee3 100644
--- a/pcs/pcs.8.in
+++ b/pcs/pcs.8.in
@@ -443,6 +443,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
@@ -451,6 +451,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
Transports udp and udpu:
.br
@ -22,10 +22,10 @@ index 4e3a3204..eb6f593f 100644
.br
Transport options are: ip_version, netmtu
diff --git a/pcs/usage.py b/pcs/usage.py
index 3bdf35ba..0ad83f16 100644
index ccab8f93..055556c8 100644
--- a/pcs/usage.py
+++ b/pcs/usage.py
@@ -897,6 +897,7 @@ Commands:
@@ -903,6 +903,7 @@ Commands:
hash=sha256. To disable encryption, set cipher=none and hash=none.
Transports udp and udpu:

24
fix-changelog.patch Normal file
View File

@ -0,0 +1,24 @@
From c32bb75975a1c8452dd03a9b2a873d81c904baa9 Mon Sep 17 00:00:00 2001
From: Miroslav Lisik <mlisik@redhat.com>
Date: Thu, 26 Aug 2021 16:46:05 +0200
Subject: [PATCH] fix changelog
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a049fc..8c31cbb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
# Change Log
-## [0.11.1.alpha.1] - 2021-08-26
+## [Unreleased]
### Added
- Explicit confirmation is now required to prevent accidental destroying
--
2.31.1

19
fix-version.patch Normal file
View File

@ -0,0 +1,19 @@
From aef3d9f6f4e8c0119497f1ff29439c1e96cb6c04 Mon Sep 17 00:00:00 2001
From: Miroslav Lisik <mlisik@redhat.com>
Date: Thu, 26 Aug 2021 16:36:19 +0200
Subject: [PATCH] fix version
---
.gitarchivever | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitarchivever b/.gitarchivever
index d9441fc..3c5bc79 100644
--- a/.gitarchivever
+++ b/.gitarchivever
@@ -1 +1 @@
-ref names: (HEAD -> master, tag: v0.11.1.alpha.1)
+ref names: (HEAD -> master, tag: v0.11.1)
--
2.31.1

View File

@ -1,5 +1,5 @@
Name: pcs
Version: 0.11.0.alpha.1
Version: 0.11.1
Release: 1%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
@ -21,7 +21,7 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global version_or_commit %{version}
# %%global version_or_commit %%{version}.210-9862
%global pcs_source_name %{name}-%{version_or_commit}
%global pcs_source_name %{name}-%{version_or_commit}.alpha.1
# ui_commit can be determined by hash, tag or branch
%global ui_commit 0.1.7
@ -96,8 +96,8 @@ Source95: https://rubygems.org/downloads/thin-%{version_rubygem_thin}.gem
Source96: https://rubygems.org/downloads/ruby2_keywords-%{version_rubygem_ruby2_keywords}.gem
Source97: https://rubygems.org/downloads/webrick-%{version_rubygem_webrick}.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_modules_version}.tar.xz
Source100: https://github.com/ClusterLabs/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz
Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_commit}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz
# Patches from upstream.
# They should come before downstream patches to avoid unnecessary conflicts.
@ -107,7 +107,10 @@ Source101: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_commit}/p
# 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
Patch1: fix-version.patch
Patch2: do-not-support-cluster-setup-with-udp-u-transport.patch
Patch3: fix-changelog.patch
# git for patches
BuildRequires: git-core
@ -279,7 +282,9 @@ update_times_patch(){
}
# update_times_patch %%{PATCH1}
update_times_patch %{PATCH101}
update_times_patch %{PATCH1}
update_times_patch %{PATCH2}
update_times_patch %{PATCH3}
# prepare dirs/files necessary for building web ui
# inside SOURCE100 is only directory %%{ui_src_name}
@ -524,6 +529,10 @@ run_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Thu Aug 26 2021 Miroslav Lisik <mlisik@redhat.com> - 0.11.1-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Resolves: rhbz#1283805 rhbz#1910644 rhbz#1910645 rhbz#1956703 rhbz#1956706 rhbz#1985981 rhbz#1991957 rhbz#1996062 rhbz#1996067
* Tue Aug 24 2021 Miroslav Lisik <mlisik@redhat.com> - 0.11.0.alpha.1-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs web ui

View File

@ -17,6 +17,6 @@ SHA512 (tornado-6.1.0.tar.gz) = bd161a1c30f40f983d608297bca113735cb4baad255de713
SHA512 (dacite-1.6.0.tar.gz) = 034255f095589d309fe5805413d8b148f430cd20a0de305b7954083b530d516da1d8f3f00ebb5264a8cfb77f2b2a76f1e2d863e78bd191f1d85021c5553815da
SHA512 (webrick-1.7.0.gem) = 5f242b50300046fe7c22ecd1640a73e5815e05a72bedfebe6bc39c24c92bd61abdd180860de0d194c0eebbc640b507b6892de181d3b577c5372ace0ca6faf2a3
SHA512 (rexml-3.2.5.gem) = 1e3838d4a5befa76137fb8fea6a20195490645aa2b1c5d14d1eeca6c093d7f64eb405f07fd07b00fcafa9606dc78f9f0a488012338f81414623feb6e8cb83931
SHA512 (pcs-0.11.0.alpha.1.tar.gz) = 68d329798c7054051d09e444b28d350321f24b2b94f49833549e30fdee12f874a66dbf61f62011b8be23c78907023e784190be53f1b7dc3dfc960a92447b0035
SHA512 (pcs-web-ui-0.1.7.tar.gz) = 1640615bb840aee89bf7c46ee2ac6d223b7810fa2efbd22fbdf9fe0af9d2b937301874497eca7c6d152bb8a5addced4383ecef8ff69be7ca91a36bce46abec43
SHA512 (pcs-web-ui-node-modules-0.1.7.tar.xz) = 58680eb1851c399ca74c438b396b683e2bf123e2a2b4f942448a8071df3019d577fc6dfc8bfd0d6c41f9ce9a9c21c2f613e7cccd8be46b3a0dc45bc96fedc720
SHA512 (pcs-0.11.1.alpha.1.tar.gz) = c4d67d1b3ca6d617558db9919f6d3df32e50d04d4b443854607f3145a26592debdec435debedde9e5bfbcb44c4255af9c33dc9df802bb0ceffc61a82a1e3a8ce