quattor / configuration-modules-core

Node Configuration Manager Components for Everyone
www.quattor.org
Other
6 stars 54 forks source link

ncm-sudo: support all values for lecture option and the lecture_file option #1689

Open stdweird opened 2 months ago

stdweird commented 2 months ago

this is backwards incompatible

@jrha needs to be checked if this supported on el7 or el6

ned21 commented 2 months ago

If I understand the comment correctly, a file with the old true/false values is accepted by sshd. However any site that sets config via quattor to true/false will need to modify all their templates to use once/never instead. That's a one-time sed fixup, but needs to happen in sync with the schema change and the code on the hosts needs to be ready to accept new version before the schema change can happen.

Is there a way to permit both forms to co-exist for a release or two to provide a smooth transition path? Maybe something like

type sudo_lecture_transition = property with {
    if( is_binary(SELF) ) {
        warning("Deprecated ...);
    } else {
        # manual form of "choice" for transition, replace with choice when transition complete
        if( !match(SELF, '^(always|once|never$') ) {
            error(...);
        }
   }
   true;
};