Bug 1323191 - value control at region number selection
Summary: value control at region number selection
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.5.0
Hardware: All
OS: All
high
medium
Target Milestone: GA
: 5.6.0
Assignee: Gregg Tanzillo
QA Contact: Alex Newman
URL:
Whiteboard: appliance:black:cli:validation
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-01 13:39 UTC by Felix Dewaleyne
Modified: 2019-10-10 11:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-25 14:26:26 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

Description Felix Dewaleyne 2016-04-01 13:39:38 UTC
Description of problem:
value control at region number selection

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

How reproducible:
all the time

Steps to Reproduce:
1. when creating the database, choose region 0
2.
3.

Actual results:
it is possible to use the region but this seems to have an impact on the appliance with the collapse of a lot of ids when they are converted from string to number.

Expected results:
do not allow users to choose a region number that breaks the IDs

Additional info:
this is raised more as a question : "do we want to prevent users from using region 0?" or should we promote more care in the conversion of IDs?

Comment 2 Nick Carboni 2016-04-20 16:43:47 UTC
Region number 0 should be fine. It is the default value for all upstream appliances.

If the issue is writing a script to determine the region number from an id, that is implemented here (https://github.com/ManageIQ/manageiq/blob/master/lib/extensions/ar_region.rb#L48-L50). So matching a 13 digit long number is not adequate as we allow quite a large range of region ids (https://github.com/ManageIQ/manageiq/blob/master/gems/pending/appliance_console/database_configuration.rb#L30).

What issue is using region id 0 causing?

Comment 3 Nick Carboni 2016-04-25 14:26:26 UTC
This was caused by flawed logic in customer code.

`if /\d{13}/.match(id_or_name.to_s)` does not properly determine if something is an id or not.


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