Missing a newline on /etc/sudoers.d/telegraf_ovs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Telegraf Charm |
Fix Released
|
Critical
|
Unassigned |
Bug Description
In a newly deployed focal-yoga cloud using telegraph (stable/57), the octavia/leader unit gets stuck in an error state (hook failed: "identity-
When trying to run debug-hook, I got:
```
$ juju debug-hook octavia/2
>>> /etc/sudoers.
sudo: parse error in /etc/sudoers.
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Connection to 192.168.30.237 closed.
```
Looking at the /etc/sudoers.
```
$ juju run -u octavia/2 -- cat /etc/sudoers.
Defaults:telegraf !requiretty
Cmnd_Alias OVSOFCTL = /usr/bin/ovs-ofctl
Cmnd_Alias OVSVSCTL = /usr/bin/ovs-vsctl
Cmnd_Alias OVSAPPCTL = /usr/bin/ovs-appctl
telegraf ALL = (root) NOPASSWD: OVSOFCTL
telegraf ALL = (root) NOPASSWD: OVSVSCTL
telegraf ALL = (root) NOPASSWD: OVSAPPCTL
Defaults!OVSOFCTL !logfile, !syslog, !pam_session
Defaults!OVSVSCTL !logfile, !syslog, !pam_session
Defaults!OVSAPPCTL !logfile, !syslog, !pam_sessionubu
```
Workaround:
```
juju run --application telegraf -- 'echo "" >> /etc/sudoers.
````
Related branches
- Celia Wang: Approve
- Gabriel Cocenza: Needs Fixing
- Eric Chen: Approve
- Robert Gildein: Pending requested
-
Diff: 137 lines (+12/-9)12 files modified.pre-commit-config.yaml (+1/-0)
src/reactive/telegraf.py (+0/-1)
src/requirements.txt (+0/-1)
src/templates/apache-server-status.tmpl (+1/-0)
src/templates/influxdb-api.conf.tmpl (+2/-1)
src/templates/sudoers/telegraf_intel_rdt.tmpl (+1/-0)
src/templates/sudoers/telegraf_ipmi.tmpl (+1/-0)
src/templates/sudoers/telegraf_iptables.tmpl (+1/-0)
src/templates/sudoers/telegraf_ovs.tmpl (+1/-0)
src/templates/sudoers/telegraf_smart.tmpl (+1/-0)
src/templates/telegraf.conf.tmpl (+3/-3)
src/wheelhouse.txt (+0/-3)
tags: | added: bseng-390 |
Changed in charm-telegraf: | |
status: | Confirmed → Fix Committed |
Changed in charm-telegraf: | |
milestone: | none → 22.10 |
Changed in charm-telegraf: | |
status: | Fix Committed → Fix Released |
Escalating this issue as field-critical, as it is a blocker for the deployment.