From 0c969f766d6a4adb924d74e7632cc707ed23d031 Mon Sep 17 00:00:00 2001 From: jiaopengju Date: Tue, 23 Jul 2019 21:51:50 +0800 Subject: [PATCH] Add support for image boot server backup with data Change-Id: I39e14354aa5e3c48becc4ba04054d9010345ceaf Story: 1712059 Task: 33997 --- .../image-boot-server-backup-with-data.rst | 135 ++++++++++++++++++ doc/source/specs/index.rst | 1 + 2 files changed, 136 insertions(+) create mode 100644 doc/source/specs/image-boot-server-backup-with-data.rst diff --git a/doc/source/specs/image-boot-server-backup-with-data.rst b/doc/source/specs/image-boot-server-backup-with-data.rst new file mode 100644 index 00000000..3c49ee0e --- /dev/null +++ b/doc/source/specs/image-boot-server-backup-with-data.rst @@ -0,0 +1,135 @@ +.. + This work is licensed under a Creative Commons Attribution 3.0 Unported + License. + + http://creativecommons.org/licenses/by/3.0/legalcode + +================================== +Image boot server backup with data +================================== + +https://storyboard.openstack.org/#!/story/1712059 + +Problem description +=================== + +Currently, we only protect the original images when protecting image boot +servers. Original images means that the data that generated by the users after +the servers has been created is not included. So when restore it from the +backup, a new server with same original image will be created, but users' data +was not included. In some of our product environment, we use image boot +instance, fox example using distributed file system or DRBD as the backend. +So IMO, this is not suitable and we should protect the users' data as well. + +I suggest adding 'image-create' step before doing image backup and using the +new created image id as the backup image id when the image backup is the child +resource in doing server backup. + +Use Cases +========= + +As explained, users may use distributed file system or DRBD as their backend +for booting servers. + +Proposed change +=============== + +Image Protectable Plugin: +When return a protectable instance, a new field would be added to extra-info. +This field must be in the format of:: + + { + "server_id": "value1", + } + +This can tell the image protection plugin the id of the parent server and do +special treatment. + +Image Protection Plugin: +Add a new configuration named 'enable_server_snapshot' to enable create a +snapshot of the server if the resource contains extra_info and the server_id +in extra_info is valid. Then using the new created image id replace with the +resource id and do the final backup. + +Alternatives +------------ + +Do nothing, this is not a mission critical feature. + +Data model impact +----------------- + +None. + +REST API impact +--------------- + +None + +Security impact +--------------- + +None + +Notifications impact +-------------------- + +None + +Other end user impact +--------------------- + +None + +Performance Impact +------------------ + +The image protection plugin may become slower because new step added. + +Other deployer impact +--------------------- + +The default configuration value of 'enable_server_snapshot' is True, users can +set it to False to disable this feature. + +Developer impact +---------------- + +None + + +Implementation +============== + +Assignee(s) +----------- +Pengju Jiao (jiaopengju@cmss.chinamobile.com) + +Work Items +---------- + +* Add extra_info in getting instances. +* Update the image protection plugin to support doing snapshot in protection. + +Dependencies +============ + +None + + +Testing +======= + +Unit tests in Karbor. + + +Documentation Impact +==================== + +New docs to explain how to use and configure the new added options. + + +References +========== + +None diff --git a/doc/source/specs/index.rst b/doc/source/specs/index.rst index 28dd38b1..09d740cc 100644 --- a/doc/source/specs/index.rst +++ b/doc/source/specs/index.rst @@ -41,6 +41,7 @@ Approved Specs checkpoint-copy-api api-json-schema-validation quotas + image-boot-server-backup-with-data Spec Template -------------