Bug 1436194 - the amazon best fit method sometimes attempts to select networks that aren't available to the region in use
Summary: the amazon best fit method sometimes attempts to select networks that aren't...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.6.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.9.0
Assignee: Lucy Fu
QA Contact: Matouš Mojžíš
URL:
Whiteboard:
Depends On:
Blocks: 1443571 1443572 1443573
TreeView+ depends on / blocked
 
Reported: 2017-03-27 12:23 UTC by Felix Dewaleyne
Modified: 2020-06-11 13:29 UTC (History)
6 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1443571 1443572 1443573 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:49:31 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Felix Dewaleyne 2017-03-27 12:23:44 UTC
Description of problem:
the amazon  best fit method sometimes atempts to select networks that aren't available to the region in use

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

How reproducible:
1 out of 3 times in reproducer environment, more often for the customer.

Steps to Reproduce:
1. provision against vmware
2.
3.

Actual results:
[----] I, [2017-03-23T13:26:09.504770 #2706:577998]  INFO -- : Q-task_id([miq_provision_42000000000293]) Starting Phase <prepare_volumes>
[----] I, [2017-03-23T13:26:09.533701 #2706:577998]  INFO -- : Q-task_id([miq_provision_42000000000293]) Starting Phase <prepare_provision>
[----] W, [2017-03-23T13:26:09.622634 #2706:577998]  WARN -- : Q-task_id([miq_provision_42000000000293]) MIQ(ManageIQ::Providers::Amazon::CloudManager::Provision#cidr) Cannot convert subnet nil to CIDR because address family mismatch
[----] I, [2017-03-23T13:26:09.623169 #2706:577998]  INFO -- : Q-task_id([miq_provision_42000000000293]) Starting Phase <provision_error>
[----] E, [2017-03-23T13:26:09.642324 #2706:577998] ERROR -- : Q-task_id([miq_provision_42000000000293]) MIQ(ManageIQ::Providers::Amazon::CloudManager::Provision#provision_error) [[NoMethodError]: undefined method `[]' for nil:NilClass] encountered during phase [prepare_provision]

Expected results:
the network selection only includes networks available to the region

Additional info:
the could-init spec did not matter to the provision

Comment 6 Greg McCullough 2017-04-13 17:11:41 UTC
Lucy - I looked into this before and we are handling the nil subnet_mask here:

https://github.com/ManageIQ/manageiq/blob/36199523979022ba75aeba2732c1808d7a8e7536/app/models/miq_provision/pxe.rb#L38

but we are failing at some point after that.  I am not saying the nil subnet_mask and the cause of the error are related, but pointing out what I found.

Still need to try to track that down.  Brandon might be able to help here as well.

Comment 8 CFME Bot 2017-04-18 20:42:05 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/fbf87f1fbc20fe3871f5e802eddb757a6be9033b

commit fbf87f1fbc20fe3871f5e802eddb757a6be9033b
Author:     Lucy Fu <lufu>
AuthorDate: Tue Apr 18 16:10:33 2017 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Tue Apr 18 16:11:06 2017 -0400

    Use fetch_path to handle the case where :ws_values is nil.
    
    When :ws_values is nil, CustomizationTemplate.substitute_erb throws out [NoMethodError]: undefined method `[]' for nil:NilClass.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1436194

 db/fixtures/customization_templates.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 13 Matouš Mojžíš 2017-12-15 12:39:23 UTC
Verified in 5.9.0.13. I was able to provision an instance with SSH key addition template without errors.


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