Uploaded image for project: 'DC/OS'
  1. DC/OS
  2. DCOS_OSS-3947

DC/OS Telegraf bootstrapper does not create cluster ID file (is required on agent nodes)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: DC/OS 1.12.0
    • Component/s: bootstrap
    • Labels:
      None
    • Story Points:
      0

      Description

      The DC/OS Telegraf service requires the `/var/lib/dcos/cluster/id` file to function properly, otherwise the service will fail to start and it will continuously restart.

      Usually one does not see any issues if they have dcos-metrics enabled. Since dcos-metrics service is not mandatory we need a fix so dcos-telegraf service can be able to start.

      I have an environment where I disable dcos-metrics (which has a bootstrap method to create the cluster-id file) and I get the following error when starting dcos-telegraf:

       

      start_telegraf.sh[1344]: + set -o nounset
      start_telegraf.sh[1344]: + cluster_id_file=/var/lib/dcos/cluster-id
      start_telegraf.sh[1344]: + '[' '!' -f /var/lib/dcos/cluster-id ']'
      start_telegraf.sh[1344]: + echo 'Missing required file: /var/lib/dcos/cluster-id'
      start_telegraf.sh[1344]: Missing required file: /var/lib/dcos/cluster-id
      start_telegraf.sh[1344]: + exit 1
      

       

      I propose the following:

      1. Add a check `ExecStartPre=/usr/bin/test -f /var/lib/dcos/cluster-id` into the systemd service file
      2. Implement the bootstrap methods for the telegraf service that will create the cluster-id file.

        Attachments

          Activity

            People

            • Assignee:
              ionutbalutoiu ionutbalutoiu
              Reporter:
              ionutbalutoiu ionutbalutoiu
              Team:
              Security Team
              Watchers:
              Dominik Dary, ionutbalutoiu, Jan-Philip Gehrcke
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: