fix(restore): adding support to restore in an encrypted pool (#292)

Encrypted pool does not allow the volume to be pre created for the
restore purpose. Here changing the design to do the restore first
and then create the ZFSVolume object which will bind the volume
already created while doing restore.


Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
Pawan Prakash Sharma 2021-03-01 23:56:42 +05:30 committed by GitHub
parent 77e722989c
commit 6ec49df225
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 375 additions and 13 deletions

View file

@ -99,6 +99,12 @@ func (b *Builder) WithVolume(name string) *Builder {
return b
}
// WithVolSpec copies volume spec to ZFSRestore Object
func (b *Builder) WithVolSpec(vspec apis.VolumeInfo) *Builder {
b.rstr.Object.VolSpec = vspec
return b
}
// WithNode sets the node id for ZFSRestore
func (b *Builder) WithNode(node string) *Builder {
if node == "" {