Support for partition preservation.
Currently Fuel performs full re-provisioning while performing rollback which implies data deletion. For instance, it doesn’t preserve virtual machine image files, compute node log files, database files. That said it loses valuable data during rollback. So operator has to manually backup valuable data before rollback.
The idea is to preserve certain partitions on the nodes during rollback while fully reformat others. For instance, keep partition /var/lib/nova/instances intact but create filesystem on / (root) from the scratch.
On data preservation following use cases were identified: 1) keep Ceph data 2) keep Swift data 3) keep Nova instances cache 4) keep DB/logs/other custom partition types
First off, here’s how partitioning in Fuel 6.x works right now. There are two components - VolumeManager (on nailgun’s side) and Fuel agent (a process inside bootstrap OS). Fuel agent is quite straightforward - it just executes orders from VolumeManager. Fuel agent knows nothing about partitioning layout, it doesn’t contain any business logic. So it is VolumeManager which contains that business logic.
The idea of Rollback Paritition Preservation is to keep data (vm images, logs, db files, etc) during reprovisioning. So in terms of partitioning instead of fully deleting partitions and creating a new partition table Fuel will preserve data on some specific partitions (not all) while it still will reformat others (like root partition).
Preserved partition must be located as separate mountpoints Mountpont should be added to the openstack.yaml in case when specific mountpoint doesn’t exist
Workflow will be as following:
Add ‘keep’ or similar boolean flag to node disks settings in Nailgun API (i.e. disks.yaml):
fuel node --node 1 --disk --download
cat node_1/disks.yaml - 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: sda size: 101836 volumes: - name: os size: 101836 keep: true
then upload modified disk.yaml
fuel node --node 1 --disk --upload
Mcollective agent (erase_node.rb module in Mcollective) should be modified to disable erasing partitions with ‘keep: True’ when node is deleted from environment.
Fuel agent should be modified to be able to preserve partition
Fuel agent should save partition table if there is a partition with ‘keep’ flag set into true. On the Nailgun side all changes and operations of partition table should be not be accessible.
Not preserved partition should be erased using new File System.
In context of this blueprint VolumeManager will be modified in order to handle new partition preservation parameter. Also, Fuel agent will be potentially changed, but those changes will be minor. In addition to VolumeManager and Fuel agent there will be small changes in nailgun in order to pass keep flag (disk.yam) to VolumeManager.
The alternative approach would be copying valuable data back and forth before and after the rollback. But that would drastically increase time needed for rollback.
As this blueprint is all about adding new configurable behaviour to node reinstallation feature - it introduces parameter to disk.yaml to REST API which performs default value as False.
This feature allows to speed up upgrade process of Compute and Storage nodes due to no need to move huge amount of data. This helps to minimize impact of upgrade procedure on end user workloads running in the cloud.
Partition preservation must be disabled when node is being decommissioned from environment. Otherwise, user data remaining on preserved partitions can pose a security risk.
This blueprint itself is about boosting speed of rollback and migration operations
This feature can affect services which use files from preserved partition. In this case puppet manifests should be modified and conform this feature All changes for this services should be described in corresponding specs.
|Documentation:||Peter Zhurba, Dmitry Klenov|
|Reviewer:||Vladimir Kuklin, Vladimir Kozhukalov|
Reinstall single compute on HW with partition preservation:
Reinstall single controller on HW with partition preservation
Documentation should be improved with information about Partition Preservation options.