Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
alphabetically ([rhbz#2461143]) ([RHEL-176475])
- Location constraints with rules can be removed using web UI (broken since
pcs-0.12.0b1) ([RHEL-183182])
- Adding a node to a cluster now removes all cluster configuration files from
the new node before adding it.

### Deprecated
- Commands `pcs pcsd certkey` and `pcs pcsd sync-certificates` ([RHEL-149608])
Expand Down
10 changes: 9 additions & 1 deletion pcs/lib/commands/cluster/setup_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
start_cluster,
)
from pcs.lib.commands.cluster.utils import ensure_live_env, verify_corosync_conf
from pcs.lib.communication import cluster
from pcs.lib.communication.corosync import (
CheckCorosyncOffline,
DistributeCorosyncConf,
Expand Down Expand Up @@ -357,7 +358,14 @@ def add_nodes( # noqa: PLR0912, PLR0915
# Validation done. If errors occurred, an exception has been raised and we
# don't get below this line.

# First set up everything else than corosync. Once the new nodes are present
# First, destroy cluster on new nodes. This is needed to make sure that
# new nodes are not part of another cluster and that there are no cluster
# configs left there which would interfere with the current cluster.
com_cmd = cluster.Destroy(env.report_processor)
com_cmd.set_targets(new_nodes_target_list)
run_and_raise(env.get_node_communicator(), com_cmd)

# Set up everything else than corosync. Once the new nodes are present
# in corosync.conf, they're considered part of a cluster and the node add
# command cannot be run again. So we need to minimize the amount of actions
# (and therefore possible failures) after adding the nodes to corosync.
Expand Down
Loading
Loading