Adam Rosenwald wrote:
> A FAQ that I have brought up on numerous occasions on IRC involves
> 'getting rid of bad cobbler metavariables'.
>
> If I were to set a wrong ks_meta variable NAME, how do I get rid of
> the NAME without taking out ks_meta entirely.
>

I suspect this is not well documented, though it's been present for a while:

cobbler system edit --name=foo --ksmeta="~NAME" --in-place

replacing "NAME" with the key you want to delete.

(Or, if this is too cryptic to remember, you can also use the web app)


> `cobbler system edit --in-place --name=NAME --ksmeta='*!art2*'`
>
> Supposedly this syntax will, upon deserialization of the JSON, clear
> the ks_meta namespace of *art2*; however, upon issuing a report on a
> given entity, the flawed variable will still appear along with the
> negated variable.

That's not about deserialization, that's why... it's about supression of
evaluation.

What it means is that when evaluating the object chain the variable will
be discarded.

For instance, if the distro sets kernel option "a=2", and the profile
sets "!a", there will be no value a in the evaluated kernel options when
installing based on that profile.

A better usage example if if globally in settings the kernel arguments
included "text" and someone wanted to always do a graphical install for
a particular profile:

cobbler profile edit --name=foo --kopts="!text"

Thanks for clearing up the distinction between 'suppression of evaluation' vs 'deserialization'. I wasn't quite sure how the '~' or '!' prefix applied to kernel options/kickstart variables when being parsed by anaconda. If the variables are not thrown out during deserialization, then the '!' or '~' prefixes /do/ in fact have meaning for the anaconda parser (unless cobbler does additional processing before the variables are passed to anaconda's parser). Is there a distinction between the '~' or '!' prefixes?

My original question, however, relates to whether and how removing the kopts/ksmeta variables can be achieved, such that they are completely gone -- obliterated from serialized JSON files. No trace of them whatsoever in cobbler hashes. Is there currently a way to do this via the CLI? If not, do you have any objection to my submitting patches on cobbler-devel?

Thanks,

- A.

--Michael

_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler


_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to