Skip to content

kubelet: quote values in node.openshift.io/os_id label, use VERSION_ID instead of VERSION - #549

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
vrutkovs:quote_id_label
Mar 20, 2019
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
vrutkovs:quote_id_label

Conversation

@vrutkovs

@vrutkovs vrutkovs commented Mar 13, 2019 •

Copy link
Copy Markdown
Contributor

Fixes https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-ansible/11343/pull-ci-openshift-openshift-ansible-devel-40-e2e-aws-scaleup/581/build-log.txt
Related to #514

- What I did
Quoted values for labels, assigned from /etc/os-release contents, replaced VERSION with VERSION_ID

- How to verify it
Run openshift-ansible's scaleup playbook on CentOS 7 nodes, check kubelet log:
kubelet_node_status.go:92] Unable to register node "ip-10-0-172-104.ec2.internal" with API server: Node "ip-10-0-172-104.ec2.internal" is invalid: metadata.labels: Invalid value: "7 (Core)": 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])?'')'

- Description for the changelog
Use VERSION_ID in node.openshift.io/os_version label

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 13, 2019
@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-rhel-scaleup

1 similar comment
@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-rhel-scaleup

@runcom

runcom commented Mar 13, 2019

Copy link
Copy Markdown
Member

/cc @sjenning

@rphillips

Copy link
Copy Markdown
Contributor

The single quotes should be double quotes. Single quotes do not usually get variable expansions.

@vrutkovs

Copy link
Copy Markdown
Contributor Author

The single quotes should be double quotes. Single quotes do not usually get variable expansions.

Right, fixed

@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-rhel-scaleup

@rphillips

Copy link
Copy Markdown
Contributor

/lgtm
/retest

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2019
@vrutkovs

Copy link
Copy Markdown
Contributor Author

/retest

@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-rhel-scaleup

@sdodson

sdodson commented Mar 13, 2019

Copy link
Copy Markdown
Member

/test e2e-aws
/test e2e-aws-op

@kikisdeliveryservice

kikisdeliveryservice commented Mar 13, 2019 •

Copy link
Copy Markdown
Contributor

@vrutkovs Can you please describe and point me to/quote the portions of the error logs that are showing the problem this is fixing? They are quite long and you've only provided a link.

Also can you update the commit message to:

add quotes around values in node.openshift.io/os_id

<Some explanation of why you need to do this>

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 14, 2019
@vrutkovs

vrutkovs commented Mar 14, 2019 •

Copy link
Copy Markdown
Contributor Author

@vrutkovs Can you please describe and point me to/quote the portions of the error logs that are showing the problem this is fixing? They are quite long and you've only provided a link.

In CentOS /etc/os-release has:

# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"

so the arguments passed to kubelet look like
--node-labels=node-role.kubernetes.io/master,node.openshift.io/os_version=7 (Core),node.openshift.io/os_id=centos \.
This causes kubelet to crashloop with:
kubelet_node_status.go:92] Unable to register node "ip-10-0-172-104.ec2.internal" with API server: Node "ip-10-0-172-104.ec2.internal" is invalid: metadata.labels: Invalid value: "7 (Core)": 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])?'')'

This PR also uses VERSION_ID instead of VERSION so that it would be a valid k8s label

@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-rhel-scaleup

@vrutkovs vrutkovs changed the title kubelet: quote values in node.openshift.io/os_id label kubelet: quote values in node.openshift.io/os_id label, use VERSION_ID instead of VERSION Mar 14, 2019
@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-rhel-scaleup

@rphillips

Copy link
Copy Markdown
Contributor

/retest

@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-rhel-scaleup

@sdodson

sdodson commented Mar 14, 2019

Copy link
Copy Markdown
Member

According to man os-release VERSION and VERSION_ID both appear to be optional, but at least for the use cases immediately at hand they appear to be populated in all cases. Just something to be aware of.

@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@mtnbikenc

Copy link
Copy Markdown
Member

/retest

@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@vrutkovs

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@kikisdeliveryservice

Copy link
Copy Markdown
Contributor

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2019
VERSION_ID is used instead of VERSION, as it is a lower-case string
 (mostly numeric, no spaces or other characters outside of 0-9, a-z,
 ".", "_" and "-")

DEBUG: remove quotes
@kikisdeliveryservice

Copy link
Copy Markdown
Contributor

@vrutkovs since you aren't using the quotes anymore can you please update the commit and squash?

cc: @cgwalters

@kikisdeliveryservice

Copy link
Copy Markdown
Contributor

thanks @vrutkovs ! I think the vsphere update will fix the failed unit test as well. :)

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2019
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, kikisdeliveryservice, rphillips, vrutkovs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [cgwalters,kikisdeliveryservice]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sdodson

sdodson commented Mar 19, 2019

Copy link
Copy Markdown
Member

/test e2e-aws

@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-aws

1 similar comment
@vrutkovs

Copy link
Copy Markdown
Contributor Author

/test e2e-aws

@sdodson

sdodson commented Mar 20, 2019

Copy link
Copy Markdown
Member

/override ci/prow/e2e-aws
Previous runs show green status for all tests, this failure is a flake.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sdodson: Overrode contexts on behalf of sdodson: ci/prow/e2e-aws

Details

In response to this:

/override ci/prow/e2e-aws
Previous runs show green status for all tests, this failure is a flake.

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.

@openshift-ci-robot

openshift-ci-robot commented Mar 20, 2019 •

Copy link
Copy Markdown
Contributor

@vrutkovs: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-rhel-scaleup 13fd14a7073a99d9894d69f94c1d898f4ee3118b link /test e2e-rhel-scaleup
ci/prow/e2e-aws 17f988e link /test e2e-aws

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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. I understand the commands that are listed here.

@vrutkovs

Copy link
Copy Markdown
Contributor Author

/override ci/prow/e2e-aws-op

Flake, passed previously

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@vrutkovs: vrutkovs unauthorized: /override is restricted to repo administrators

Details

In response to this:

/override ci/prow/e2e-aws-op

Flake, passed previously

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.

@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot
openshift-merge-robot merged commit 7beeb5c into openshift:master Mar 20, 2019
ptalgulk01 pushed a commit to ptalgulk01/machine-config-operator that referenced this pull request May 15, 2026
kubelet: quote values in node.openshift.io/os_id label, use VERSION_ID instead of VERSION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants