openvstorage/alba

unlinking local backend leaks a namespace

Closed this issue · 6 comments

domsj commented

namespace with name $prefix is left behind, which keeps a preset in use

Linking a local backend to a global backend with an unsatisfied policy also puts this namespace on the local backend.
Any additional attempts to link it (even with a good preset) will not link it anymore due to the left over namespace.

@domsj could you please document the steps to workaround this for now (while it isn't fixed yet)?

domsj commented

After the unlink you can manually delete said namespace. see alba delete-namespace --help or alba proxy-delete-namespace --help.
The name of the namespace is usually (as chosen by the framework) the id of the global backend (can be retrieved with alba get-alba-id --config /abm/config/of/global/backend.

domsj commented

While trying to fix this issue I noticed that the situation is actually worse than initially reported.
We can leak many namespaces on an unlinked backend.

When unlinking a backend using the gui, this will result in calling alba purge-osd.
Purging an osd currently has the following semantics:

  • alba will forget the osd ever existed (we'll repair all data that was on it)
  • alba will not clean up data from the osd, assuming it was lost forever anyway

When purging an asd this has the desired behavior, as the framework will throw the asd away anyway.
When purging an alba-osd (local backend) this will mostly (when the local backend is not destroyed) not have the desired behaviour.

Some options:

  • purge osd should always result in cleanup => the cleanup tasks (work items) for asds will never finish
  • purge osd should do cleanup for alba-osds, not for asds => this will mostly have the desired behaviour, except in case the unlinked alba-osd is never again reachable (work items will hang ... but can be cleaned up manually)
  • keep current behaviour (purge results in no cleanup) => some namespaces will be leaked, but can be cleaned up manually)
  • others?

In case we're going for the second option: what about kinetics?

domsj commented

or should we push the problem to the user doing the unlink? (ask whether cleanup should be done on the local backend or not...)

fixed in alba-ee (>=1.5.27)