Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aarsharm
Copy link
Contributor

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}")

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)}",

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.

Copy link
Contributor Author

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

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)

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'

@openshift-merge-robot
Copy link
Contributor

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.

Copy link
Contributor

mergify bot commented Mar 2, 2025

"This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes?"

Copy link
Contributor

@psathyan psathyan left a 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.

https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/logging-fstring-interpolation.html

Copy link
Contributor

@sunilangadi2 sunilangadi2 left a 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"
Copy link
Contributor

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":
Copy link
Contributor

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):
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase RBD Rados Bock Device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants