Skip to content

Regex fails for kernel-version.full on Raspberry Pi nodes #390

@dbaker-arch

Description

@dbaker-arch

What happened:

Error in logs:
2020/11/18 23:39:01 Ignoring invalid feature value kernel-version.full=5.4.51-v8_: [a valid label must be an empty string or consist of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9])?')]

Additionally, feature.node.kubernetes.io/kernel-version.full does not get applied to the node

What you expected to happen:

Kernel version should be correctly recognized.

How to reproduce it (as minimally and precisely as possible):

My reproduction environment:

  • install k3os (k3s mini kubernetes distro) on raspberry pi 4
  • install nfd (note: since this is arm64 I cross-compiled the container)
  • watch logs

On the host:

# uname -r
5.4.51-v8+

Specifically, the + on the end of the kernel string gets turned into an _ here

Then, the resulting string with a trailing underscore does not meet the required syntax for a feature value.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.9+k3s1", GitCommit:"630bebf94b9dce6b8cd3d402644ed023b3af8f90", GitTreeState:"clean", BuildDate:"2020-09-17T19:05:03Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/arm64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.9+k3s1", GitCommit:"630bebf94b9dce6b8cd3d402644ed023b3af8f90", GitTreeState:"clean", BuildDate:"2020-09-17T19:05:03Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/arm64"}

  • Cloud provider or hardware configuration: raspberry pi 4

  • OS (e.g: cat /etc/os-release): VERSION="k3OS v0.11.1"

  • Kernel (e.g. uname -a): Linux pi4-master 5.4.51-v8+ nfd_gc_test.go: fix multiple import of same pkg #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 aarch64 GNU/Linux

  • Install tools:

  • Network plugin and version (if this is a network-related bug):

  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions