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
scylla_raid_setup: --online-discard option always enables 'discard' #14963
Comments
cc @roydahan @avikivity |
This argument was dead since its introduction and 'discard' was always configured regardless of its value. This patch allows actually configuring things using this argument. Fixes scylladb#14963
I did not read the code, so just asking - if you don't want this enabled, wouldn't it be simpler not to pass '--online-discard' ? (or is the default true, so effectively you can't disable it?) |
@mykaul And that was the only thing that the author tested apparently before sending the patch that added this patch (a19d00e) - the default works as expected ;) This issue is about the fact that the non-default (when you give So, let's fix this ASAP and backport to all our currently supported official releases. The PR with the fix has been sent on Friday (3 days ago). |
I vaguely recall a long discussion about this without reaching agreement on the test / behavior or even the necessity of this option. |
@roydahan I don't think it was me or you mixed with scylladb/scylla-machine-image#394 |
Yes, you're right, I mixed it with it. |
@scylladb/scylla-maint please consider backporting all the way to 2022.1 |
Backported to 5.2, 5.1 and 2022.1. |
This argument was dead since its introduction and 'discard' was always configured regardless of its value. This patch allows actually configuring things using this argument. Fixes scylladb#14963 Closes scylladb#14964
This argument was dead since its introduction and 'discard' was always configured regardless of its value. This patch allows actually configuring things using this argument. Fixes scylladb#14963 Closes scylladb#14964
Installation details
HEAD: Scylla version (or git commit hash):
Description
scylla_raid_setup
will always enablediscard
mount option even if--online-discard False
is given.Root cause
argparse
doesn't support boolean parameter.To encode such values one should either use
action='store_true'
(preferred way) or decode the string value usingdistutils.util.strtobool(value)
Unless
action='store_true'
is used (which is not the case) theif args.online_discard
is going to give an unexpected result - it will beTrue
when the value is set (to any value - which happens to be always the case since thedefault
is provided as well).While the code that has the condition above assumes that it checks the actual value of the variable.
The text was updated successfully, but these errors were encountered: