lakitu: crash_sender: disable UMA metric sending

The commit 370ab1e6d9 ("crash: Add crash_sender runtime UMA metric.") in
crash-reporter introduces a run-time dependency on the metrics daemon by
creating and writing to /var/log/metrics/uma-events, which failed in COS
M88 because the metrics daemon is not installed and /var/log/metrics is
nonexistent.

An example of the errors from crash_sender:

  debug1 ~ # journalctl -p err -q -b 0
  Oct 14 17:39:28 debug1 crash_sender[421]: /var/lib/metrics/uma-events: cannot open: No such file or directory (2)

crash_sender only sends UMA metrics when --max_spread_time=0. This
change works around the errors by setting --max_spread_time=1 thus
disabling UMA metrics sending. It is assumed that waiting for up to one
second does not break our expectation of sending kernel crash reports
immediately. See also commit 9aa74c0042c7fa67bf4a1a6783ef27c3ce1c106b
and b/128008378.

This change has been tested by running it on a GCE instance and manually
examining journalctl output to make sure the related errors no longer
appear.

BUG=b/170768338
TEST=See the above paragraph.
RELEASE_NOTE=None

Change-Id: Iad6057ab36c835c9487e93bd597ec5124db8c014
3 files changed