Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1781520

Summary: [4.3] `oc adm taint` without effect given failed with confusing error
Product: OpenShift Container Platform Reporter: Liang Xia <lxia>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED WONTFIX QA Contact: zhou ying <yinzhou>
Severity: low Docs Contact:
Priority: medium    
Version: 4.3.0CC: aos-bugs, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1781522 (view as bug list) Environment:
Last Closed: 2019-12-11 15:50:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1781522    

Description Liang Xia 2019-12-10 08:04:44 UTC
Description of problem:
Try to add taint,
$ oc adm taint nodes lxia10-j6jlg-w-a-drb5b.c.openshift-qe.internal disks=localstorage
it failed with below errors,
error: invalid taint spec: disks=localstorage, name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')
See 'oc adm taint -h' for help and examples

The help info shows "A taint consists of a key, value, and effect". Above failure prompts about name part, this confuses user. Instead it should prompt no effect is given.


Version-Release number of selected component (if applicable):
openshift-clients-4.3.0-201912060615.git.1.37110a9.el7.x86_64
$ oc version -o yaml --client
clientVersion:
  buildDate: "2019-12-06T11:24:15Z"
  compiler: gc
  gitCommit: 3fa38ed2761a75d4c648acfc8ac14df930219ed5
  gitTreeState: clean
  gitVersion: v4.3.0
  goVersion: go1.12.12
  major: ""
  minor: ""
  platform: linux/amd64


How reproducible:
Always

Steps to Reproduce:
1. $ oc adm taint nodes lxia10-j6jlg-w-a-drb5b.c.openshift-qe.internal disks=localstorage

Actual results:
$ oc adm taint nodes lxia10-j6jlg-w-a-drb5b.c.openshift-qe.internal disks=localstorage
error: invalid taint spec: disks=localstorage, name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')
See 'oc adm taint -h' for help and examples


Expected results:
Taints added.


Additional info:

Comment 1 Maciej Szulik 2019-12-11 15:50:41 UTC
This is a low priority, cosmetic change that will be fixed in the master.