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
Support = and , in tag values in wwctl <node|profile> set --tagadd #1147
Comments
Transcribing @JasonYangShadow's comments from an internal ticket: It is caused by pflags, we are using map[string]string as the tag field, and it is handled by pflags’s StringToStringVarP function. https://github.com/spf13/pflag/blob/v1.0.5/string_to_string.go#L130 https://github.com/warewulf/warewulf/blob/main/internal/pkg/node/flags.go#L223 This function will interpret the = and , for retrieving the key and value. A simple example to reproduce this issue
I’d suggest either flatting the nested tags to small tags or using other symbol other than ,inside the value.
|
@JasonYangShadow I concur. If we actually wanted to fix this, it looks like it'd need to be fixed upstream in cobra. Not that we can't do that; but it seems a bit extensive for now, especially since this can be done by editing I'll move this to |
Summary
Support specifying a value with
--tagadd
that includes an equal sign,=
.Rationale
When attempting to
wwctl profile set --yes --tagadd slurmdconf='Feature=standard CpuSpecList=1,33' standard
We get an error:
These values can be entered into
nodes.conf
manually; but are not permitted bywwctl
Description
No response
Additional information
No response
General information
The text was updated successfully, but these errors were encountered: