You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nov 14 19:57:03 juju-c56ce2-18 systemd[1]: snap.grafana-agent.grafana-agent.service: Scheduled restart job, restart counter is at 5.
Nov 14 19:57:03 juju-c56ce2-18 systemd[1]: Stopped Service for snap application grafana-agent.grafana-agent.
Nov 14 19:57:03 juju-c56ce2-18 systemd[1]: snap.grafana-agent.grafana-agent.service: Start request repeated too quickly.
Nov 14 19:57:03 juju-c56ce2-18 systemd[1]: snap.grafana-agent.grafana-agent.service: Failed with result 'exit-code'.
Nov 14 19:57:03 juju-c56ce2-18 systemd[1]: Failed to start Service for snap application grafana-agent.grafana-agent.
Nov 14 19:57:09 juju-c56ce2-18 systemd[1]: snap.grafana-agent.grafana-agent.service: Start request repeated too quickly.
Nov 14 19:57:09 juju-c56ce2-18 systemd[1]: snap.grafana-agent.grafana-agent.service: Failed with result 'exit-code'.
Nov 14 19:57:09 juju-c56ce2-18 systemd[1]: Failed to start Service for snap application grafana-agent.grafana-agent.
"Snap: {!r}; command {!r} failed with output = {!r}".format(
self._name, args, e.output
)
Problem 2b: this error doesn't go to stderr anyway, so pull from journalctl or systemctl?
I manually added stderr to the log but discovered there's nothing there, all the errors are logged to journal. Should the lib pull from the journal when raising SnapError?
The text was updated successfully, but these errors were encountered:
Note: the rapid restart is due to an error I discovered with snap logs, due to a build error: canonical/grafana-agent-snap#80.
So there is no problem with snap.set, the only problem is that the reason for restart failure is buried.
sed-i
changed the title
The snap lib fails to apply config due to "Start request repeated too quickly"
When a snap fails to restart for some reason, e.g. "Start request repeated too quickly", log messages do not reflect the reason
Nov 14, 2024
Problem 1:
set
fails because charm is restarted to quicklyI need to call
snap.set
immediately afterstart
/ensure
, like so:At this point the call to
snap.set
fails with:Problem 2a: the log message doesn't show stderr
In the traceback I see messages such as
because SnapError doesn't print
e.stderr
. Perhaps it would be handy to also includee.stderr
here:operator-libs-linux/lib/charms/operator_libs_linux/v2/snap.py
Lines 280 to 283 in a1aaa35
Problem 2b: this error doesn't go to stderr anyway, so pull from journalctl or systemctl?
I manually added stderr to the log but discovered there's nothing there, all the errors are logged to journal. Should the lib pull from the journal when raising SnapError?
The text was updated successfully, but these errors were encountered: