Bug 1367909

Summary: oo-accept-node reports missing quota if filesystem name contains gear uuid
Product: OpenShift Online Reporter: Andy Grimm <agrimm>
Component: ContainersAssignee: Rory Thrasher <rthrashe>
Status: CLOSED WONTFIX QA Contact: DeShuai Ma <dma>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: aos-bugs, jgoulding, jokerman, mmccomas, rthrashe
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:
: 1401124 (view as bug list) Environment:
Last Closed: 2017-05-31 18:22:11 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:
Bug Depends On:    
Bug Blocks: 1277547, 1401124    

Description Andy Grimm 2016-08-17 18:44:20 UTC
Recently we created a separate filesystem for one OpenShift Online gear, and it seemed reasonable to put the gear UUID in the logical volume name.  This caused a failure in oo-accept-node, though, due to this grep:

results = $ALL_QUOTAS.grep(/#{user.name}/)

the code takes the first matching line from this, which in this case is:

*** Report for user quotas on device /dev/mapper/EBSStore02-<UUID>

Instead we should look specifically for lines where the uuid is the first field.  This worked in my tests:

results = $ALL_QUOTAS.grep(/^\s*#{user.name}/)

Comment 1 openshift-github-bot 2016-08-17 21:15:45 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/6153c13bc15033b9fbafbeb847f463a4b3539bb5
Bug 1367909 - Ensure uuid in quota output matches first field in line

Comment 2 Rory Thrasher 2016-08-26 20:37:54 UTC
QA,

Please verify using the following instructions:

1. Create an new app on a new gear.

2. Create a logical volume from additional storage.  Use the gear UUID from step 1 as the name of the volume.  Something like /dev/mapper/EBSStore02-<UUID>

3. Run oo-accept-node.  It should PASS.

Comment 4 DeShuai Ma 2016-12-06 03:17:39 UTC
Verify on devenv_5831.

[root@ip-172-18-8-38 mapper]# ls /dev/mapper/myvg1-myvg1--58462acfee4a68062f000001 
/dev/mapper/myvg1-myvg1--58462acfee4a68062f000001
[root@ip-172-18-8-38 mapper]# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/myvg1/myvg1-58462acfee4a68062f000001
  LV Name                myvg1-58462acfee4a68062f000001
  VG Name                myvg1
  LV UUID                NgIRYj-LDyD-c0zL-Gt4B-vUrq-53O6-0ObwAw
  LV Write Access        read/write
  LV Creation host, time ip-172-18-8-38, 2016-12-05 22:10:35 -0500
  LV Status              available
  # open                 0
  LV Size                52.00 MiB
  Current LE             13
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
[root@ip-172-18-8-38 mapper]# rhc show-app rb20
rb20 @ http://rb20-dma.dev.rhcloud.com/ (uuid: 58462acfee4a68062f000001)
------------------------------------------------------------------------
  Domain:     dma
  Created:    10:04 PM
  Gears:      1 (defaults to small)
  Git URL:    ssh://58462acfee4a68062f000001.rhcloud.com/~/git/rb20.git/
  SSH:        58462acfee4a68062f000001.rhcloud.com
  Deployment: auto (on git push)

  ruby-2.0 (Ruby 2.0)
  -------------------
    Gears: 1 small
[root@ip-172-18-8-38 mapper]# oo-accept-node 
PASS

Comment 5 Eric Paris 2017-05-31 18:22:11 UTC
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.