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

Get rid of the hard LVM dependency in elemental-toolkit #1845

Open
davidcassany opened this issue Oct 18, 2023 · 0 comments
Open

Get rid of the hard LVM dependency in elemental-toolkit #1845

davidcassany opened this issue Oct 18, 2023 · 0 comments
Labels
kind/enhancement New feature or request kind/good first issue Good for newcomers

Comments

@davidcassany
Copy link
Contributor

davidcassany commented Oct 18, 2023

Is your feature request related to a problem? Please describe.
I am wondering if we could remove the LVM stack requirement from elemental.

We only need due to this code

// DeactivateDevice deactivates unmounted the block devices present within the system.
// Useful to deactivate LVM volumes, if any, related to the target device.
func (e Elemental) DeactivateDevices() error {
out, err := e.config.Runner.Run(
"blkdeactivate", "--lvmoptions", "retry,wholevg",
"--dmoptions", "force,retry", "--errors",
)
e.config.Logger.Debugf("blkdeactivate command output: %s", string(out))
return err
}

blkdeactivate is provided by the LVM package.

Describe the solution you'd like

I am wondering if shouldn't we just make a best effort call, if the command is not there only log it can't be executed but do nothing and do not return error. If it is there then normally execute it. We could even consider swallowing any error and just log it. If the target device is managed by lvm somehow it will also fail in later steps in any case.

With this change we could consider dropping lvm requirement from elemental package.

@davidcassany davidcassany moved this to 💡 Backlog in Elemental Oct 18, 2023
@davidcassany davidcassany added the kind/enhancement New feature or request label Oct 18, 2023
@frelon frelon added the kind/good first issue Good for newcomers label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request kind/good first issue Good for newcomers
Projects
Status: 💡 Backlog
Development

No branches or pull requests

2 participants