-
Notifications
You must be signed in to change notification settings - Fork 83
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
Automation for CEPH-83584085: Live migration of raw data format #4487
base: main
Are you sure you want to change the base?
Conversation
out = rbd_op.image_usage(**image_config) | ||
image_data = out[0] | ||
image_size = image_data.split("\n")[1].split()[3].strip() + "G" | ||
log.info(f"Image size captured : {image_size}") |
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.
should we not check the disk usage of the target pool here instead of the source pool. source pool is not relevant here as we created source pool only to export it as a file which we want to migrate to the target pool.
Also , we should validating the size of the target image with the size of the exported file.
"image_spec": f"{pool}/{image}", | ||
"rbd": rbd, | ||
"client": kw["client"], | ||
"file_path": f"/tmp/{random_string(len=3)}", |
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.
Ideally, we should check the consistency against the exported file 'raw_file' we created(which we migrated) in line 118 rather than the source image. the current implementation misleads, though it passes data consistency check, because no further IO was done on the image during the whole process.
In such case, we cannot use 'check_data_integrity'. You may get md5sum separately for the file and the target image and then 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.
Due to different file formats of image and raw file, md5sum does not match. Even Sunil has tried the same in his automation
if err: | ||
return 1 | ||
|
||
# Check migrated image metadata using rbd info |
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.
any code missing? or this comment may be removed
|
||
kw["client"] = client | ||
rbd = rbd_obj.get("rbd") | ||
rbd_op = Rbd(client) |
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.
this line is redundant as 'rbd_op' is same as 'rbd' in the above line. you can use 'rbd' in line 139 instead of 'rbd_op'
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
"This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes?" |
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.
Please avoid using fstring
in log
statements. We have introduced log filters for masking sensitive data.
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.
It's single ceph cluster migration,
Please add these tests in quincy and reef suites as well.
image_config = {"image-spec": image_spec} | ||
out = rbd_op.image_usage(**image_config) | ||
image_data = out[0] | ||
image_size = image_data.split("\n")[1].split()[3].strip() + "G" |
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.
If we pass IO in 100M
adding G
at the end wrong please take the image size along with data units from rbd du output, even I noticed this issue recently.
image_data = out[0] | ||
image_size = image_data.split("\n")[1].split()[3].strip() + "G" | ||
log.info(f"Image size captured : {image_size}") | ||
if image_size == "0G": |
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.
compare the data size before migration and after migration.
return 0 | ||
|
||
|
||
def run_prepare_execute_commit(rbd, pool, image, **kw): |
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.
can we add this method in worflow so that it can be reused for other tests.
Signed-off-by: Aarti Sharma <[email protected]>
Pass logs: http://magna002.ceph.redhat.com/cephci-jenkins/cephci-run-NMV72J