Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-29858: Only extract node role from properly formatted node-role label #28585

Merged
merged 1 commit into from Feb 26, 2024

Commits on Feb 9, 2024

  1. Only extract node role from properly formatted node-role label

    The convention is a format like `node-role.kubernetes.io/role: ""`, not
    `node-role.kubernetes.io: role`, however ROSA uses the latter format to
    indicate the `infra` role. This changes the node watch code to ignore
    it.
    
    The current code panics when run against a ROSA cluster:
    
    ```
      E0209 18:10:55.533265      78 runtime.go:79] Observed a panic: runtime.boundsError{x:24, y:23, signed:true, code:0x3} (runtime error: slice bounds out of range [24:23])
      goroutine 233 [running]:
      k8s.io/apimachinery/pkg/util/runtime.logPanic({0x7a71840?, 0xc0018e2f48})
      	k8s.io/apimachinery@v0.27.2/pkg/util/runtime/runtime.go:75 +0x99
      k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0x1000251f9fe?})
      	k8s.io/apimachinery@v0.27.2/pkg/util/runtime/runtime.go:49 +0x75
      panic({0x7a71840, 0xc0018e2f48})
      	runtime/panic.go:884 +0x213
      github.com/openshift/origin/pkg/monitortests/node/watchnodes.nodeRoles(0x7ecd7b3?)
      	github.com/openshift/origin/pkg/monitortests/node/watchnodes/node.go:187 +0x1e5
      github.com/openshift/origin/pkg/monitortests/node/watchnodes.startNodeMonitoring.func1(0
    ```
    stbenjam committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    7fd01a1 View commit details
    Browse the repository at this point in the history