Fix Murano delete environment
Environment is deleted instatly from murano DB after delete API
request is finished:
0ced007109/murano/api/v1/environments.py (L158-L173)
It means next thing:
* We shouldn't use wait_for in this case
* We should use SynchronizedDeletion in resource cleanup
* We shouldn't make hacks in get_status() to make this work
This patch cleans up conf options as well
Change-Id: Ib495afc79229ab0bb9f9eb40388c00a618b84cb1
This commit is contained in:
parent
d0e2847946
commit
e29eb8a8e4
@ -265,18 +265,10 @@
|
|||||||
# (floating point value)
|
# (floating point value)
|
||||||
#manila_share_delete_poll_interval = 2.0
|
#manila_share_delete_poll_interval = 2.0
|
||||||
|
|
||||||
# A timeout in seconds for an environment delete (integer value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/delete_environment_timeout
|
|
||||||
#murano_delete_environment_timeout = 180
|
|
||||||
|
|
||||||
# A timeout in seconds for an environment deploy (integer value)
|
# A timeout in seconds for an environment deploy (integer value)
|
||||||
# Deprecated group/name - [DEFAULT]/deploy_environment_timeout
|
# Deprecated group/name - [DEFAULT]/deploy_environment_timeout
|
||||||
#murano_deploy_environment_timeout = 1200
|
#murano_deploy_environment_timeout = 1200
|
||||||
|
|
||||||
# Delete environment check interval in seconds (integer value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/delete_environment_check_interval
|
|
||||||
#murano_delete_environment_check_interval = 2
|
|
||||||
|
|
||||||
# Deploy environment check interval in seconds (integer value)
|
# Deploy environment check interval in seconds (integer value)
|
||||||
# Deprecated group/name - [DEFAULT]/deploy_environment_check_interval
|
# Deprecated group/name - [DEFAULT]/deploy_environment_check_interval
|
||||||
#murano_deploy_environment_check_interval = 5
|
#murano_deploy_environment_check_interval = 5
|
||||||
|
@ -31,15 +31,9 @@ from rally.task import utils
|
|||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
MURANO_BENCHMARK_OPTS = [
|
MURANO_BENCHMARK_OPTS = [
|
||||||
cfg.IntOpt("murano_delete_environment_timeout", default=180,
|
|
||||||
deprecated_name="delete_environment_timeout",
|
|
||||||
help="A timeout in seconds for an environment delete"),
|
|
||||||
cfg.IntOpt("murano_deploy_environment_timeout", default=1200,
|
cfg.IntOpt("murano_deploy_environment_timeout", default=1200,
|
||||||
deprecated_name="deploy_environment_timeout",
|
deprecated_name="deploy_environment_timeout",
|
||||||
help="A timeout in seconds for an environment deploy"),
|
help="A timeout in seconds for an environment deploy"),
|
||||||
cfg.IntOpt("murano_delete_environment_check_interval", default=2,
|
|
||||||
deprecated_name="delete_environment_check_interval",
|
|
||||||
help="Delete environment check interval in seconds"),
|
|
||||||
cfg.IntOpt("murano_deploy_environment_check_interval", default=5,
|
cfg.IntOpt("murano_deploy_environment_check_interval", default=5,
|
||||||
deprecated_name="deploy_environment_check_interval",
|
deprecated_name="deploy_environment_check_interval",
|
||||||
help="Deploy environment check interval in seconds"),
|
help="Deploy environment check interval in seconds"),
|
||||||
@ -78,16 +72,6 @@ class MuranoScenario(scenario.OpenStackScenario):
|
|||||||
"""
|
"""
|
||||||
self.clients("murano").environments.delete(environment.id)
|
self.clients("murano").environments.delete(environment.id)
|
||||||
|
|
||||||
config = CONF.benchmark
|
|
||||||
utils.wait_for_status(
|
|
||||||
environment,
|
|
||||||
ready_statuses=["deleted"],
|
|
||||||
check_deletion=True,
|
|
||||||
update_resource=utils.get_from_manager(),
|
|
||||||
timeout=config.murano_delete_environment_timeout,
|
|
||||||
check_interval=config.murano_delete_environment_check_interval
|
|
||||||
)
|
|
||||||
|
|
||||||
@atomic.action_timer("murano.create_session")
|
@atomic.action_timer("murano.create_session")
|
||||||
def _create_session(self, environment_id):
|
def _create_session(self, environment_id):
|
||||||
"""Create session for environment with specific id
|
"""Create session for environment with specific id
|
||||||
|
@ -52,18 +52,6 @@ class MuranoScenarioTestCase(test.ScenarioTestCase):
|
|||||||
environment.id
|
environment.id
|
||||||
)
|
)
|
||||||
|
|
||||||
config = CONF.benchmark
|
|
||||||
self.mock_wait_for_status.mock.assert_called_once_with(
|
|
||||||
environment,
|
|
||||||
ready_statuses=["deleted"],
|
|
||||||
check_deletion=True,
|
|
||||||
update_resource=self.mock_get_from_manager.mock.return_value,
|
|
||||||
timeout=config.murano_delete_environment_timeout,
|
|
||||||
check_interval=config.murano_delete_environment_check_interval)
|
|
||||||
self.mock_get_from_manager.mock.assert_called_once_with()
|
|
||||||
self._test_atomic_action_timer(scenario.atomic_actions(),
|
|
||||||
"murano.delete_environment")
|
|
||||||
|
|
||||||
def test_create_session(self):
|
def test_create_session(self):
|
||||||
self.clients("murano").sessions.configure.return_value = "sess"
|
self.clients("murano").sessions.configure.return_value = "sess"
|
||||||
scenario = utils.MuranoScenario(context=self.context)
|
scenario = utils.MuranoScenario(context=self.context)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user