Collect support dump

TechPreview

A support dump is a single archive with logs and Kubernetes objects collected from a management or MOSK cluster for a Mirantis support case. The archive is produced by supportdump-controller, which runs on the management cluster and watches for SupportDump objects. The controller runs the built-in collectors kubernetesObjects, underlayKubernetesLogs, and systemLogs. The cloud operator can also add plugins to collect data that the built-in collectors do not cover.

The resulting archive contains dump.yaml, a copy of the SupportDump object that requested the collection, and the following folders:

  • objects if the kubernetesObjects collector was run

  • mke if the underlayKubernetesLogs collector was run

  • system if the systemLogs collector was run

  • plugins if any plugins were run, with the output of each plugin placed into a subfolder named after the plugin

Note

Support dumps accumulate on the local volume of the management cluster node. Take this into account when planning the capacity of the disk assigned for local volumes.

Unlike Collect cluster logs, this method requires neither the bootstrap directory nor the cluster private SSH key. No manual preparation is required on the target cluster, so it can be running an earlier MOSK release.

To collect a support dump:

  1. Log in to the host where kubeconfig of your management cluster is located and where kubectl is installed.

  2. Create a YAML file, for example, supportdump.yaml, with the SupportDump object in the namespace where the target cluster is located, specifying the cluster name in spec.targetCluster:

    apiVersion: kaas.mirantis.com/v1alpha1
    kind: SupportDump
    metadata:
      name: test
      namespace: managed
    spec:
      collectors:
      - kubernetesObjects: {}
      - underlayKubernetesLogs: {}
      - systemLogs:
          nodeLabels:
            openstack-control-plane: enabled
      overallTimeout: 45m0s
      targetCluster: mosk
    

    For the description of all fields, see SupportDump resource.

    Note

    A cluster can have only one support dump collection running at a time. While a collection is in progress, creation of another SupportDump object for the same cluster is rejected. Wait for the running collection to complete or delete the existing object.

  3. Trigger the support dump collection:

    kubectl create -f supportdump.yaml
    
  4. Wait until the collection finishes and verify the overall SupportDump status:

    kubectl -n <supportDumpNamespace> get supportdump
    

    Example of a system response:

    NAME    STATUS
    test    Completed
    test2   Completed
    

    The collection is finished when the status is Completed or Failed. The overall status can be Completed even if some collectors have failed. Inspect the message fields in the status section for the failure details. For details about the object status, see SupportDump resource.

  5. Copy the resulting archive from the controller pod:

    kubectl cp kaas/<podName>:<fileName> ./dump.tar.gz
    

    Substitute <podName> and <fileName> with the values from the status section of the SupportDump object.

  6. Send the archive to the Mirantis support team.

  7. Optionally, delete the SupportDump object to remove the archive from the local volume and free up disk space:

    kubectl -n <supportDumpNamespace> delete supportdump <supportDumpName>
    

    Warning

    Deletion of the SupportDump object also removes the collected archive.