RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1024492 - pcs should handle full cluster config backup/restore
Summary: pcs should handle full cluster config backup/restore
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 1111381 1113520 1129859 1138242 1281408
TreeView+ depends on / blocked
 
Reported: 2013-10-29 19:03 UTC by Fabio Massimo Di Nitto
Modified: 2016-10-26 15:07 UTC (History)
6 users (show)

Fixed In Version: pcs-0.9.126-1.el7
Doc Type: Enhancement
Doc Text:
Feature: Provide an easy way to backup and restore cluster configuration across the cluster. Reason: Backup and restore of the cluster configuration files on all nodes is a non-trivial task. Result: User is able to backup and restore the cluster configuration files easily.
Clone Of:
: 1129859 1138242 (view as bug list)
Environment:
Last Closed: 2015-03-05 09:18:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (23.81 KB, patch)
2014-09-03 12:46 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1165803 0 low CLOSED pcs CLI should recognize and act upon "fail due to lack of authentication" state if/as suitable (e.g. for "pcs config re... 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2015:0415 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2015-03-05 14:16:41 UTC

Internal Links: 1165803

Description Fabio Massimo Di Nitto 2013-10-29 19:03:33 UTC
in several different cases, it should be possible to backup and restore a full cluster configuration without the need to re-input everything manually.

pcs cluster config

does indeed show the configuration but it's not re-usable format such as copy/paste or re-import.

pcs cluster backup <file>

should generate a tarball with corosync.conf from all nodes and CIB and a version.txt (to contain the version format of this tarball file, in case we need to expand/extend what's contained in the tarball)

pcs cluster restore <file>

should work only if cluster is not running.
if we are restoring from a version < than the one we support then warn
if we restore from a version > than we support then fail

Comment 5 Tomas Jelinek 2014-09-03 12:46:04 UTC
Created attachment 934080 [details]
proposed fix

test:

1. check cluster status
pcs status
2. backup the config files
pcs config backup mybackup.tar.bz2
3. destroy the cluster
pcs cluster destroy --all
4. restore the config files
pcs config restore mybackup.tar.bz2
5. start the cluster
pcs cluster start --all
6. check cluster status and verify it is the same as it was before cluster destruction
pcs status

Comment 7 Tomas Jelinek 2014-09-11 12:59:46 UTC
Before Fix:
[root@rh70-node1 ~]# rpm -q pcs
pcs-0.9.115-32.el7.x86_64
[root@rh70-node1 ~]# pcs config backup
{prints cluster configuration}
[root@rh70-node1 ~]# pcs config restore
{prints cluster configuration}

After Fix:
[root@rh70-node1 ~]# rpm -q pcs
pcs-0.9.126-1.el7.x86_64
[root@rh70-node1 ~]# pcs status nodes both
Corosync Nodes:
 Online: rh70-node1 rh70-node2 
 Offline: 
Pacemaker Nodes:
 Online: rh70-node1 rh70-node2 
 Standby: 
 Offline: 
[root@rh70-node1 ~]# pcs status resources
 dummy  (ocf::heartbeat:Dummy): Started 
[root@rh70-node1 ~]# pcs config backup test.tar.bz2
[root@rh70-node1 ~]# pcs cluster destroy --all
rh70-node1: Successfully destroyed cluster
rh70-node2: Successfully destroyed cluster
[root@rh70-node1 ~]# pcs cluster start --all
Error: Unable to read /etc/corosync/corosync.conf: No such file or directory
[root@rh70-node1 ~]# pcs config restore test.tar.bz2
rh70-node1: Succeeded
rh70-node2: Succeeded
[root@rh70-node1 ~]# pcs cluster start --all
rh70-node1: Starting Cluster...
rh70-node2: Starting Cluster...
[root@rh70-node1 ~]# pcs status nodes both
Corosync Nodes:
 Online: rh70-node1 rh70-node2 
 Offline: 
Pacemaker Nodes:
 Online: rh70-node1 rh70-node2 
 Standby: 
 Offline: 
[root@rh70-node1 ~]# pcs status resources
 dummy  (ocf::heartbeat:Dummy): Started

Comment 11 errata-xmlrpc 2015-03-05 09:18:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0415.html


Note You need to log in before you can comment on or make changes to this bug.