You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should allow such a MC w/o incurring into ignition versions errors. It's not trivial though cause the ignition config is not a pointer so we can't really differentiate.
Reason: Failed to render configuration for pool worker: machine config: 50-kargs contains invalid ignition config: error: invalid config version (couldn't parse)
We can detect if an Ignition spec is empty, and make that silently OK.
That said this is also potentially an argument to backtrack on extending MachineConfig as is and instead introducing some other CRD operatingsystemconfig or whatever.
I ran into this issue my first time playing around with machineconfigs 😄 . As annoying as the check for nil everywhere is, I'm in favor of the pointer for this one.
Should this we discussed in the openshift/api PR somewhere?
Should this we discussed in the openshift/api PR somewhere?
as a follow up to that I guess yeah. If that PR makes 4.2, we need a transition plan for 4.3 to account for this change but I won't risk changing this for 4.2 (as annoying as it is I concur 😄 )
One way to get around this is for all MCs that are just kargs/FIPs && if an ign config is completely empty, just call NewIgnConfig() and add that to the MC ign section:
We can detect if an Ignition spec is empty, and make that silently OK.
That said this is also potentially an argument to backtrack on extending MachineConfig as is and instead introducing some other CRD operatingsystemconfig or whatever.
I would also add that while I think checking whether or not an Ignition config is reconcilable is a good idea, I think that erroring out on the version is not helpful esp if we are trying to put a little space between/not tightly couple the concept of a machineconfig and an ignconfig (ie we use ign as a tool but present this to the user as solely an ign config). All we'd have to do is always add maxVersion of ign to the ign.version section (NewIgnConfig) of the rendered config and check the error from validation to make sure that the ignition version missing is the only error.
( added this verification so I can add the extra ignition version skipping too)
Activity
cgwalters commentedon Jun 25, 2019
We can detect if an Ignition spec is empty, and make that silently OK.
That said this is also potentially an argument to backtrack on extending
MachineConfigas is and instead introducing some other CRDoperatingsystemconfigor whatever.runcom commentedon Jun 25, 2019
yes, but that requires looking at fields for the Ingnition Config struct cause it's not a pointer though
cgwalters commentedon Jun 25, 2019
We already walk the struct to e.g. verify that it doesn't have a non-empty
storagesection etc.runcom commentedon Jun 25, 2019
yeah, to be clear, I'm not against doing that 😄 I just wished we had a pointer to straight compare to
niland get done with it 😃ericavonb commentedon Jun 25, 2019
I ran into this issue my first time playing around with machineconfigs 😄 . As annoying as the check for
nileverywhere is, I'm in favor of the pointer for this one.Should this we discussed in the openshift/api PR somewhere?
runcom commentedon Jun 25, 2019
as a follow up to that I guess yeah. If that PR makes 4.2, we need a transition plan for 4.3 to account for this change but I won't risk changing this for 4.2 (as annoying as it is I concur 😄 )
kikisdeliveryservice commentedon Jun 25, 2019
The ignition verification specifically requires a version for a MC to be valid. That's kind of baked in and not specific to Kargs/FIPs in the MCO.
kikisdeliveryservice commentedon Jun 25, 2019
One way to get around this is for all MCs that are just kargs/FIPs && if an ign config is completely empty, just call NewIgnConfig() and add that to the MC ign section:
machine-config-operator/pkg/controller/common/helpers.go
Line 11 in 0ebe474
This shouldn't be bad to implement. Since I worked on the ignition stuff and the reconcilable stuff, I'm happy to pick this up.
kikisdeliveryservice commentedon Jun 26, 2019
I would also add that while I think checking whether or not an Ignition config is reconcilable is a good idea, I think that erroring out on the version is not helpful esp if we are trying to put a little space between/not tightly couple the concept of a machineconfig and an ignconfig (ie we use ign as a tool but present this to the user as solely an ign config). All we'd have to do is always add maxVersion of ign to the ign.version section (NewIgnConfig) of the rendered config and check the error from validation to make sure that the ignition version missing is the only error.
( added this verification so I can add the extra ignition version skipping too)
kikisdeliveryservice commentedon Jun 26, 2019
/assign
mcc/mcd: add exception to validation for empty ign configs