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

Remove trailing \0 from values read from ppc64le device-tree. #2811

Merged
merged 1 commit into from
Mar 2, 2021
Merged

Remove trailing \0 from values read from ppc64le device-tree. #2811

merged 1 commit into from
Mar 2, 2021

Conversation

dberg1
Copy link
Contributor

@dberg1 dberg1 commented Feb 23, 2021

Values in Power OF device-tree are null-terminated. For example:

$ sudo od -t cx1 /proc/device-tree/system-id
0000000   I   B   M   ,   0   6   7   8   B   2   3   0   0  \0
         49  42  4d  2c  30  36  37  38  42  32  33  30  30  00

The null character needs to be trimmed or otherwise it will be part of the Go string.
This is causing problems with node attribute systemUUID in Kubernetes/OpenShift clusters for ppc64le nodes:

# kubectl get node master-0 -o yaml
 ...
  nodeInfo:
    architecture: ppc64le
    bootID: dab6f6ac-7d18-4411-9b87-9bd990752071
    containerRuntimeVersion: cri-o://1.19.1-7.rhaos4.6.git6377f68.el8
    kernelVersion: 4.18.0-193.41.1.el8_2.ppc64le
    kubeProxyVersion: v1.19.0+1833054
    kubeletVersion: v1.19.0+1833054
    machineID: 5884c39c43a843d78f6051c8485e376a
    operatingSystem: linux
    osImage: Red Hat Enterprise Linux CoreOS 46.82.202101270839-0 (Ootpa)
    systemUUID: "IBM,0678B22C0\0"

For example:
$ sudo od -t cx1 /proc/device-tree/system-id
0000000   I   B   M   ,   0   6   7   8   B   2   3   0   0  \0
         49  42  4d  2c  30  36  37  38  42  32  33  30  30  00
@google-cla
Copy link

google-cla bot commented Feb 23, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Feb 23, 2021
@k8s-ci-robot
Copy link
Collaborator

Hi @dberg1. Thanks for your PR.

I'm waiting for a google member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@iwankgb
Copy link
Collaborator

iwankgb commented Feb 23, 2021

/ok-to-test

@dberg1
Copy link
Contributor Author

dberg1 commented Feb 25, 2021

@googlebot I signed it!

@google-cla
Copy link

google-cla bot commented Feb 25, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@dberg1
Copy link
Contributor Author

dberg1 commented Feb 25, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Feb 25, 2021
@iwankgb
Copy link
Collaborator

iwankgb commented Mar 2, 2021

LGTM

@bobbypage
Copy link
Collaborator

LGTM thanks!

@bobbypage bobbypage merged commit eada4f4 into google:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants