dpsctl support-bundle#

Overview#

dpsctl support-bundle creates a private, local .tar.gz archive of diagnostic evidence for one Kubernetes context and namespace. Run it once for each cluster and namespace that you need to examine. The command does not upload the archive.

The archive holds Pod logs and configuration that are not masked. Review it before you share it. For what the command does not copy, refer to Privacy.

A zero exit status means that the command wrote and verified the archive. It does not mean that every evidence source succeeded. The archive’s manifest.json and summary.txt record the result of each source, and an archive that records only collection failures is still a valid bundle.

Usage#

Use the following syntax to run the command:

dpsctl [global options] support-bundle --target server|agent --namespace <namespace> [options]

Flags#

The global --grpc-timeout, --no-retry, --max-retries, and --retry-delay options do not apply to this command, which uses its own time and retry limits. The command does not run the preflight version mismatch check, so --no-version-check has no effect. The global --output option sets only the format of the error that a failed run prints. For an unknown option, an option value that cannot be parsed, or a missing required option, the command prints usage text and a JSON log line instead. The command accepts global dpsctl options and the following support-bundle options:

dpsctl support-bundle Options
   --target string                                  DPS application access: server or agent
   --kubeconfig string                              Kubeconfig file (defaults to the active KUBECONFIG)
   --context string                                 Kubernetes context (defaults to the current context)
   --namespace string                               Kubernetes namespace to collect
   --monitoring-namespace string                    Optional namespace to check for DPS ServiceMonitors when automatic search is restricted
   --output-path string                             New .tar.gz archive path
   --incident-label string                          Optional incident label to correlate separate bundles
   --helm-path string                               Optional path to the customer's working Helm executable
   --skip-connectivity-check                        Skip the default fresh BMC connectivity check, which writes ping results and creates checkpointed task work (default: false)
   --bmc-firmware                                   Also read each reached BMC's firmware versions during the connectivity check (off by default; each read holds a DPS agent device call slot for up to 10s longer) (default: false)
   --metrics-check                                  Collect fresh metrics for selected DPS nodes (off by default, independent of connectivity) (default: false)
   --prs-endpoint string [ --prs-endpoint string ]  PRS Config or Controller /api/dump URL. In-cluster Service DNS is read through the selected Pod, for example http://release-power-controller.namespace.svc:8001/api/dump. Any other http or https URL is dialed directly when one PRS release is selected (repeat for each release)
   --collector-timeout duration                     Override each collector request deadline with a positive duration. Defaults: 10s access, version and discovery checks, 30s ordinary reads, 2m topology and policy queries, 5m DPS Server and agent metrics, 5m logs and event pages, 15m PRS exports, 20m Zapp sensor catalogs. Under 15s the connectivity check skips the --bmc-firmware read
   --help, -h                                       show help

The --target and --namespace options are required. Without --output-path, the command writes dps-support-bundle-<UTC timestamp>.tar.gz in the current directory.

Example#

The following command collects a bundle from the dps namespace of the my-cluster context. It also reads the DPS Server at dps.example.com and runs the baseboard management controller (BMC) connectivity check through that Server:

dpsctl --host dps.example.com support-bundle --target server \
  --context my-cluster --namespace dps \
  --output-path ./dps-support-bundle.tar.gz

Progress messages go to standard error. On success, a plain-text summary goes to standard output. Its last line names the run, both connection results, and the resolved archive path, as in the following example:

target=server | context=my-cluster | namespace=dps | kubernetes=reachable | dps=reachable | output=/home/operator/dps-support-bundle.tar.gz

The kubernetes and dps values are reachable or unavailable. With --target agent, the dps value is skipped.

Before You Run It#

Confirm the following before you collect a bundle.

Install a Host Binary#

Use a dpsctl binary built for your host platform. This page describes the support-bundle command that has the --bmc-firmware and --collector-timeout options. Run dpsctl support-bundle --help and confirm that it lists both options. An earlier support-bundle command lacks them and also differs from this page in its results and terminal summary. The bundle records the dpsctl version.

The container wrapper in Install via Container mounts only ~/.dpsctl and the current directory, and it does not pass KUBECONFIG into the container. The dpsctl container image also has no Helm executable, so the Helm metadata check would report helm_unavailable there. Run support-bundle with a dpsctl binary installed on the host.

Select the Kubernetes Context#

Select a kubeconfig and context that can read the DPS namespace. The command uses the active KUBECONFIG and the current context unless you set --kubeconfig and --context. The command handles kubeconfig and context problems as follows:

  • A --context that a readable, non-empty kubeconfig does not define stops the command with the error invalid Kubernetes context "<name>" before it creates any bundle or staging file.

  • A missing or empty kubeconfig does not stop the command. The bundle records the Kubernetes access failure with the reason kubeconfig_missing.

  • A kubeconfig that cannot be read, parsed, or used does not stop the command either. The bundle records the reason kubeconfig_invalid.

If your kubeconfig uses an external login helper, confirm that the helper works on this host. Reads that are denied or unavailable appear in the bundle’s results. For the permissions that the command needs, refer to Required Kubernetes Access.

Configure DPS Server Access#

With --target server, the command also reads DPS Server state. Configure the usual dpsctl Server access and authentication first, and set the Server address with --host or DPSCTL_HOST. For authentication setup, refer to Configure Server Authentication.

The Server address must belong to the same DPS deployment as the selected context and namespace. The command does not check this. With another deployment’s address, the bundle holds that deployment’s Server state. Unless you pass --skip-connectivity-check, the BMC connectivity check also contacts that deployment’s BMCs and writes ping results there, even when Kubernetes access fails. To avoid a DPSCTL_HOST value that names another deployment, pass --host on each run.

The command does not fall back to the default localhost address. Without an explicit address, it records the DPS Server connection as unavailable with the reason missing_endpoint and continues with the Kubernetes evidence. Other connection problems do not stop the run either, except an out-of-range --port, a malformed --resolve, or an unknown --auth-mode value on the command line. Those values stop the command with an error before it creates any bundle or staging file. The command records the other problems in dps-connection.json with a reason such as invalid_connection_settings, unreachable, tls_failure, authentication_unavailable, authentication_denied, unsupported_api_contract, timeout, or invalid_api_response.

Use --target agent to collect without the DPS Server API. It sends the API no request and needs no Server address or login. It collects everything else that --target server collects. It reports each Server API item, including the connectivity check and fresh metrics, as skipped with the reason agent_target. It still reads the DPS Server and agent metrics through pods/proxy.

Choose the Output Location#

Choose a new output file name in a private directory. The command resolves the output path, including symbolic links, before it checks Kubernetes access. It stops with an error at that point in the following cases:

  • The output path already exists.

  • The output directory, or one of its parent directories, is not owned by you or by root.

  • The output directory, or one of its parent directories, has group or other write permission and does not have the sticky bit set. A sticky directory owned by root, such as /tmp, passes this check.

The command tests only the write permission bits. It does not check who belongs to the group. For example, a directory with mode 0775, which mkdir creates when your umask is 002, stops the command even when you are the only member of its group. The error message names the first directory that fails a check, counting from /. If no one else needs to write to that directory, remove the permission with chmod go-w <directory>. Otherwise, choose another directory.

Until it publishes the archive, the command keeps the collected evidence, uncompressed, in a staging folder in the output directory. The directory needs room for that evidence and for the archive. The evidence can include up to 1 GiB of logs in total and up to 1 GiB for each GPU control-loop diagnostic export. It can also include up to 256 MiB for each DPS Server or agent metrics response and up to 2 GiB for each Zapp sensor catalog. A control-loop export that is cut short and read again from another Pod can use twice its limit while it is read.

The output file system must also keep owner-only Unix permissions. A directory that does not, such as a Common Internet File System (CIFS) share or a Windows drive mounted in the Windows Subsystem for Linux (WSL), stops the command. The command tests the file system after it checks Kubernetes access and discovers the namespace’s resources, and before it runs the DPS Server access check or starts the BMC connectivity check. The command leaves no staging files behind in that case. With --target server and a Server address, dpsctl can obtain or renew an access token before the command checks the output path, as it does before other commands. To do so, it contacts the DPS Server or your identity provider and saves the new token in the credentials file.

The output file system must also support hard links. The command publishes the archive as a hard link to the verified copy in its staging folder. It does not test hard links in advance. On a file system without them, the run fails only after collection, including any BMC connectivity check. The error then ends with private recovery files retained at <folder>, as described in Interrupted Runs.

To tie bundles from several clusters or namespaces to one incident, give each run the same --incident-label. The bundle records it as incidentLabel in invocation.json and in the run section of manifest.json.

Required Kubernetes Access#

The command reads Kubernetes only through the selected context. It does not run kubectl or ask for another credential. It checks Kubernetes access by listing Pods in the selected namespace. Without list on Pods there, kubernetes-connection.json reports unavailable with the reason forbidden_read, and the command reads nothing else from Kubernetes. The bundle then has no logs, object definitions, Events, Helm metadata, or pods/proxy reads. Without any other permission in the following list, the matching items report a reason such as forbidden_read, and the command still collects the rest of the bundle.

The command needs the following access:

  • In the selected namespace: get and list on Pods, Services, PersistentVolumeClaims, Deployments, StatefulSets, ReplicaSets, DaemonSets, Jobs, PodDisruptionBudgets, NetworkPolicies, and RoleBindings; list on Events, EndpointSlices, and Ingresses; and get on ConfigMaps, ServiceAccounts, and Roles. When those APIs are installed, also list on Gateway API HTTPRoutes and GRPCRoutes, Traefik IngressRouteTCPs, and ServiceMonitors.

  • get on pods/log for container logs.

  • get on pods/proxy for the GPU control-loop diagnostic export through an in-cluster Service, for control-loop, Zapp, and DPS Server and agent metrics, and for Zapp sensor catalogs.

  • Across the cluster: get on Namespaces, Nodes, PersistentVolumes, and ClusterRoles; get and list on ClusterRoleBindings; and list on ServiceMonitors when they are installed.

  • list on ServiceMonitors in the --monitoring-namespace, and list on Events in each other namespace that holds a selected object’s Events: default for cluster-scoped objects such as PersistentVolumes, and the namespace of each selected ServiceMonitor.

The Helm metadata check runs Helm with the same context. Helm lists each selected release’s records in the selected namespace, so the check needs list on Secrets there, or list on ConfigMaps when HELM_DRIVER is configmap. Kubernetes role-based access control (RBAC) cannot limit that grant to Helm’s records, so list on Secrets gives the context read access to all Secrets in the namespace. With the default k8sSecret credentials store, those Secrets can include BMC credentials. The bundle stores only the metadata that Helm returns. Without the grant, each versions:helm:<release> item is unavailable with the reason forbidden_read. Grant it only when you need the Helm metadata.

The built-in view role does not grant pods/proxy. It also lacks other access that this section names, such as Roles, RoleBindings, ClusterRoles, ClusterRoleBindings, Nodes, PersistentVolumes, and the Secrets that hold Helm’s release records.

In-cluster reads go through the Kubernetes API server, so the host that runs dpsctl needs no direct route to the Pods.

When Discovery Is Incomplete#

If the first page of the Pod list cannot be read, for example because the list is denied, discovery stops and selects nothing. The kubernetes:inventory item in manifest.json is then unavailable with the read’s reason, such as forbidden_read, and the command collects no evidence from the namespace.

If the Pod list is cut short after its first page, the bundle does not report a DPS component or workload as having no Pods. If the ReplicaSet list is denied or cut short, it does not report a Deployment as having none. Such a workload is reported as unavailable with the reason discovery_incomplete, and the command does not collect its definition.

A Pod list that is cut short also has the following effects:

  • A ConfigMap that only a withheld workload’s Pod template references is not collected. One that an agent workload’s Pod template references is reported as unavailable with the reason discovery_incomplete, and any other is not listed.

  • Every Service that discovery selected is reported as unavailable with the reason ownership_unverified. The command does not collect its definition, its EndpointSlices, or the routes to it.

  • No read goes through a Service. A GPU control-loop Service URL is rejected with the reason endpoint_not_selected, and the control-loop, Zapp, and DPS Server and agent metrics report source_missing.

Discovery is incomplete when the Pod list is cut short, or when the Service, PersistentVolumeClaim, Deployment, StatefulSet, or ReplicaSet list is denied or cut short. It is also incomplete when a referenced ConfigMap cannot be read for a reason other than its absence, or when an agent’s config.yaml does not parse. The kubernetes:inventory item in manifest.json is then partial. A failed item such as read:Deployments gives the reason of each list that failed, and an unavailable resource:ConfigMap:<namespace>:<name> item names each such ConfigMap. Items that find nothing to collect, such as storage:selection, logs:selection, and versions:helm, are then unavailable with the reason discovery_incomplete instead of skipped. So are the items of an absent optional component, such as the GPU control loop or Zapp, unless complete Pod, Deployment, and StatefulSet lists confirm that it is not installed.

What the Bundle Contains#

The archive holds the following top-level files:

File

Contents

manifest.json

The run’s context, namespace, and target, and one item for each piece of evidence with its source, status, reason, and path

summary.txt

Each item with its status and reason, and the evidence line described in Check the Result

invocation.json

The run’s target, context, cluster, and namespace; its --monitoring-namespace, --incident-label, and --collector-timeout values; whether it enabled the BMC connectivity check, the firmware read, and fresh node metrics; and the check’s effects

kubernetes-connection.json

The result of the Kubernetes access check

dps-connection.json

The result of the DPS Server access check

inventory.json

Each Pod in the namespace, each other resource tied to a selected Pod or workload, and each optional component that discovery did not select, with its outcome and reason. If discovery does not read the Pod, Deployment, or StatefulSet list in full, the file omits such a component unless discovery reads one of its Pods.

evidence/

The evidence files

The selected namespace can contain more than one DPS release. The bundle includes the matching resources of each release and keeps their identities visible. The report describes the availability of the GPU control loop, Zapp, and other optional components.

For each node that runs a selected Pod, the bundle saves the Node’s name, UID, labels, conditions, capacity, allocatable resources, and system information, but not the Node’s Events.

ServiceMonitors#

The bundle collects a ServiceMonitor only when it carries the DPS chart’s metrics labels for the Server or agent of a selected release. Those labels are app.kubernetes.io/component: metrics, app: dps-server or app: dps-server-agent, the release as app.kubernetes.io/instance, and the chart name as app.kubernetes.io/part-of. The ServiceMonitor’s selector must also require that release and app value. In addition, either the ServiceMonitor has no namespaceSelector and is in the selected namespace, or its namespaceSelector has only matchNames, which lists the selected namespace alone. When dps.serviceMonitor.namespace or agent.serviceMonitor.namespace places a ServiceMonitor outside the release namespace and that section’s namespaceSelector is empty, the chart writes that matchNames. The bundle does not collect a ServiceMonitor with any other namespaceSelector, such as any: true, even with --monitoring-namespace.

When the namespace has a selected DPS Server or agent, the command lists ServiceMonitors in the selected namespace and then across the cluster. If the ServiceMonitor API is not installed, it stops after the first list. Without the cluster-wide ServiceMonitor permission, the ServiceMonitor search is reported as partial or unavailable, and the namespace searches still run. --monitoring-namespace adds a list of that namespace between the two when it differs from --namespace. Because the cluster-wide list already covers that namespace, the option helps only when that list is denied, fails, or is cut short, and the ServiceMonitors are in another namespace. invocation.json records the option as monitoringNamespace.

BMC Connectivity Check#

With --target server, the command runs a fresh BMC connectivity check by default. The check contacts the BMCs through DPS, writes ping results, and creates checkpointed DPS task work. A topology activation that the DPS Server receives during the check waits until the check ends. The check has the 30-second limit of ordinary reads, or the --collector-timeout value. Pass --skip-connectivity-check if the run must avoid these effects. For the stand-alone check, refer to dpsctl check connection.

The check pings the nodes of an active topology that have a node status that the bundle saved earlier in the run. When the bundle reads the whole agent list and that list assigns any device to an agent, the check also leaves out each node without an assignment. When the bundle cannot read the whole agent list, or the list assigns no device, the check leaves out no node for a missing assignment. The DPS Server rejects the whole check when any node in it has no agent configuration, and the check is then unavailable with the reason agent_configuration_unavailable.

The manifest lists each node of an active topology that the check leaves out as a skipped item with the reason no_agent_assignment or recorded_status_absent. If the check leaves out every node, it sends no request, and the dps:connectivity-check item is unavailable. The reason is agent_configuration_unavailable when the check leaves out every node for a missing agent assignment. Otherwise, the reason is recorded_snapshot_unavailable, for example when the bundle could not read node status. The manifest also lists each node that the bundle found only in inactive topologies as a dps:live-check-excluded:<node> item, even when the check does not run. That item is skipped with the reason inactive_topology, or unavailable with the reason active_membership_unknown when the bundle could not read the model of every active topology in full. The check and fresh metrics do not read those nodes. Without an active topology, the check is skipped with the reason no_active_topology.

A DPS agent turns a node away when all of its device call slots are busy. The DPS chart sets the slot count with agent.capabilities.deviceControl.maxConcurrentCalls, which defaults to 1,000. Such a node is listed among the check’s failures with the error device controller overloaded, and the dps:connectivity-check item is partial. With a DPS Server from an earlier release, such a check instead runs to its time limit and returns no result for any node.

BMC Firmware Versions#

Pass --bmc-firmware to also read each reached BMC’s fixed firmware inventory items during the check. The read uses Redfish GET requests and saves the versions in evidence/dps/bmc-firmware.json. The read is off by default because each read holds the agent’s device call slot for up to 10 seconds longer, and those slots also serve power-control requests.

The firmware item, dps:bmc-firmware in manifest.json, reports the result as follows:

  • Without --bmc-firmware, the item is skipped with the reason not_selected, unless the whole check was skipped. In that case, the item has the check’s status and reason.

  • With --bmc-firmware and a --collector-timeout under 15 seconds, the check only pings the BMCs, and the item is skipped with the reason collector_timeout_too_short, unless the whole check was skipped. In that case, the item has the check’s status and reason.

  • With --bmc-firmware, a DPS Server from an earlier release ignores the request for firmware. When such a Server returns the check’s result, the item is unavailable with the reason unsupported_api_contract, and the bundle has no bmc-firmware.json. The dps:connectivity-check item still reports the check’s result, and evidence/dps/connectivity-check.json still holds the ping results.

  • The DPS Server leaves out any firmware item that it could not read. A node with versions is therefore partial with the reason firmware_completeness_unknown in bmc-firmware.json, never complete, and the dps:bmc-firmware item is at best partial with the same reason.

  • A node that failed the check gets no firmware and is unavailable with the reason node_check_failed in bmc-firmware.json. When the Server’s reply does not account for every checked node, a node that is not listed as failed and has no firmware version is unavailable with the reason ping_result_unknown.

  • When the Server’s reply accounts for every checked node, a node that is not listed as failed and has no firmware version is unavailable with the reason firmware_not_reported. The reply does not say why. Either the node’s DPS agent is from an earlier release and does not read firmware, or the agent could not read any of the fixed firmware inventory items.

  • When the Server can return firmware but its reply has no version for any checked node, the dps:bmc-firmware item is unavailable with the reason no_firmware_entries.

DPS service metrics are read after the check, so the agent’s Redfish request counts include the check’s own requests. With --bmc-firmware, they include 4xx responses for firmware inventory items that a platform does not have.

What invocation.json Records#

invocation.json records what the run enabled before any collector starts:

  • connectivityCheckEnabled is true when the run enables the check. --target agent and --skip-connectivity-check turn it off.

  • bmcFirmwareEnabled is true when the check is enabled, --bmc-firmware is set, and the --collector-timeout override is at least 15 seconds or not set.

  • connectivityCheckEffects lists the effects of the enabled check, including the firmware read when bmcFirmwareEnabled is true. It is empty when the check is off.

  • metricsCheckEnabled is true when the run sets --metrics-check with --target server.

The dps:connectivity-check item in manifest.json reports whether the check ran and its result. evidence/dps/connectivity-check.json lists the firmware read among its effects only when bmcFirmwareEnabled is true and the DPS Server can return firmware. It lists the read even when no BMC returns a version, for example when every ping fails or the agents are from an earlier release.

Fresh Node Metrics#

Pass --metrics-check to also read fresh metrics for the active topology’s nodes. When the DPS Server’s full agent list assigns at least one device, the read leaves out each node without an agent assignment. The manifest lists each such node as a skipped item, dps:metrics-excluded:<node>, with the reason no_agent_assignment. If the read leaves out every node, it sends no request, and the dps:metrics-check item is unavailable with the reason agent_configuration_unavailable. If the command cannot read the full agent list, or the list assigns no device, the read requests every node of the active topology. The DPS Server then rejects the whole request if any node lacks agent configuration, and the item reports the same status and reason. The read is off by default and is available only with --target server. It does not depend on the connectivity check.

The metrics for all selected nodes arrive in one reply, which the command keeps only up to 16 MiB. For nodes that each report 8 GPUs, 2 CPUs, and 32 DIMMs, the reply passes 16 MiB at about 5,900 to 7,400 nodes. A larger reply is not kept, and the item reports the reason recorded_result_limit.

GPU Control-Loop Diagnostic Export#

For each deployed GPU control-loop release, use a separate --prs-endpoint option to pass a diagnostic URL for its Config Service or Controller Service. The URL path must be exactly /api/dump. The command handles the URLs as follows:

  • A URL whose scheme is not http or https, or whose path is not exactly /api/dump, such as /prs/api/dump or /api/dump/, is rejected with the reason invalid_endpoint.

  • An http URL of a control-loop Service with its port, http://<service>.<namespace>.svc:<port>/api/dump, is read through the Kubernetes API. The same URL with .svc.cluster.local in place of .svc also works. The command tries the Service’s Pods in name order.

  • A Service URL for a namespace other than the selected one, or with a Service name that is not a valid lowercase DNS label, is rejected with the reason endpoint_outside_selected_namespace. A Service URL without a port is rejected with the reason invalid_endpoint_port. Otherwise, a Service URL that does not name a selected control-loop Config Service or Controller Service, for example because of a typo, is rejected with the reason endpoint_not_selected. If the named Service’s release has no selected Pod of that Service’s component, the URL is rejected with the reason selected_prs_pod_missing.

  • Any other http or https URL, including an https Service URL, is dialed directly, so it must be reachable from the host that runs dpsctl. The command uses such a URL only when it finds exactly one control-loop release in the namespace. With more than one release, it rejects the URL with the reason ambiguous_endpoint, so use Service URLs instead. With no control-loop release, it rejects the URL with the reason endpoint_not_selected. The direct request carries no Kubernetes or DPS credential.

  • A release that is given more than one URL gets no export and reports ambiguous_endpoint.

Each URL that the command rejects is listed as an item prs:rejected-endpoint:<n>, where <n> is its position among the --prs-endpoint values, with the rejection as its reason. The item records the URL, except for a URL rejected with the reason invalid_endpoint, which also covers a URL with user information, a query, or a fragment. If any URL is rejected, a release with Pods that has no accepted URL reports endpoint_rejected instead of endpoint_not_supplied, because the rejected URL might have been meant for it.

The control-loop chart enables NetworkPolicies that admit traffic to the Config Service port, 8000, and the Controller Service port, 8001, only from Pods. Traffic through pods/proxy comes from the Kubernetes API server, not from a Pod. Whether those NetworkPolicies block it depends on the route that the API server uses to reach the Pod and on the cluster’s network plugin. A blocked read of the GPU control-loop diagnostic export or control-loop metrics is reported as failed with the reason proxy_unreachable or timeout. Those reasons also have other causes, such as a control-loop Pod that refuses the connection or an export that runs past its time limit.

Add a NetworkPolicy only after the network plugin’s logs or tools show that a policy denied the read. Admit only the source addresses that they report, and only to port 8000 on the control loop’s config Pods and port 8001 on its controller Pods. Those Pods have the label app.kubernetes.io/part-of: power-steering and an app.kubernetes.io/component label of config or controller.

The command reads a GPU control-loop diagnostic export only from a 200 response with the media type application/x-tar or application/octet-stream. A 200 response with any other media type or none, such as an HTML page, is reported as failed with the reason unexpected_content_type. An empty export is reported as unavailable with the reason empty_response. An export, complete or cut short, is kept only when its bytes are a tar archive that passes the collector’s header check. Otherwise, it is reported as failed with the reason invalid_dump_archive and is not kept. Other HTTP statuses have their own reasons, such as endpoint_missing for 404 and export_expired for 410.

Helm Release Metadata#

For each selected DPS release, with either target, the command runs helm get metadata to record the release’s chart, chart version, app version, revision, and status. No option turns this check off. The check needs Helm 3.13 or later, which added helm get metadata. An earlier Helm is reported as helm_query_failed. The command runs Helm as follows:

  • The command runs the Helm executable at --helm-path, which must be an absolute path, or else the helm on PATH. A relative --helm-path is reported as invalid_helm_path, and a Helm that cannot be found is reported as helm_unavailable. The rest of the bundle is still collected.

  • Helm runs in your current directory with your standard input. When the command runs in the foreground of a terminal, Helm also gets that terminal, so a kubeconfig login helper that Helm starts can prompt you there. Ctrl+C at that prompt interrupts the run, as described in Interrupted Runs, and like any other Ctrl+C it also reaches a script or pipeline that runs the command.

  • Helm gets a temporary kubeconfig that holds only the selected context. The command writes it to a dpsctl-support-bundle-kubeconfig-* directory under the system temporary directory and removes it after the query.

  • Helm gets no KUBECONFIG or HELM_* environment variable, except a HELM_DRIVER of secret or configmap. Any other HELM_DRIVER value is replaced with secret.

  • Each query has the 10-second limit of the access and version checks, or the --collector-timeout value.

Time and Read Limits#

Every collector request has a default time limit. dpsctl support-bundle --help lists the defaults, which are shown in the following table:

Request

Default Time Limit

Access, version, and discovery checks

10 seconds

Ordinary reads

30 seconds

Topology and policy queries

2 minutes

DPS Server and agent metrics

5 minutes

Log streams and event pages

5 minutes

GPU control-loop diagnostic exports

15 minutes

Zapp sensor catalogs

20 minutes

--collector-timeout gives every request the same positive time limit in place of its default. It also drops the shared limits of the topology and policy queries and of each Pod read, so a collector can run longer than the value.

A Kubernetes read that starts a kubeconfig login helper can run past its time limit, because the command waits for the helper to exit.

An item with the reason timeout records its time limit as timeLimit in manifest.json, and its line in summary.txt shows the same value as limit=. Most such items record one limit, such as 5m for a log stream. Some record more than one, such as 2m overall, 30s per page for the policy list, and do not say which one they reached. When the DPS Server access check times out, the Server API items that it blocks also report timeout with the check’s limit, 10s by default. With --collector-timeout 10m, every recorded limit is 10m0s. A Helm query that runs out of time reports the reason helm_timeout instead and records no limit.

Size Limits#

Each read has a size limit. A response over its limit keeps the bytes up to the limit and is reported as partial:

  • 32 MiB for each container log stream

  • 256 MiB for each DPS Server or agent metrics response

  • 10 MiB for each GPU control-loop or Zapp metrics response

  • 1 GiB for each GPU control-loop diagnostic export

A Zapp sensor catalog over 2 GiB is reported as failed with the reason catalog_too_large and is not kept. A catalog that passes the collector’s checks is saved as Zapp served it. A complete metrics response must be Prometheus text, and a metrics line longer than 64 KiB is reported as exposition_line_too_long. The command keeps a partial metrics response without checking it.

DPS Server replies have size limits too. The limit is 16 MiB for node status, fresh metrics, the connectivity check, runtime settings, and the agent list. It is 8 MiB for the resource group list and 4 MiB for any other single reply, such as one policy page. A reply over its limit is not kept and is reported with the reason recorded_result_limit.

Count and Retry Limits#

The command makes its reads one at a time, and it limits their number as follows:

  • A Kubernetes list reads at most 20 pages of 500 objects. A longer list keeps the objects that it read and reports the reason pagination_limit_reached. A list whose continue token repeats reports pagination_repeated_token.

  • The policy list reads at most 256 pages of 100 policy bundles and 24 MiB of bundles. It reports page_limit when more pages remain, repeated_page_token when a page token repeats, and recorded_result_limit when the bundles pass 24 MiB.

  • Topology models are read for the first 256 listed topologies. When more are listed, the topology list reports topology_count_limit. Each model keeps at most 10,000 messages and 50,000 entity names, and the topology list, the models, and the referenced entities share 24 MiB.

  • The device, session, and current task lists keep at most 10,000 records and 16 MiB each, and the agent list keeps at most 10,000 agents. A read with more keeps what it read up to the limit and reports recorded_result_limit. The agent list arrives as one reply, so a list over 16 MiB is not kept, and a session list that reaches its limit also ends the agent list at that agent.

  • Referenced entities are read for at most 50,000 names, those of active topologies first, and for no more names than fit in about 4 MiB, the DPS Server’s default request size limit. Names that average more than about 80 bytes reach that size before 50,000 names. One item with the reason referenced_entity_limit counts the names left out. Node status, fresh metrics, and the connectivity check send no request for more than 50,000 selected nodes or more than about 4 MiB of node names, and they report the same reason.

  • A GPU control-loop diagnostic export’s tar headers are checked for at most 100,000 members. A complete export with more members is kept as partial with the reason dump_member_limit_reached.

  • A container log over its size limit is read again for its most recent lines at most three times.

  • A Kubernetes API request, a read through pods/proxy, or a direct control-loop endpoint read is sent again at most 10 times within its time limit. For example, the command sends it again after a 429 or 5xx response whose Retry-After header gives a number of seconds.

  • A control-loop export or metrics read through a Service tries the Service’s selected Pods in name order, each with its own time limit. It moves to the next Pod only when a Pod cannot be reached, times out, cuts its answer short, lacks the endpoint, was replaced or went away, or is terminating or not one of the Service’s backends. A denied or unexpected answer ends the read. An unready backend is read like a ready one, and the item records its readiness. Zapp metrics and DPS Server and agent metrics are read from every selected Pod.

  • A DPS Server request that returns one reply is retried at most five times within its time limit when it fails as unavailable, timed out, aborted, or out of resources. It is not retried when the connection is refused, the Server name does not exist, there is no route to the Server, or a TLS certificate fails verification. Fresh metrics and the connectivity check are sent once, as are the streamed topology model, referenced entity, device, and current task reads.

Container Logs#

All container logs in one bundle share a 1 GiB budget. Logs after the budget is used are reported as unavailable with the reason log_budget_exhausted. The command also reads and reports container logs as follows:

  • A container log over its size limit is read again as a window of its most recent lines that fits the limit, with the reason log_recent_window. When the newest lines are much longer than older ones, the window can hold fewer lines than would fit.

  • When no such window can be read, the log keeps its first bytes with the reason log_byte_limit and can lack the newest lines. This happens, for example, when its last line alone is over the limit, or when the container restarted or the kubelet rotated the log file between the reads.

  • A container log request that is refused, times out, or is canceled is reported as failed with that reason, or as partial when bytes arrived first.

  • The command reads a log’s Pod before it requests the log and again after it reads the log. A log whose Pod is gone before the log is read, or is replaced at either Pod read, is reported as unavailable and is not kept. A log whose Pod is gone only at the second Pod read stays in the bundle as partial with the reason pod_disappeared, unless the log request failed.

  • Each container, including init containers, also gets an item for its previous log, from the instance before its last restart. The command requests that log only when the Pod, read just before, shows that the container restarted or has a last terminated state. Otherwise, the item is not_applicable with the reason no_previous_instance, and no log request is sent. A previous log that the kubelet no longer keeps is reported as unavailable with the reason history_not_retained.

The Kubernetes API serves only the kubelet’s current file of each container log, so a busy container’s log can start well after the container did. The command reads logs before the diagnostic export, so the control-loop Pods’ logs end before the export. Read them again if the export fails. The command asks the kubelet to start each log line with an RFC 3339 timestamp and a space. The manifest item of a saved log that has lines records the first line’s timestamp as firstLineAt. If that line does not start with such a timestamp, the item has no firstLineAt, and its timestamps value is unavailable.

Events#

The API server deletes an Event one event time to live (TTL), 1 hour by default, after its last update. So that a long run keeps the oldest Events, the command lists the selected namespace’s Events before any other collector runs, in the step kubernetes/namespace-events. An Event recorded in the selected namespace after that list is not in the bundle. Each events: item for an object whose Events are in the selected namespace records that list’s start time as observedAt.

The last step, kubernetes/events, selects those objects’ Events from that list. In the same step, the command reads by UID the Events of the selected objects whose Events are in other namespaces: cluster-scoped objects such as PersistentVolumes, whose Events are in default, and ServiceMonitors in other namespaces. Their oldest Events can expire before that read.

Protected Metrics#

If the chart enables dps.metrics.authentication.enabled, the DPS Server metrics endpoint requires an OpenID Connect (OIDC) bearer token, which the collector does not send through the Kubernetes API proxy. The dps-server service metrics item then fails with the reason unauthorized. Collect those metrics from your own Prometheus instead. For details, refer to Protect the Metrics Endpoint.

Interrupted Runs#

Ctrl+C (SIGINT) or SIGTERM ends a run that is still collecting, but not always at once:

  • An interrupt before the progress line support-bundle: collecting dps/connectivity appears stops the run before that step, so neither the BMC connectivity check nor any later collector runs.

  • After that line appears, the remaining collectors still run and print their progress lines, but their reads are canceled.

The command then creates no archive, exits with status 1, and prints the error support-bundle interrupted; private recovery files retained at <folder>. A second Ctrl+C or SIGTERM does not end it sooner. If a Kubernetes read is waiting for a kubeconfig login helper, the command does not end until the helper exits. Ctrl+C in a terminal also reaches the helper, but a signal sent only to the dpsctl process does not. The command ignores Ctrl+C and SIGTERM while it writes, verifies, and publishes the archive, which it starts after the progress line support-bundle: finished kubernetes/events. In that case, the command completes the archive and exits with status 0.

<folder> is the run’s staging folder in the output directory. Its name is .dps-support-bundle-stage- followed by a random number, and the leading dot hides it from a plain ls. It has owner-only permissions: the folder and the folders in it have mode 0700, and its files have mode 0600. It holds invocation.json, kubernetes-connection.json, dps-connection.json, inventory.json, and the files under evidence/ that the collectors staged before the run stopped. It can hold the same unmasked logs and configuration as a bundle. It has no manifest.json or summary.txt, so nothing in it records the status of each evidence file, and a GPU control-loop diagnostic export or container log that was being read when the interrupt arrived can end early.

Run the command again to create a bundle. The interrupted run created no archive, so the same --output-path works. The command does not delete the staging folder. Delete it unless it holds evidence that a new run cannot collect again, such as the logs of a Pod that has since been replaced. In that case, keep it private and review it before you share it, as you would a bundle. Other failures that end with private recovery files retained at <folder> also keep their staging folder. Handle it the same way.

A signal that the command does not handle, such as SIGKILL, or SIGHUP when the terminal closes, ends it at once, also while it writes the archive. The command then prints no message that names its staging folder. Such a signal can leave the following files and folders behind:

  • In the output directory, the run’s .dps-support-bundle-stage-* staging folder, with the unmasked evidence staged so far. It can include a Zapp sensor catalog that the command was still reading or checking for credential-named fields. After the command starts to write the archive, the folder can also hold manifest.json, summary.txt, and the archive file .bundle.tar.gz, which can be incomplete.

  • In the system temporary directory, a dpsctl-support-bundle-kubeconfig-* folder that holds a copy of the selected kubeconfig context and its credentials.

Delete the kubeconfig folder. Delete the staging folder unless it holds evidence that a new run cannot collect again. In that case, first delete its Zapp sensor catalogs, the *-manifest.json files under evidence/zapp/. Then keep the folder private and review it before you share it, as you would a bundle.

Check the Result#

The terminal summary counts statuses by component, with the reasons of partial, failed, unavailable, and skipped items. The archive’s summary.txt lists each item with its status and reason. The statuses are complete, partial, failed, unavailable, skipped, not_applicable, and deferred.

The command can keep a Pod response other than a log although it could not confirm the Pod or Service after the transfer. The item’s entry in manifest.json then also records verification, the reason that the first failed check gave, such as pod_disappeared or forbidden_read. summary.txt and the terminal summary do not show verification, so they can list or count such an item as complete. A log kept in that case is partial instead, with the check’s reason as its reason, unless the log read itself failed. Check the status and the reason, and check manifest.json for any verification, before you use the bundle.

After the counts, the terminal summary and summary.txt give one evidence line:

  • No DPS evidence was collected. when no complete or partial item has a file under evidence/, other than the dpsctl version and an empty volume list.

  • DPS evidence: collected (none from the DPS Server API). when the command saved evidence but none of it came from the DPS Server API, for example with --target agent or when the Server was not reached. DPS Server and agent metrics are read through pods/proxy, so they do not count as Server API evidence.

  • DPS evidence: collected. otherwise.

The archive can hold files for items that are unavailable or skipped, so a file’s presence alone does not show that the command collected its source. For example, a bundle that reports No DPS evidence was collected. can still hold evidence/storage/prs-database-location.json, whose item is unavailable with the reason discovery_incomplete.

The following commands list the archive and print its summary and manifest:

tar -tzf ./dps-support-bundle.tar.gz
tar -xOf ./dps-support-bundle.tar.gz summary.txt
tar -xOf ./dps-support-bundle.tar.gz manifest.json

Privacy#

The archive is readable only by its owner. Logs and selected configuration, including the ConfigMaps that selected Pods reference, such as a customer-supplied agent.existingConfigMap, can still contain data that the source components wrote or credentials that an operator put there. Review the contents before you share the bundle.

The command does not copy Kubernetes Secret objects, and it does not promise to mask arbitrary text in logs or ConfigMaps. It also does not copy a referenced ConfigMap that holds a SeaweedFS security.toml in its data or in its kubectl.kubernetes.io/last-applied-configuration annotation. One such ConfigMap is <release>-seaweedfs-security-config, into which the control-loop chart generates JWT signing keys when global.seaweedfs.enableSecurity is on. The bundle lists that ConfigMap as skipped with the reason credential_config_withheld. The item is resource:ConfigMap:<namespace>:<name> in manifest.json, or objects:ConfigMap:<namespace>:<name> when the ConfigMap gains security.toml after discovery reads it.

The command also does not keep a Zapp sensor catalog that has a credential-named field. Such a field is a JSON key anywhere in the catalog whose name contains password, privatekey, credential, authorization, apikey, token, or secret. The match ignores case, underscores, and hyphens, so a key such as api-key or tokens also matches. The bundle lists that catalog’s zapp:catalog:<component>:<namespace>:<pod> item as failed with the reason credential_field_present.