Bug 1967745 - When setting DNS node placement by toleration to not tolerate master node, effect value should not allow string other than "NoExecute"
Summary: When setting DNS node placement by toleration to not tolerate master node, ef...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: DNS
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.8.0
Assignee: Miciah Dashiel Butler Masters
QA Contact: jechen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-03 18:59 UTC by jechen
Modified: 2021-07-27 23:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 23:11:27 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift kubernetes pull 681 0 None open Bug 1967745: Add DNS custom resource admission 2021-06-03 19:55:43 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:11:38 UTC

Description jechen 2021-06-03 18:59:17 UTC
Description of problem:
When trying to set DNS node placement by toleration to not tolerate master nodes, effect value currently takes misspelled string other than "NoExecute".   A check should be added that only string "NoExecute" is allowed, any other string should not allowed to be set for toleration effect.

Version-Release number of selected component (if applicable):
 4.8.0-0.nightly-2021-06-03-101158

How reproducible:
Edit toleration for default DNS operator with misspelled word "NoExcute"

$ oc edit dns.operator default
spec:
  nodePlacement:
    tolerations:
    - effect: NoExecute
      key: my-dns-test
      operators: Equal
      value: abc
      tolerationSeconds: 3600

Steps to Reproduce:
1.
2.
3.

Actual results:
the string was taken, editing was successful
$ oc get dns.operator default -oyaml
<--snip-->
spec:
  nodePlacement:
    tolerations:
    - effect: NoExcute      <---- should not be allowed
      key: my-dns-test
      tolerationSeconds: 3600
      value: abc
<--snip-->


Expected results:
The string should not be allowed, editing should not be successful.  Only correct string "NoExecute" is allowed.

Additional info:

Comment 2 jechen 2021-06-08 14:16:49 UTC
Verified in 4.8.0-0.nightly-2021-06-08-034312

$ oc get clusterversions.config.openshift.io 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-06-08-034312   True        False         20m     Cluster version is 4.8.0-0.nightly-2021-06-08-034312


Verified on valid string "NoExecute" was accepted, any other invalid string was rejected, was not allowed to be edited into DNS operator yaml file.

Comment 5 errata-xmlrpc 2021-07-27 23:11:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438


Note You need to log in before you can comment on or make changes to this bug.