Fix server delete attempt along with share net deletion
This bug was introduced when manage/unmange servers with DHSS=True
was merged. This behavior is expected except in two scenarios:
1. If the share server was managed;
2. If any share belonging to this share server was unmanaged;
In both cases, the `is_auto_deletable` field is set to False. This
field was added to prevent the share server from being deleted by
the periodic cleanup job.
This patch fixes the bug by checking the `is_auto_deletable` field
when the share network deletion triggers the share server deletion.
Reviewed: https:/ /review. openstack. org/644560 /git.openstack. org/cgit/ openstack/ manila/ commit/ ?id=f4fc7aa08a8 b2d4e7bba02af49 bd84ea30d2fcac
Committed: https:/
Submitter: Zuul
Branch: master
commit f4fc7aa08a8b2d4 e7bba02af49bd84 ea30d2fcac
Author: silvacarloss <email address hidden>
Date: Mon Mar 18 14:14:51 2019 -0300
Fix server delete attempt along with share net deletion
This bug was introduced when manage/unmange servers with DHSS=True
was merged. This behavior is expected except in two scenarios:
1. If the share server was managed;
2. If any share belonging to this share server was unmanaged;
In both cases, the `is_auto_deletable` field is set to False. This
field was added to prevent the share server from being deleted by
the periodic cleanup job.
This patch fixes the bug by checking the `is_auto_deletable` field
when the share network deletion triggers the share server deletion.
APIImpact
Change-Id: Ib83b8222100fd5 a3d718ad2cb7887 b1d79ebd546 8d3cbdae2c1735e 266e75a70d3
Depends-On: I7d330b8b5fb3f0
Closes-bug: #1820118