Restart rbd-target-api failed when disk does not have owner
- Dominant language
- Python
- Stars
- 68
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Description
```
o- / ......................................................................................................................... [...]
o- cluster ......................................................................................................... [Clusters: 1]
| o- ceph .......................................................................................................... [HEALTH_WARN]
| o- pools .......................................................................................................... [Pools: 5]
| | o- device_health_metrics .................................................... [(x1), Commit: 0.00Y/96235M (0%), Used: 0.00Y]
| | o- images .................................................................. [(x1), Commit: 0.00Y/96235M (0%), Used: 16128K]
| | o- rbd ........................................................................ [(x1), Commit: 0.00Y/96235M (0%), Used: 64K]
| | o- vms ........................................................................ [(x1), Commit: 0.00Y/96235M (0%), Used: 64K]
| | o- volumes ...................................................................... [(x1), Commit: 3G/96235M (3%), Used: 320K]
| o- topology ................................................................................................ [OSDs: 1,MONs: 1]
o- disks .......................................................................................................... [3G, Disks: 3]
| o- volumes ...................................................................................................... [volumes (3G)]
| o- volume-54d959c4-347b-4173-9017-4098ecc9bcb0 .................... [volumes/volume-54d959c4-347b-4173-9017-4098ecc9bcb0 (1G)]
| o- volume-73473fa5-a9f6-49fc-81f7-cc097af0ce6d .................... [volumes/volume-73473fa5-a9f6-49fc-81f7-cc097af0ce6d (1G)]
| o- volume-8a827b7d-f6f3-4687-8cea-24f4dd670a31 .................... [volumes/volume-8a827b7d-f6f3-4687-8cea-24f4dd670a31 (1G)]
o- iscsi-targets ............................................................................... [DiscoveryAuth: None, Targets: 1]
o- iqn.1993-08.org.opendev:01:a9aa4032d2c1 ........................................................... [Auth: None, Gateways: 1]
o- disks .......................................................................................................... [Disks: 3]
| o- volumes/volume-54d959c4-347b-4173-9017-4098ecc9bcb0 .......................................... [Owner: localhost, Lun: 2]
| o- volumes/volume-73473fa5-a9f6-49fc-81f7-cc097af0ce6d ................................................... [Owner: , Lun: 1]
| o- volumes/volume-8a827b7d-f6f3-4687-8cea-24f4dd670a31 .......................................... [Owner: localhost, Lun: 0]
o- gateways ............................................................................................ [Up: 1/1, Portals: 1]
| o- localhost ........................................................................................ [192.168.122.184 (UP)]
o- host-groups .................................................................................................. [Groups : 0]
o- hosts ....................................................................................... [Auth: ACL_ENABLED, Hosts: 1]
o- iqn.1993-08.org.debian:01:8a7fa9c0e017 ....................................................... [Auth: CHAP, Disks: 2(2G)]
o- lun 0 ..................................... [volumes/volume-8a827b7d-f6f3-4687-8cea-24f4dd670a31(1G), Owner: localhost]
o- lun 1 .............................................. [volumes/volume-73473fa5-a9f6-49fc-81f7-cc097af0ce6d(1G), Owner: ]
/> cd iscsi-targets/iqn.1993-08.org.opendev:01:a9aa4032d2c1/
/iscsi-target...:a9aa4032d2c1> cd disks/
/iscsi-target...032d2c1/disks> ls
o- disks ................................................................................................................ [Disks: 3]
o- volumes/volume-54d959c4-347b-4173-9017-4098ecc9bcb0 ................................................ [Owner: localhost, Lun: 2]
o- volumes/volume-73473fa5-a9f6-49fc-81f7-cc097af0ce6d ......................................................... [Owner: , Lun: 1]
o- volumes/volume-8a827b7d-f6f3-4687-8cea-24f4dd670a31 ................................................ [Owner: localhost, Lun: 0]
```
Some time in the intermediate state, the disk does not have owner.
At this stage if we restart rbd-target-api, it will fail when define_target -> bind_alua_group_to_lun.
The access to "owning_gw = disk_config['owner']" at target.py L423 will fail.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at target.py line 423, in bind_alua_group_to_lun, where the issue reports that accessing disk_config['owner'] fails when the disk has no owner. The issue gives no test file or test command; done means rbd-target-api can restart and define the target in this ownerless-disk state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100