ovirt_storage_domain: Improve logic for state controlling. (#46951)
This commit is contained in:
parent
9a5561da0f
commit
c3cc2ecc5b
1 changed files with 7 additions and 0 deletions
|
@ -565,6 +565,13 @@ def control_state(sd_module):
|
|||
return
|
||||
|
||||
sd_service = sd_module._service.service(sd.id)
|
||||
|
||||
# In the case of no status returned, it's an attached storage domain.
|
||||
# Redetermine the corresponding serivce and entity:
|
||||
if sd.status is None:
|
||||
sd_service = sd_module._attached_sd_service(sd)
|
||||
sd = get_entity(sd_service)
|
||||
|
||||
if sd.status == sdstate.LOCKED:
|
||||
wait(
|
||||
service=sd_service,
|
||||
|
|
Loading…
Reference in a new issue