Project

General

Profile

Actions

Bug #55094

closed

quincy: ceph rbd mirror snapshot schedule status fails to match level spec

Added by John Mulligan about 2 years ago. Updated almost 2 years ago.

Status:
Duplicate
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
Yes
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

This appears to be a regression on ceph quincy:

Issuing a `ceph rbd mirror snapshot schedule status` works but `ceph rbd mirror snapshot schedule status rbd/img1` does not. The given schedule does exist. The issues appears to be with the level spec matching code.

[root@test_ceph_a go-ceph]# ceph rbd mirror snapshot schedule status {
"scheduled_images": [ {
"image": "rbd/img1",
"schedule_time": "2022-03-29 00:00:00"
}
]
}
```
2022-03-28T17:46:31.763+0000 7f2230eb6700 0 log_channel(audit) log [DBG] : from='client.4312 -' entity='client.admin' cmd=[{"prefix": "rbd mirror snapshot schedule status", "target": ["mon-mgr", ""]}]: dispatch
2022-03-28T17:46:31.763+0000 7f2230eb6700 0 log_channel(audit) log [DBG] : from='client.4312 -' entity='client.admin' cmd=[{"prefix": "rbd mirror snapshot schedule status", "target": ["mon-mgr", ""]}]: dispatch
2022-03-28T17:46:31.764+0000 7f22306b5700 0 [rbd_support DEBUG root] status: level_spec=
2022-03-28T17:46:31.764+0000 7f22306b5700 0 [rbd_support DEBUG root] status: level_spec=
```

[root@test_ceph_a go-ceph]# ceph rbd mirror snapshot schedule status rbd/img1 {
"scheduled_images": []
}
2022-03-28T17:44:13.554+0000 7f2230eb6700 0 log_channel(audit) log [DBG] : from='client.4296 -' entity='client.admin' cmd=[{"format":"json","interval":"1d","level_spec":"rbd/img1","prefix":"rbd mirror snapshot schedule add"}]: dispatch
2022-03-28T17:44:13.561+0000 7f22306b5700 0 [rbd_support DEBUG root] add_schedule: level_spec=rbd/img1, interval=1d, start_time=None
2022-03-28T17:44:13.561+0000 7f22306b5700 0 [rbd_support DEBUG root] schedule image 9//10c5dcebc9be at 2022-03-29 00:00:00
2022-03-28T17:44:13.562+0000 7f2230eb6700 0 log_channel(audit) log [DBG] : from='client.4296 -' entity='client.admin' cmd=[{"format":"json","level_spec":"rbd/img1","prefix":"rbd mirror snapshot schedule status"}]: dispatch
2022-03-28T17:44:13.568+0000 7f22306b5700 0 [rbd_support DEBUG root] status: level_spec=rbd/img1
2022-03-28T17:44:13.941+0000 7f21fca88700 0 [rbd_support DEBUG root] TaskHandler: tick

I added some log lines to the mgr module to try and see what didn't match. The result:

[root@test_ceph_a go-ceph]# ceph rbd mirror snapshot schedule status rbd/img1 {
"scheduled_images": []
}

```
2022-03-28T18:04:26.647+0000 7f61ffe89700 0 log_channel(audit) log [DBG] : from='client.4351 -' entity='client.admin' cmd=[{"prefix": "rbd mirror snapshot schedule status", "level_spec": "rbd/img1", "target": ["mon-mgr", ""]}]: dispatch
2022-03-28T18:04:26.653+0000 7f61f7688700 0 [rbd_support DEBUG root] status: level_spec=rbd/img1
2022-03-28T18:04:26.654+0000 7f61f7688700 0 [rbd_support DEBUG root] level_spec: <rbd_support.schedule.LevelSpec object at 0x7f61c71f09b0> (9, '', '10d556bbaa01')
2022-03-28T18:04:26.654+0000 7f61f7688700 0 [rbd_support DEBUG root] in: ('9', '', '10d556bbaa01')
```

The line with the string "level_spec:" is showing the level spec repr and the pertinent fields.
The line with the string "in:" shows the args passed to the `match` method.
As you can see the type of the pool_id on the first line is an integer. The type of the pool_id on the next line is a str. I believe this type mismatch is why passing a levelspec as the argument fails to produce the desired results.

This issues is causing an issue with the CI test suite for go-ceph project as we try to add quincy to our supported ceph versions. Please let me know if have any additional questions.


Related issues 1 (0 open1 closed)

Is duplicate of rbd - Bug #53915: rbd snapshot schedule status output is missing scheduleResolvedSunny Kumar

Actions
Actions #1

Updated by John Mulligan about 2 years ago

For the record. The lines I added to the code to see the issue:

Original line, directly prior to my additions:


                    if not level_spec.matches(pool_id, namespace, image_id):

Added lines:

                        self.log.debug("level_spec: %r (%r, %r, %r)", level_spec, level_spec.pool_id, level_spec.namespace, level_spec.image_id)
                        self.log.debug("in: (%r, %r, %r)", pool_id, namespace, image_id)

Actions #2

Updated by Ilya Dryomov about 2 years ago

  • Assignee set to Ilya Dryomov

Hi John,

This was fixed in https://github.com/ceph/ceph/pull/45149 (backported to quincy in https://github.com/ceph/ceph/pull/45273). Are you able to test against the tip of the quincy branch?

Actions #3

Updated by John Mulligan about 2 years ago

Thanks for the update. I did try to look for existing issues, but may have just missed it.

I'll try to see if I can build our test containers from the quay.ceph.io registry rather than quay.io/ceph/ceph as I think that the quincy branch on quay.ceph.io is "fresher" than the one on quay.io.

Actions #4

Updated by Ilya Dryomov almost 2 years ago

  • Status changed from New to Need More Info

Hi John,

Any update? Quincy is out so it should be much easier to verify now.

Actions #5

Updated by John Mulligan almost 2 years ago

Sorry for the late reply. I think that yes, this may now be resolved with the current quincy image. I'm going to re-run our CI job with the test reenabled a few times, but if you don't hear back from me by tomorrow, let's assume everything is working now. Thanks!

Actions #6

Updated by Ilya Dryomov almost 2 years ago

  • Status changed from Need More Info to Duplicate
Actions #7

Updated by Ilya Dryomov almost 2 years ago

  • Is duplicate of Bug #53915: rbd snapshot schedule status output is missing schedule added
Actions

Also available in: Atom PDF