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

rbd: add snapshot count in rbd info #21292

Closed
wants to merge 1 commit into from

Conversation

zhengchengyao
Copy link
Contributor

No description provided.

@zhengchengyao
Copy link
Contributor Author

retest this please

@dillaman dillaman changed the title rbd/info: add snapshot count in rbd info rbd: add snapshot count in rbd info Apr 9, 2018
Copy link

@dillaman dillaman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will also need to update [1] since the output of rbd info has changed.

[1] https://github.com/ceph/ceph/blob/master/src/test/cli-integration/rbd/formatted-output.t

std::vector<librbd::snap_info_t> snaps;
int r, r1;

r1 = image.snap_list(snaps);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: no need for a new r1 variable

Copy link

@dillaman dillaman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dillaman
Copy link

dillaman commented Apr 9, 2018

@zy751713126 Can you rebase against the latest version of the master branch and repush?

@zhengchengyao
Copy link
Contributor Author

I have rebased the latest version and repushed.
thanks,dillaman.

@dillaman
Copy link

retest this please

@zhengchengyao
Copy link
Contributor Author

retest this please

@dillaman
Copy link

[^^]+ (re)
\tblock_name_prefix: rb.0.* (glob)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: fails here

[^^]+ (re)
\tblock_name_prefix: rb.0.* (glob)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: fails here

[^^]+ (re)
\tblock_name_prefix: rbd_data.* (glob)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: fails here

@zhengchengyao
Copy link
Contributor Author

zhengchengyao commented Apr 25, 2018

@dillaman hi, dillaman, all checks of this patch have passed, could you help me merge it? thanks a lot.

@dillaman
Copy link

Signed-off-by: Zheng Yin <zhengyin@huayun.com>
@zhengchengyao
Copy link
Contributor Author

retest this please

@dillaman
Copy link

@zhengchengyao
Copy link
Contributor Author

2018-05-10T00:32:07.207 INFO:tasks.cram.client.0.smithi145.stdout:@@ -59,7 +59,7 @@
2018-05-10T00:32:07.207 INFO:tasks.cram.client.0.smithi145.stdout: \tsize 1GiB in 256 objects (esc)
2018-05-10T00:32:07.207 INFO:tasks.cram.client.0.smithi145.stdout: \torder 22 (4MiB objects) (esc)
2018-05-10T00:32:07.207 INFO:tasks.cram.client.0.smithi145.stdout: [^^]+ (re)
2018-05-10T00:32:07.207 INFO:tasks.cram.client.0.smithi145.stdout:- \tblock_name_prefix: rb.0.* (glob)
2018-05-10T00:32:07.207 INFO:tasks.cram.client.0.smithi145.stdout:+ \tblock_name_prefix: rb.0.1044.625558ec (esc)
2018-05-10T00:32:07.208 INFO:tasks.cram.client.0.smithi145.stdout: \tformat: 1 (esc)
2018-05-10T00:32:07.208 INFO:tasks.cram.client.0.smithi145.stdout: $ rbd info foo --format json | python -mjson.tool | sed 's/,$/, /'
2018-05-10T00:32:07.208 INFO:tasks.cram.client.0.smithi145.stdout: {
2018-05-10T00:32:07.208 INFO:tasks.cram.client.0.smithi145.stdout:@@ -92,7 +92,7 @@
2018-05-10T00:32:07.208 INFO:tasks.cram.client.0.smithi145.stdout: \tsize 1GiB in 256 objects (esc)
2018-05-10T00:32:07.208 INFO:tasks.cram.client.0.smithi145.stdout: \torder 22 (4MiB objects) (esc)
2018-05-10T00:32:07.208 INFO:tasks.cram.client.0.smithi145.stdout: [^^]+ (re)
2018-05-10T00:32:07.208 INFO:tasks.cram.client.0.smithi145.stdout:- \tblock_name_prefix: rb.0.* (glob)
2018-05-10T00:32:07.209 INFO:tasks.cram.client.0.smithi145.stdout:+ \tblock_name_prefix: rb.0.1044.625558ec (esc)
2018-05-10T00:32:07.209 INFO:tasks.cram.client.0.smithi145.stdout: \tformat: 1 (esc)
2018-05-10T00:32:07.209 INFO:tasks.cram.client.0.smithi145.stdout: \tprotected: False (esc)
2018-05-10T00:32:07.209 INFO:tasks.cram.client.0.smithi145.stdout: $ rbd info foo@snap --format json | python -mjson.tool | sed 's/,$/, /'
2018-05-10T00:32:07.209 INFO:tasks.cram.client.0.smithi145.stdout:# Ran 1 tests, 0 skipped, 1 failed.

hi, @dillaman , I am a newcomer,I don‘t know how to write block_name_prefix output format,could you please help me to give directions, thanks a lot.

@dillaman
Copy link

Manually merged PR after fixing test.

@dillaman dillaman closed this May 10, 2018
@dillaman
Copy link

@zy751713126 The issue was that you added block_name_prefix lines to the test when you were should have added ```snapshot_count" lines.

dillaman pushed a commit that referenced this pull request May 10, 2018
rbd: add snapshot count in rbd info

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
@zhengchengyao
Copy link
Contributor Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants