Can't remove an environment if package no longer exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Murano |
Won't Fix
|
High
|
Unassigned |
Bug Description
NOTE: Current behaviuor of the bug changed. An error still occurs, but the env is deleted (without deleteing the stack or calling any destroy() methods)
To reproduce:
* Upload a package
* Deploy it in an environment
* Delete the package
* Try to delete the environment
Deletion fails because the engine tries to load the package. In this circumstance I don't think it makes sense to fail; if the package is gone, we can't do any cleanup because we don't know what to do, but we should still allow the environment to be deleted i think.
Some things that could also mitigate this:
* issue a warning when deleting in-use packages
* disallow deletion for in-use packages (this is probably not what we want, especially for public ones)
* as a last ditch resort, delete the heat stack (maybe add a 'force' flag to indicate that potentially there are things that won't get cleaned up)
Related blueprint: https:/
Changed in murano: | |
importance: | Undecided → High |
Changed in murano: | |
status: | New → Confirmed |
Changed in murano: | |
milestone: | none → liberty-1 |
description: | updated |
The problem here is that engine just cannot load object model because it references classes that just became unknown. The same would happen if you try to redeploy environment after deletion of some packages. In this case you don't even get to executing Environment's destroy method. I don't see how this can be fixed now. Deletion of environment is just like any other action and you just cannot even start executing MuranoPL code because it cannot be loaded. Even the Environment (Core library) itself may be missing. And even if engine would have some built-in knowledge on environment deletion it will not know what to do in that case because there may be more than one Heat stack somewhere within environment and there might be some additional cleanup actions required. All your packages including core library are black boxes to engine so it cannot even know about Heat stacks.
Possible solution would be to have shadow copy of packages + package versioning so that even if you delete a package that would mean you cannot instantiate new applications but not that are environments become invalid. I'm sure even in Heat you would not be able to delete stack if it uses resource types that are no longer available (say plugin was not loaded)