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

ublk del --all always returns failure #61

Closed
vt-alt opened this issue Oct 27, 2023 · 2 comments
Closed

ublk del --all always returns failure #61

vt-alt opened this issue Oct 27, 2023 · 2 comments

Comments

@vt-alt
Copy link

vt-alt commented Oct 27, 2023

I did simple smoke test for our CI and found that ublk del --all always exits with a failure (exitcode=237).

Looking at the code I think this is the casue:

cmd_dev_del iterates over MAX_NR_UBLK_DEVS number of devices:

        for (i = 0; i < MAX_NR_UBLK_DEVS; i++)
                ret = __cmd_dev_del(i, true);
  1. This overrides exit status (of intermediate dels), and
  2. Always reporting exit for last (128th) device (which is usually non-existent), which is -19 (that becomes exitcode 237).
@ming1
Copy link
Collaborator

ming1 commented Oct 28, 2023

Fixed in bac8d72 ("ublksrv_tgt: don't return error if trying to delete unexisted device").

Thanks for the report.

@ming1 ming1 closed this as completed Feb 3, 2024
@vt-alt
Copy link
Author

vt-alt commented Feb 3, 2024

Thanks!

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

2 participants