Page MenuHomePhabricator

Allow for multiple confd instances in puppet
Closed, ResolvedPublic

Description

I would like our confd puppet code to support multiple confd instances per node.

For T329826: Kubernetes v1.23 use PKI for service-account signing (instead of cergen) I wanted to add a confd with the k8s etcd cluster as backend but realized that confd is already instantiated for the global etcd (by ferm).

Event Timeline

JMeybohm renamed this task from Allow for multiple confd instances in in pupper to Allow for multiple confd instances in pupper.Jul 12 2023, 10:11 AM

Change 937573 had a related patch set uploaded (by Giuseppe Lavagetto; author: Giuseppe Lavagetto):

[operations/puppet@production] confd: allow running multiple instances

https://gerrit.wikimedia.org/r/937573

Mentioned in SAL (#wikimedia-operations) [2023-07-21T08:47:10Z] <jayme> disabling puppet in C:cumin - T341669

Mentioned in SAL (#wikimedia-operations) [2023-07-21T08:47:33Z] <jayme> disabling puppet in C:confd - T341669

Change 937573 merged by JMeybohm:

[operations/puppet@production] confd: allow running multiple instances

https://gerrit.wikimedia.org/r/937573

Change 940325 had a related patch set uploaded (by JMeybohm; author: Giuseppe Lavagetto):

[operations/puppet@production] conftool::state: use confd::default_instance

https://gerrit.wikimedia.org/r/940325

Change 940325 merged by JMeybohm:

[operations/puppet@production] conftool::state: use confd::default_instance

https://gerrit.wikimedia.org/r/940325

Change 940329 had a related patch set uploaded (by JMeybohm; author: Giuseppe Lavagetto):

[operations/puppet@production] confd::instance: support prefix in non-main instances

https://gerrit.wikimedia.org/r/940329

Change 940329 merged by JMeybohm:

[operations/puppet@production] confd::instance: support prefix in non-main instances

https://gerrit.wikimedia.org/r/940329

Change 940362 had a related patch set uploaded (by JMeybohm; author: JMeybohm):

[operations/puppet@production] confd: Use the unit name as syslog identifier

https://gerrit.wikimedia.org/r/940362

Change 940362 merged by JMeybohm:

[operations/puppet@production] confd: Use the unit name as syslog identifier

https://gerrit.wikimedia.org/r/940362

JMeybohm claimed this task.
Kappakayala renamed this task from Allow for multiple confd instances in pupper to Allow for multiple confd instances in puppet.Jul 28 2023, 5:44 PM

I had to roll back confd in reprepro and on puppetmaster1001 because I found a regression (or, a change in behaviour): the prefix key in the confd files isn't respected in confd 0.16.0 if a prefix is declared on the command line.

This makes sense - the previous behaviour was somewhat confusing to reason about, but this means we have to convert all of our confd files to a format compatible with both versions.

My line of thinking is as follows:

  • Remove -prefix from the command line
  • Add it back as default_prefix in confd::file, and prepend it to any prefix
  • Leave everything else as-is

However, this stresses the necessity to check carefully all of our confd templates. I will do so and report the results on this ticket.

We did introduce -prefix to the cli again in this task...

Change 951124 had a related patch set uploaded (by JMeybohm; author: JMeybohm):

[operations/puppet@production] confd: Move -prefix from confd cli to confd::file instances

https://gerrit.wikimedia.org/r/951124

Change 954007 had a related patch set uploaded (by Jbond; author: jbond):

[operations/puppet@production] confd: -prefix from confd cli to confd::file instances

https://gerrit.wikimedia.org/r/954007

Change 951124 abandoned by JMeybohm:

[operations/puppet@production] confd: Move -prefix from confd cli to confd::file instances

Reason:

Ibcad8a27e88451d4ae8f0114bf9aaf602bc107cd

https://gerrit.wikimedia.org/r/951124

Change 954007 merged by Jbond:

[operations/puppet@production] confd: -prefix from confd cli to confd::file instances

https://gerrit.wikimedia.org/r/954007

Change 954610 had a related patch set uploaded (by Jbond; author: jbond):

[operations/puppet@production] confd: Only notify the current instance

https://gerrit.wikimedia.org/r/954610

Change 954610 merged by Jbond:

[operations/puppet@production] confd: Only notify the current instance

https://gerrit.wikimedia.org/r/954610

JMeybohm added a subscriber: jbond.

Thanks to @jbond's refactor this is now resolved (again).