fuel-docs/userdocs/fuel-user-guide/maintain-environment/rollback-ug.rst
Svetlana Karslioglu fcf37efa9d Move the Fuel User Guide
Moved the Fuel User Guide from mos-docs to fuel-docs

Change-Id: I6af03f656e9ed040776e8930f28cb55b8a29c488
2016-04-04 14:23:35 -07:00

5.0 KiB

Rollback

You can use the rollback feature to return a node to its original state (e.g. the state before the node failed). This can be used to revert changes during a failed upgrade or other node malfunction.

The rollback is done in two major steps:

  1. Partition preservation -- prevent the node redeployment process from deleting data on the partition. This way you will not have to manually back up and restore the data to perform the rollback.
  2. Node reinstallation -- restore the node to its original state.

Partition preservation

With partition preservation you can keep any type of data that meets the following criteria:

  • The data is stored on a dedicated partition.
  • The partition is not a root partition. (The root partition is always erased during deployment).

The following data types are a good example of what can be preserved:

  • Ceph data
  • Swift data
  • Nova instances cache
  • Database, custom partition types

Note

Do not change the partition size as this will make the the rollback impossible.

  1. On the Fuel Master node, dump the disks information:

    fuel node --node-id <NODE_ID> --disk --download

    where <NODE_ID> points to a specific node identified by its ID (a number) that you can get by issuing the fuel nodes command.

    For example:

    fuel node --node-id 1 --disk --download
  2. Edit the /root/node_1/disks.yaml file to enable partition preservation by using the keep_data: true flag. Also note that all partitions with the same name need to have the same flag value.

    Example of the flag in a disks.yaml file:

    - extra:
       - disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001
       - disk/by-id/ata-QEMU_HARDDISK_QM00001
       id: disk/by-path/pci-0000:00:01.1-scsi-0:0:0:0
       name: sdc
       size: 101836
       volumes:
       - name: mysql
         size: 101836
         keep_data: true
  3. Upload the modified file:

    fuel node --node-id <NODE_ID> --disk --upload

    where <NODE_ID> points to a specific node identified by its ID (a number) that you can get by issuing the fuel nodes command.

    For example:

    fuel node --node-id 1 --disk --upload

Node reinstallation

  1. On the Fuel Master node, issue the following command to reprovision the node:

    fuel node --node-id <NODE_ID> --provision

    where <NODE_ID> points to a specific node identified by its ID (a number) that you can get by issuing the fuel nodes command.

    For example:

    fuel node --node-id 1 --provision
  2. Then issue the following command to redeploy the node:

    fuel node --node-id <NODE_ID> --deploy

    where <NODE_ID> points to a specific node identified by its ID (a number) that you can get by issuing the fuel nodes command.

Virt role reinstallation

Follow the steps below to reinstall the virt role if you have the Reduced Footprint feature enabled.

  1. On the Fuel Master node, dump the disks information:

    fuel node --node-id <NODE_ID> --disk --download

    where <NODE_ID> points to the node with virt role identified by its ID (a number) that you can get by issuing the fuel nodes command. For example:

    fuel node --node-id 1 --disk --download
  2. Edit the /root/node_1/disks.yaml file to enable the partition preservation of the volume with vm name using the keep_data: true flag of the corresponding volumes. Note that all partitions with the same name need to have the same flag value.

    Example of the flag in a disks.yaml file:

    - extra:
      - disk/by-id/wwn-0x5000c5007a287855
      - disk/by-id/scsi-SATA_ST2000DM001-1ER_Z4Z1WH2V
      - disk/by-id/ata-ST2000DM001-1ER164_Z4Z1WH2V
      id: disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0
      name: sda
      size: 1907037
      volumes:
      - keep_data: false
        name: os
        size: 67584
      - keep_data: false
        name: cinder
        size: 919726
      - keep_data: true
        name: vm
        size: 919727
  3. Upload the modified file:

    fuel node --node-id <NODE_ID> --disk --upload

    where <NODE_ID> points to a specific node identified by its ID (a number) that you can get by issuing the fuel nodes command.

    For example:

    fuel node --node-id 1 --disk --upload
  4. On the Fuel Master node, reprovision the node:

    fuel node --node-id <NODE_ID> --provision

    where <NODE_ID> points to a specific node identified by its ID (a number) that you can get by issuing the fuel nodes command.

    For example:

    fuel node --node-id 1 --provision
  5. Provision the bare-metal node with the virtual role and spawn virtual machines:

    fuel2 env spawn-vms <CLUSTER_ID>

    For example:

    fuel2 env spawn-vms 1
  6. Redeploy the spawned node:

    fuel node --node-id <NODE_ID> --deploy

    where <NODE_ID> points to a specific node identified by its ID (a number) that you can get by issuing the fuel nodes command.