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

lima disk delete should work the same way as limactl delete #1198

Open
jandubois opened this issue Nov 23, 2022 · 0 comments
Open

lima disk delete should work the same way as limactl delete #1198

jandubois opened this issue Nov 23, 2022 · 0 comments

Comments

@jandubois
Copy link
Member

jandubois commented Nov 23, 2022

It feels inconsistent to me that a locked disk will abort the command, but a non-existing disk is simply skipped:

limactl disk rm foo bar

If foo doesn't exist, bar will still be deleted. But if foo exists and is locked, then bar will not be deleted (and there is no message to the effect that additional disks have been skipped due to the error).

I think a locked disk should be logged as an error, but additional disks should still be processed.

And then I wonder if failures of deleteDisk() should be treated the same way too: log an error, but continue to attempt deleting the remaining disks?

Of course the command must exit with a non-zero status code if any disk couldn't be deleted. I'm not sure how non-existing disks should be treated: should they also cause a non-zero error?

@AkihiroSuda WDYT?

Originally posted by @jandubois in #1065 (comment)

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