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

zfs --version CLI nomore works in zfs-2.3.0rc1 #16615

Closed
whoschek opened this issue Oct 7, 2024 · 2 comments · Fixed by #16617
Closed

zfs --version CLI nomore works in zfs-2.3.0rc1 #16615

whoschek opened this issue Oct 7, 2024 · 2 comments · Fixed by #16617
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@whoschek
Copy link

whoschek commented Oct 7, 2024

System information

Type Version/Name
Distribution Name OpenZFS
Distribution Version ubuntu-22.04
Kernel Version
Architecture
OpenZFS Version 2.3.0rc1

Describe the problem you're observing

zfs --version nomore works in zfs-2.3.0rc1. Instead, it errors out with:

Invalid option '-'
usage: zfs command args ...
where 'command' is one of the following:\
  version [-j]
  create [-Pnpuv] [-o property=value] ... filesystem

as shown in detail in the log here: https://github.com/whoschek/bzfs/actions/runs/11204871144/job/31143773762
Here is how exactly the job is being run: https://github.com/whoschek/bzfs/blob/main/.github/workflows/python-app.yml#L151-L155

I understand that zfs version has been added, but keep in mind that the zfs --version CLI command has worked fine going all the way back to at least zfs-0.8.3 until and including zfs-2.2.6. Existing programs and scripts rely on this feature for runtime checks and will now break. Please make available again the old behavior to retain compatibility.

@usaleem-ix @amotin I'm not sure, but maybe this JSON related change caused the regression: aa15b60#diff-cf9364a9cff2478f377b7c4f69664b4140102fa2642e79d12d9d35f8b525a3bdR2189

Describe how to reproduce the problem

Include any warning/errors/backtraces from the system logs

@whoschek whoschek added the Type: Defect Incorrect behavior (e.g. crash, hang) label Oct 7, 2024
@whoschek whoschek changed the title zfs --version CLI nomore works in zfs-2.3rc1 zfs --version CLI nomore works in zfs-2.3.0rc1 Oct 7, 2024
@behlendorf
Copy link
Contributor

@whoschek thanks for reporting this, and for the quick fix @robn.

behlendorf pushed a commit to behlendorf/zfs that referenced this issue Oct 9, 2024
The -j option added a round of getopt, which didn't know the magic
version flags. So just bypass the whole thing and go straight to the
human output function for the special case.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes openzfs#16615 
Closes openzfs#16617
@whoschek
Copy link
Author

Thanks, this is confirmed fixed now per https://github.com/whoschek/bzfs/actions/runs/11358211882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants