Bug 1541308

Summary: Provision fails if no Subnet assigned not Cloud Network
Product: Red Hat CloudForms Management Engine Reporter: Leo Khomenko <lkhomenk>
Component: ProvidersAssignee: Alexander Demicev <ademicev>
Status: CLOSED CURRENTRELEASE QA Contact: Omri Hochman <ohochman>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, gblomqui, jfrey, jhajyahy, jhardy, obarenbo
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0Flags: lkhomenk: automate_bug+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: openstack:provision
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1558048 (view as bug list) Environment:
Last Closed: 2019-02-11 14:08:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1558048    

Description Leo Khomenko 2018-02-02 09:12:32 UTC
Description of problem:This happens either manually when we select Cloud Network w/o Subnet or with auto_placement if environment has many Networks w/o Subnets.
part of provision log:

[----] I, [2018-02-02T04:05:40.931494 #29535:ab313c]  INFO -- : Q-task_id([miq_provision_17]) MIQ(ManageIQ::Providers::Openstack::CloudManager::Provision#log_clone_options) Clone Options: [:
name](String) = "test-nosubnet-lkhom"
[----] I, [2018-02-02T04:05:40.931632 #29535:ab313c]  INFO -- : Q-task_id([miq_provision_17]) MIQ(ManageIQ::Providers::Openstack::CloudManager::Provision#log_clone_options) Clone Options: [:
image_ref](String) = "0469c05b-71e5-4913-919d-855af9c91c36"


ERORR:
[----] E, [2018-02-02T04:05:41.968763 #29535:ab313c] ERROR -- : Q-task_id([miq_provision_17]) <Fog> excon.error     #<Excon::Error::BadRequest: Expected([200, 202]) <=> Actual(400 Bad Request)
excon.error.response
  :body          => "{\"badRequest\": {\"message\": \"Network c83e1dd1-70dc-4968-938d-2fb9762a983d requires a subnet in order to boot instances on.\", \"code\": 400}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"               => "137"
    "Content-Type"                 => "application/json; charset=UTF-8"
    "Date"                         => "Fri, 02 Feb 2018 09:05:41 GMT"
    "Openstack-Api-Version"        => "compute 2.1"
    "Vary"                         => "OpenStack-API-Version, X-OpenStack-Nova-API-Version"
    "X-Compute-Request-Id"         => "req-f9ddb6d6-a387-429b-84de-5c743cdaa572"
    "X-Openstack-Nova-Api-Version" => "2.1"
  }
  :host          => "10.8.196.59"
  :local_address => "192.168.100.103"
  :local_port    => 45570
  :path          => "/v2.1/f061fe364a5a48ddaaa84721011a7215/os-volumes_boot"
  :port          => 8774
  :reason_phrase => "Bad Request"
  :remote_ip     => "10.8.196.59"
  :status        => 400
  :status_line   => "HTTP/1.1 400 Bad Request\r\n"
>



Version-Release number of selected component (if applicable):5.8.3.2 / 5.9.0.18


How reproducible:100%


Steps to Reproduce:
1.Create Networks on environment w/o Subnet
2.Provision Instance to such Network


Actual results: Provision failure


Expected results: We shouldn't be able to provision to such Networck - they must be filtered from UI selection and from auto_placement


Additional info: Should it be RFE to add Subnet Option? as Single Network can have multiple Subnets - currently we pick first Subnet

Comment 6 Jad Haj Yahya 2018-07-03 12:15:06 UTC
Verified on 5.10.0.2