Bug 1806876

Summary: oc adm prune groups --sync-config=sync.yaml gives ERROR: " panic: runtime error: slice bounds out of range "
Product: OpenShift Container Platform Reporter: Sayali Bhavsar <sbhavsar>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: pmali
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: agawand, aos-bugs, erich, jokerman, maszulik, mfojtik, pmali, sbhavsar
Target Milestone: ---Flags: maszulik: needinfo-
Target Release: 4.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Format result function had a hard coded size. Consequence: Panic occurred when the array was filled with less than hard coded limit. Fix: Limit number of ldap entries based on actual array capacity. Result: Function works correctly formatting results.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:20:54 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 Sayali Bhavsar 2020-02-25 09:04:52 UTC
1.) Description of problem:

while deleting LDAP synchronized groups in openshift with the command:
#oc adm prune groups --sync-config=sync.yaml

gives an error as follows:
~~~
panic: runtime error: slice bounds out of range

~~~

2.) Version-Release number of selected component (if applicable): 3.11.z


3.) How reproducible:
No steps to reproduce


4.)Actual results:
gives the error panic: runtime error: slice bounds out of range
and groups not deleted

5.) Expected results:
groups are deleted. 

6.) Additional info:
Similar error found while running oc client queries in ocp 4.1.z 
https://bugzilla.redhat.com/show_bug.cgi?id=1716550

Comment 2 Maciej Szulik 2020-02-26 11:38:00 UTC
We still need oc to pick the change.

Comment 11 Maciej Szulik 2020-03-31 16:05:42 UTC
This will land with https://github.com/openshift/oc/pull/351

Comment 14 Maciej Szulik 2020-04-06 13:00:41 UTC
The aforementioned PR already landed, moving to qa.

Comment 21 errata-xmlrpc 2020-07-13 17:20:54 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, 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/RHBA-2020:2409