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

Also available in: Atom PDF