Missing a newline on /etc/sudoers.d/telegraf_ovs

Bug #1988476 reported by Marcelo Subtil Marcal
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Telegraf Charm
Fix Released

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-service-relation-changed").

When trying to run debug-hook, I got:

$ juju debug-hook octavia/2
>>> /etc/sudoers.d/telegraf_ovs: syntax error near line 10 <<<
sudo: parse error in /etc/sudoers.d/telegraf_ovs near line 10
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Connection to closed.

Looking at the /etc/sudoers.d/telegraf_ovs file I found out that there is a missing newline at the end of the file:

$ juju run -u octavia/2 -- cat /etc/sudoers.d/telegraf_ovs
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_sessionubuntu@sdtpdc41s100001:~/deploy$


juju run --application telegraf -- 'echo "" >> /etc/sudoers.d/telegraf_ovs'

Tags: bseng-390

Related branches

Revision history for this message
Pedro Guimarães (pguimaraes) wrote :

Escalating this issue as field-critical, as it is a blocker for the deployment.

Revision history for this message
Eric Chen (eric-chen) wrote :

Yes, we found this bug yesterday and rollback to revision 54 on stable channel.

Please downgrade it for the solution. We will fix this bug asap.


Changed in charm-telegraf:
status: New → Confirmed
importance: Undecided → Critical
Eric Chen (eric-chen)
tags: added: bseng-390
JamesLin (jneo8)
Changed in charm-telegraf:
status: Confirmed → Fix Committed
Tianqi Xiao (txiao)
Changed in charm-telegraf:
milestone: none → 22.10
Tianqi Xiao (txiao)
Changed in charm-telegraf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.