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
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.
https://github.com/ManageIQ/manageiq/pull/14797
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(-)
Verified in 5.9.0.13. I was able to provision an instance with SSH key addition template without errors.