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?
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?
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.