Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-2134

pt-k8s-debug-collector prints errors when connects to PostgreSQL or MySQL (non-PXC) operators

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 3.5.0
    • 3.5.1
    • pt-k8s-debug-collector
    • None
    • Yes
    • Yes
    • 30

    Description

      pt-k8s-debug-collector defaults option -resource to pxc. It causes issues when connected to MongoDB or PostgreSQL operators.

      E.g.,

      $ /home/sveta/src/percona-toolkit/bin/pt-k8s-debug-collector 
      2022/12/02 18:33:54 Start collecting cluster data
      2022/12/02 18:33:59 Error: get resource podsecuritypolicies in namespace default: error: <nil>, stderr: Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
      , stdout: apiVersion: v1
      items: []
      kind: List
      metadata:
        resourceVersion: ""
      2022/12/02 18:34:04 Error: get resource pxc in namespace default: error: exit status 1, stderr: error: the server doesn't have a resource type "pxc"
      , stdout: 
      2022/12/02 18:34:04 Error: get resource perconaxtradbbackups in namespace default: error: exit status 1, stderr: error: the server doesn't have a resource type "perconaxtradbbackups"
      , stdout: 
      2022/12/02 18:34:05 Error: get resource perconaxtradbclusterbackups in namespace default: error: exit status 1, stderr: error: the server doesn't have a resource type "perconaxtradbclusterbackups"
      , stdout: 
      2022/12/02 18:34:05 Error: get resource perconaxtradbclusterrestores in namespace default: error: exit status 1, stderr: error: the server doesn't have a resource type "perconaxtradbclusterrestores"
      , stdout: 
      2022/12/02 18:34:06 Error: get resource perconaxtradbclusters in namespace default: error: exit status 1, stderr: error: the server doesn't have a resource type "perconaxtradbclusters"
      , stdout: 
      2022/12/02 18:34:10 Error: get resource podsecuritypolicies in namespace kube-node-lease: error: <nil>, stderr: Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
      , stdout: apiVersion: v1
      items: []
      kind: List
      metadata:
        resourceVersion: ""
      2022/12/02 18:34:14 Error: get resource pxc in namespace kube-node-lease: error: exit status 1, stderr: error: the server doesn't have a resource type "pxc"
      , stdout: 
      2022/12/02 18:34:14 Error: get resource perconaxtradbbackups in namespace kube-node-lease: error: exit status 1, stderr: error: the server doesn't have a resource type "perconaxtradbbackups"
      , stdout: 
      

      While Kubernetes data is collected, we should not print this error.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sveta.smirnova Sveta Smirnova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist