Hide Forgot
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
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
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
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