Open ned21 opened 7 years ago
i'd say no, should report an error, esp since the schema allows anything @ned21 is the exitcode non-zero in the example above?
My instinct was "no" too but then after some internal discussion, I am not so sure. ERRORs should be programming errors or other unforeseeable/impossible situations. If the sysadmin made a mistake in specifying the sysctl name then in the Quattor model that should be caught prior to deployment. I suspect the problem with specifying a schema for all possible sysctl settings is that it would be huge, and also vary with each kernel version.
so lacking a stricter schema, there should be an error. but you are right that these are 'configuration' errors; so we should reflect that in the error message.
making a schema is not easy. it will indeed be rather large and will be kernel versioned. i'm not sure how bad it would be (i also don't know how many things people want to change on average).
we could parse sysctl -a
output before deploying new config, so we can know upfront what won't work, and report them properly.
but an error (or at the very least a warning) should be reported: whatever you tried to do with the configuration, it didn't work and someone should be made aware of it. not being aware is (imho) worse.
We would prefer a WARNING over an ERROR although it could be a config option to make it an ERROR.
ncm-sysctl runs with -e so any sysctl settings not supported by the kernel are silently ignored. Is this the behaviour we want?