quattor / configuration-modules-core

Node Configuration Manager Components for Everyone
www.quattor.org
Other
7 stars 56 forks source link

ncm-ssh: /software/components/ssh/daemon/comment_options/GSSAPIKexAlgorithms = "" ends up adding a new line on each ncm-ssh run #1666

Open ulrich1919 opened 9 months ago

ulrich1919 commented 9 months ago

if I specify: /software/components/ssh/daemon/comment_options/GSSAPIKexAlgorithms = "" (empty value) then ncm-ssh adds "#GSSAPIKexAlgorithms" line to sshd_config on each run, and restarts sshd. I believe this behaviour is not normal. Please check and fix. Thanks

jrha commented 2 months ago

Apologies for the delay, I tried to reproduce this today, but GSSAPIKexAlgorithms isn't a valid option in the schema, are you using a local fork?

I can however replicate the same behaviour with:

"/software/components/ssh/daemon/comment_options/Protocol" = "";

It appears to happen when an option is present in both options and comment_options and the comment version has no associated value.

ulrich1919 commented 2 months ago

Yes, we added GSSAPIKexAlgorithms to our schema. Forgot to raise a PR here. Will do now. I think GSSAPIKexalgorithms was only present in comment_options with an empty value. It was not added to options. Can you reproduce the behaviour If an option is only present in comment_options(and not present in options)?

ulrich1919 commented 2 months ago

raised https://github.com/quattor/configuration-modules-core/pull/1714

jrha commented 3 weeks ago

I think the underlying issue is still present, but the schema changes make it harder to trigger.