Bug 1448888 - Failed to create subnet
Summary: Failed to create subnet
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: GA
: 5.9.0
Assignee: Tzu-Mainn Chen
QA Contact: Ido Ovadia
URL:
Whiteboard: openstack:sdn
Depends On:
Blocks: 1460034
TreeView+ depends on / blocked
 
Reported: 2017-05-08 13:56 UTC by Ido Ovadia
Modified: 2018-03-06 15:19 UTC (History)
5 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1460034 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:19:07 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.