Bug 879451

Summary: The response messgae is wrong while using rhc-fix-gear-uids to check non-integeter(string) uid
Product: OKD Reporter: Rony Gong 🔥 <qgong>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.xCC: xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-19 19:26:16 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:

Description Rony Gong 🔥 2012-11-23 03:34:42 UTC
Description of problem:
Since uid "1000.0" is an string, so rhc-fix-gear-uids will change it to Integer or will give vaild exception. but I see the uid changed to 1000 and also throw the exception, this maybe wrong

Version-Release number of selected component (if applicable):
devenv_2509

How reproducible:
always

Steps to Reproduce:
1.Create district env, and create an app
2.Update this app's uid from 1000 to "1000.0" in the mongodb of user collection
3.then run  ./root/.source_build/li/misc/maintenance/bin/rhc-fix-gear-uids
in instance
  
Actual results:
[root@ip-10-145-149-244 /]# ./root/.source_build/li/misc/maintenance/bin/rhc-fix-gear-uids
Gear UID cleanup summary : 
["Gear 'c9d1c7122987443aabe47ded920a8cb2' in app qphp for user 'qgong', needs its uid to be set from '1000.0' to '1000'...done.\n"]

No gears required their uids to be converted from String to Integer!
The following gears converted their uids from String to Integer but FAILED: 
["Gear 'c9d1c7122987443aabe47ded920a8cb2' in app qphp for user 'qgong', needs its uid converted from String to Integer...failed. Because of invalid value for Integer(): \"1000.0\"\n"]


Expected results:
[root@ip-10-145-149-244 /]# ./root/.source_build/li/misc/maintenance/bin/rhc-fix-gear-uids
Gear UID cleanup summary : 
["Gear 'c9d1c7122987443aabe47ded920a8cb2' in app qphp for user 'qgong', needs its uid to be set from '1000.0' to '1000'...done.\n"]

Additional info:

Comment 1 Rajat Chopra 2012-11-27 00:24:31 UTC

The reason we have this check/fix in the script is legacy.. at some point some gears went into a state where the uids were committed as strings. While the Strings may exist (unlikely), the uid stored in a gear will never be a String that is not an Integer. 

Good find.. but it will never happen in reality. Please mark this as 'WONTFIX'.

Comment 2 Rony Gong 🔥 2012-11-27 01:41:23 UTC
Verified as DEV's comment.

Comment 3 Xiaoli Tian 2012-12-26 01:46:29 UTC
(In reply to comment #2)
> Verified as DEV's comment.

According to comment 1, marked it as WONTFIX but not verified.