-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(backing encryption): backing image encryption support #251
feat(backing encryption): backing image encryption support #251
Conversation
This pull request is now in conflict. Could you fix it @ChanYiLin? 🙏 |
0fd024b
to
8634f3f
Compare
Fixed. |
8634f3f
to
eb5b2e4
Compare
This pull request is now in conflict. Could you fix it @ChanYiLin? 🙏 |
@ChanYiLin Is it ready for review? |
Yes it is ready for review. |
pkg/sync/sync_file.go
Outdated
if imgInfo.Format == "qcow2" { | ||
tmpRawFile := fmt.Sprintf("%v-raw.tmp", sourceFile) | ||
if err := util.ConvertFromQcow2ToRaw(sourceFile, tmpRawFile); err != nil { | ||
return 0, errors.Wrapf(err, "failed to create raw image from qcow2 image %v", sourceFile) | ||
} | ||
// use the raw image as source when doing encryption | ||
sourceFile = tmpRawFile | ||
defer os.RemoveAll(tmpRawFile) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any progress for the image conversion, right?
Can we create a ticket for exposing the progress?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wonder how do we get the progress of the conversion
if _, err := Execute([]string{}, QemuImgBinary, "convert", "-f", "qcow2", "-O", "raw", sourcePath, targetPath); err != nil {
return err
}
The conversion is part of the backing image preparation
But the current progress is about 100% data copying
how do we define and integrate the progress of conversion into data copying?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simple example
0-20%: image conversion
20-80%: encryption or decryption
3bccfd1
to
a3e46ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
a3e46ee
to
1b6e8bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ref: longhorn/longhorn 7051 Signed-off-by: Jack Lin <[email protected]>
1b6e8bb
to
dd3736d
Compare
ref: longhorn/longhorn#7051
Check the LEP here: longhorn/longhorn#8740