Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular dependencies in actions with ActionAddMember #978

Open
vojtechtrefny opened this issue Aug 16, 2021 · 0 comments
Open

Circular dependencies in actions with ActionAddMember #978

vojtechtrefny opened this issue Aug 16, 2021 · 0 comments
Assignees

Comments

@vojtechtrefny
Copy link
Member

When using the ActionAddMember and ActionRemoveMember it's easy to create a dependency cycle when adding more actions:

  1. Resize a LV.
  2. Create new PV partition.
  3. Add the PV to the VG.
  4. Blivet fails with blivet.tsort.CyclicGraphError: graph contains cycles

The problem is that both the ActionCreateDevice and ActionCreateFormat for the new PV depend on the resize action (which it shouldn't) of the LV which depends on the ActionAddMember (which is correct, the LV resize might need the extra space added by the new PV) which depends on the PV create action (again correct) creating the cycle.

The problem is that all create actions depend on all actions with higher type (e.g. resize) even if these actions are on devices that don't depend on each other.

def requires(self, action):
""" Return True if self requires action. """
return (not (self.is_container or action.is_container) and
self.type < action.type)

@vojtechtrefny vojtechtrefny self-assigned this Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant