Bug 1448888

Summary: Failed to create subnet
Product: Red Hat CloudForms Management Engine Reporter: Ido Ovadia <iovadia>
Component: ProvidersAssignee: Tzu-Mainn Chen <tzumainn>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Ovadia <iovadia>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.8.0CC: jfrey, jhardy, obarenbo, simaishi, tzumainn
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: openstack:sdn
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1460034 (view as bug list) Environment:
Last Closed: 2018-03-06 15:19:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1460034    

Description Ido Ovadia 2017-05-08 13:56:30 UTC
Description of problem:
========================
User 'admin' is not authorized to access 'Cloud Tenant' record id '58013000000000000' [cloud_subnet/create]

Version-Release number of selected component (if applicable):
==============================================================
OSPD 11
CFME 5.8.0.13

How reproducible:
=================
On one setup

Steps to Reproduce:
===================
1. As admin navigate to: Networks --> Networks 
   Create a network for admin tenant
2. Navigate to: Networks --> Subnets
   Create a subnet on the network you have created

Actual results:
===============
Unexpected error encountered

Error text:

User 'admin' is not authorized to access 'Cloud Tenant' record id '58013000000000000' [cloud_subnet/create]

Expected results:
=================
Subnet created successfully

Comment 1 Tzu-Mainn Chen 2017-05-22 17:35:07 UTC
It looks like this is caused by large region numbers: the backend code is getting the ID properly:

{"available_tenants":[{"name":"admin","id":58015000000000001}]}

But it gets rendered imprecisely, as Angular does not correctly render such large numbers:

<option label="admin" value="number:58015000000000000">admin</option>

Either large region IDs need to be prevented, or all IDs need to be parsed as strings.

Comment 4 CFME Bot 2017-05-24 08:53:43 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/ce6492d548fd94d6213fbff710074cb3b1fd45ea

commit ce6492d548fd94d6213fbff710074cb3b1fd45ea
Author:     Tzu-Mainn Chen <tzumainn>
AuthorDate: Mon May 22 19:33:19 2017 +0200
Commit:     Tzu-Mainn Chen <tzumainn>
CommitDate: Mon May 22 19:33:19 2017 +0200

    Ensure cloud tenant ID is read as string for cloud subnets
    
    If the region ID is large enough, the cloud tenant ID is not parseable
    as a string by angular.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1448888

 app/controllers/cloud_subnet_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 6 Ido Ovadia 2018-01-11 16:02:53 UTC
Verified
========
5.9.0.16