src/test: Wip rgw bilog autotrim tests#45053
src/test: Wip rgw bilog autotrim tests#45053TRYTOBE8TME wants to merge 1 commit intoceph:wip-rgw-multisite-reshardfrom
Conversation
|
Sorry, will have to close PR #44758 because of mistake done in rebasing. |
cbodley
left a comment
There was a problem hiding this comment.
i'm not sure why there are two separate test cases here?
src/test/rgw/rgw_multi/tests.py
Outdated
| # bilog showing objects after reshard | ||
| zone.zone.cluster.admin(['bilog', 'list', | ||
| '--bucket', test_bucket.name, | ||
| '--gen=1']) |
There was a problem hiding this comment.
thanks, these tests should be explicit about --gen when listing bilogs. can you please update the bilog_list() function to accept an optional gen argument, instead of making the raw call to cluster.admin() here?
and instead of hard-coding --gen=1 here, we should be using log generation numbers that we saw in bucket layout output
src/test/rgw/rgw_multi/tests.py
Outdated
| print('1.') | ||
| print(json.loads(first_check)) |
There was a problem hiding this comment.
ok, this at least prints the bucket layout output. but we really want this test to verify that the output matches the expectations i described in #44758 (comment)
so here, before the initial reshard, we should verify that the json array in logs only has a single entry
after the reshard, you can check that it has a second entry, etc
60f910d to
e96b920
Compare
src/test/rgw/rgw_multi/tests.py
Outdated
| cmd = ['bilog', 'list', '--bucket', bucket] + (args or []) | ||
| cmd += ['--tenant', config.tenant, '--uid', user.name] if config.tenant else [] | ||
| if gen: | ||
| cmd += ['--gen', gen] |
There was a problem hiding this comment.
sorry, i didn't realize this already took args = None. instead of adding another gen = None, i think it's easier for callers to just pass that as args = ['--gen', gen]. does that make sense?
There was a problem hiding this comment.
Yup, we can use that too. But wouldn't keeping gen as a separate parameter be good choice for the future tests?
There was a problem hiding this comment.
i guess it depends on what we change in the future. if we just add more arguments, it's easier to pass those in args too instead of changing this bilog_list() helper function
e96b920 to
7363681
Compare
src/test/rgw/rgw_multi/tests.py
Outdated
| # verify the bucket has empty bilog | ||
| test_bilog = bilog_list(zone.zone, test_bucket.name) | ||
| assert(len(test_bilog) == 0) |
There was a problem hiding this comment.
okay; radosgw-admin bilog list without a --gen will list the most recent generation, which is what we want to do here
however - the only time this test writes objects is during generation 0, before any reshards happen. that means that we won't write any bilog entries to later generations, so this call to bilog_list() doesn't actually verify that bilog_autotrim() did anything to this last bilog generation
can you please add some extra objects after the last reshard so that the last bilog generation isn't empty before that bilog_autotrim()?
|
can you help me understand what the two separate test cases are testing? it seems like we could just combine them into a single test |
7363681 to
faab6a7
Compare
So, basically what I'm thinking is If you want we can combine these into one or should we keep it separate? |
if the tests are performing the same operations (uploads, reshards) but checking different things (bucket layout, bi list), they should just be one test that does all of those checks |
faab6a7 to
539d3a3
Compare
539d3a3 to
60b47b2
Compare
60b47b2 to
3a1b604
Compare
|
@cbodley and @adamemerson can any one of you please do a final review? |
cbodley
left a comment
There was a problem hiding this comment.
looks good, it's passing for me. can you please squash the commits? then i'll merge it into wip-rgw-multisite-reshard
This test includes checking radosgw-admin bucket layout command along with bilog autrotrim on a resharded bucket. Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
3a1b604 to
35737fa
Compare
|
thanks @TRYTOBE8TME, nice work. merged into wip-rgw-multisite-reshard |
|
seeing this test fail a lot on wip-rgw-multisite-reshard: |
I'll take a look at it. |
|
i rebuilt the latest wip-rgw-multisite-reshard today, and haven't been able to reproduce that failure ¯\_(ツ)_/¯ |
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox