Bug 1402354

Summary: openshift-excluder and docker-excluder can not work due to syntax error in excluder file
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Cluster Version OperatorAssignee: Troy Dawson <tdawson>
Status: CLOSED CURRENTRELEASE QA Contact: liujia <jiajliu>
Severity: high Docs Contact:
Priority: high    
Version: 3.4.0CC: aos-bugs, bleanhar, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-08 14:26:14 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:

Description liujia 2016-12-07 10:23:23 UTC
Description of problem:
Run atomic-openshift-excluder and atomic-openshift-docker-excluder, it will do nothing due to an syntax error in /usr/sbin/*excluder* file generated by rpm install.
/usr/sbin/atomic-openshift-excluder: line 27: syntax error near unexpected token `newline'
/usr/sbin/atomic-openshift-excluder: line 27: `  } 1>&'

Version-Release number of selected component (if applicable):
atomic-openshift-docker-excluder-3.4.0.30-1.git.0.e10cc28.el7.noarch
atomic-openshift-excluder-3.4.0.30-1.git.0.e10cc28.el7.noarch


How reproducible:
always

Steps to Reproduce:
1. rpm install ose/ocp on rhel hosts.
2. rpm install corresponding version's atomic-openshift-excluder and atomic-openshift-docker-excluder 
3. run atomic-openshift-excluder and atomic-openshift-docker-excluder
# atomic-openshift-excluder --help
# atomic-openshift-docker excluder --help
# atomic-openshift-excluder exclude
# atomic-openshift-docker excluder exclude

Actual results:
Above commands will do nothing but show syntax error msg.

Expected results:
It should show help msg or config yum.conf.

Comment 1 Troy Dawson 2016-12-07 15:14:21 UTC
The upstream pull request is taking a little while.
https://github.com/openshift/origin/pull/12106

While we are waiting, I put the change in an OSE pull request
https://github.com/openshift/ose/pull/493


This has been merged into ocp and is in OCP v3.4.0.33 or newer.

Comment 2 liujia 2016-12-08 06:51:03 UTC
Version:
atomic-openshift-docker-excluder-3.4.0.33-1.git.0.71c05b2.el7.noarch
atomic-openshift-excluder-3.4.0.33-1.git.0.71c05b2.el7.noarch

Step:
1. rpm install ose/ocp on rhel hosts.
2. rpm install corresponding version's atomic-openshift-excluder and atomic-openshift-docker-excluder 
3. run atomic-openshift-excluder and atomic-openshift-docker-excluder
# atomic-openshift-excluder --help
# atomic-openshift-docker excluder --help
# atomic-openshift-excluder 
# atomic-openshift-docker-excluder 

Result:
It will show right usage msg like following:

Unknown Option: --help

Usage: /usr/sbin/atomic-openshift-excluder <exclude | unexclude>

exclude | disable
  exclude packages via an excludes= line in /etc/yum.conf
  This disables updates for atomic-openshift atomic-openshift-clients atomic-openshift-clients-redistributable atomic-openshift-dockerregistry atomic-openshift-master atomic-openshift-node atomic-openshift-pod atomic-openshift-recycle atomic-openshift-sdn-ovs atomic-openshift-tests tuned-profiles-atomic-openshift-node atomic-openshift-excluder atomic-openshift-docker-excluder packages

unexclude | enable
  removes atomic-openshift atomic-openshift-clients atomic-openshift-clients-redistributable atomic-openshift-dockerregistry atomic-openshift-master atomic-openshift-node atomic-openshift-pod atomic-openshift-recycle atomic-openshift-sdn-ovs atomic-openshift-tests tuned-profiles-atomic-openshift-node atomic-openshift-excluder atomic-openshift-docker-excluder from the excludes= line in /etc/yum.conf
  This re-enables updates for packages


Unknown Option: --help

Usage: /usr/sbin/atomic-openshift-docker-excluder <exclude | unexclude>

exclude | disable
  exclude packages via an excludes= line in /etc/yum.conf
  This disables updates for docker*1.13* docker*1.14* docker*1.15* docker*1.16* docker*1.17* docker*1.18* docker*1.19* docker*1.20* packages

unexclude | enable
  removes docker*1.13* docker*1.14* docker*1.15* docker*1.16* docker*1.17* docker*1.18* docker*1.19* docker*1.20* from the excludes= line in /etc/yum.conf
  This re-enables updates for packages

Bug has been fixed.

Comment 3 Troy Dawson 2016-12-08 14:26:14 UTC
Since this has not been released yet, and no customers were affected, I am marking this Closed.