Bug 1335471 - cloud_network parameter is ignored when provisioning an openstack instance through the api
Summary: cloud_network parameter is ignored when provisioning an openstack instance th...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.5.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.7.0
Assignee: Greg McCullough
QA Contact: Martin Kourim
URL:
Whiteboard: rest:cloud
Depends On:
Blocks: 1317022
TreeView+ depends on / blocked
 
Reported: 2016-05-12 09:37 UTC by Felix Dewaleyne
Modified: 2019-11-14 08:01 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-19 13:20:14 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sample_request.json (635 bytes, text/plain)
2016-05-12 09:37 UTC, Felix Dewaleyne
no flags Details
sample_request.show.json (2.84 KB, text/plain)
2016-05-12 09:42 UTC, Felix Dewaleyne
no flags Details
sample_request.json (805 bytes, text/plain)
2016-05-12 10:21 UTC, Felix Dewaleyne
no flags Details

Description Felix Dewaleyne 2016-05-12 09:37:46 UTC
Created attachment 1156597 [details]
sample_request.json

Description of problem:
when passing cloud_network as an api parameter, the value is ignored and the default network is used instead

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

How reproducible:
all the time

Steps to Reproduce:
1. attach an opentstack environment with several networks configured
2. provision an instance through the interface using a different network than the default
3. provision an instance using the same network ID with the api

Actual results:
the default network is used instead

Expected results:
the network specified is used

Additional info:
cloud_network is passed as "additional_values", but several atempts to pass it as different values provided the same result.
Attempts were made using the GUID from openstack and the UID that cloudforms assigns to the network interface, recovered from a the provisioning through the web ui.

Comment 2 Felix Dewaleyne 2016-05-12 09:42:11 UTC
Created attachment 1156611 [details]
sample_request.show.json

attached theoutput provided when asking the api to show the non-working provision request

Comment 4 Felix Dewaleyne 2016-05-12 10:21:58 UTC
Created attachment 1156628 [details]
sample_request.json

Comment 6 Greg McCullough 2016-05-13 19:18:00 UTC
Please review the write-up here: https://bugzilla.redhat.com/show_bug.cgi?id=1297335#c18

That bug is focused on security_groups but I think it is the same basic issue.

Comment 8 Greg McCullough 2017-04-18 18:49:20 UTC
Dave - Can you please assign to someone in QE to validate this bug.

As stated in the comment above (https://bugzilla.redhat.com/show_bug.cgi?id=1335471#c6) I think this is already resolved based on the changes in PR https://github.com/ManageIQ/manageiq/pull/6388 which enabled setting fields in the Environment tab through the API.  Before that PR any fields on that tab were intentionally skipped.

Comment 9 Dave Johnson 2017-05-02 19:46:46 UTC
Martin, can you try and reproduce this please.  It might require working with the OSP QE team and/or helping them to do it.

Comment 10 Martin Kourim 2017-05-19 08:13:15 UTC
Tested on both OpenStack and EC2, cloud_network is no longer ignored when placement_auto is false.

Response on OpenStack:
{
  "href": "https://<ip_address>/api/provision_requests/2",
  "id": 2,
  "description": "Provision from [cirros] to [test-prov-wmdm]",
  "approval_state": "approved",
  "type": "MiqProvisionRequest",
  "created_on": "2017-05-19T06:57:50Z",
  "updated_on": "2017-05-19T07:18:55Z",
  "requester_id": 1,
  "requester_name": "Administrator",
  "request_type": "template",
  "request_state": "active",
  "message": "[EVM] VM [test-prov-wmdm] Step [CheckProvisioned] Status [Creating VM] Message [Clone of [cirros] to Vm [test-prov-wmdm] is error] Current Retry Number [10]",
  "status": "Ok",
  "options": {
    "use_pre_dialog": false,
    "request_type": "template",
    "initial_pass": true,
    "placement_auto": [
      false,
      0
    ],
    "src_vm_id": [
      25,
      "cirros"
    ],
    "miq_request_dialog_name": "miq_provision_openstack_dialogs_template",
    "customize_enabled": [
      "enabled"
    ],
    "owner_first_name": "Administrator",
    "owner_last_name": "Administratorovich",
    "owner_email": "admin",
    "vm_tags": [],
    "placement_availability_zone": [
      1,
      "nova"
    ],
    "cloud_tenant": [
      null,
      null
    ],
    "cloud_network": [
      4,
      "private3"
    ],
    "security_groups": [
      1,
      "default: Default security group"
    ],
    "floating_ip_address": [
      null,
      null
    ],
    "number_of_vms": [
      1,
      "1"
    ],
    "vm_name": "test-prov-wmdm",
    "schedule_type": [
      "immediately",
      "Immediately on Approval"
    ],
    "schedule_time": "2017-05-20T02:57:50.605-04:00",
    "retirement": [
      0,
      "Indefinite"
    ],
    "retirement_warn": [
      604800,
      "1 Week"
    ],
    "instance_type": [
      1,
      "m1.tiny"
    ],
    "guest_access_key_pair": [
      null,
      null
    ],
    "delete_on_terminate": false,
    "addr_mode": [
      "dhcp",
      "DHCP"
    ],
    "customization_template_id": [
      null,
      null
    ],
    "src_vm_nics": [],
    "src_vm_lans": [],
    "src_ems_id": [
      3,
      "RHOS7-GA"
    ],
    "auto_approve": false,
    "ws_values": {},
    "ws_ems_custom_attributes": {},
    "ws_miq_custom_attributes": {},
    "volumes": [],
    "requester_group": "EvmGroup-super_administrator",
    "delivered_on": "2017-05-19T06:58:09.708Z",
    "user_message": "[EVM] VM [test-prov-wmdm] Step [CheckProvisioned] Status [Creating VM] Message [Clone of [cirros] to Vm [test-prov-wmdm] is error] Current Retry Number [10]"
  },
  "userid": "admin",
  "source_id": 25,
  "source_type": "template",
  "tenant_id": 1,
  "process": true,
  "actions": [
    {
      "name": "approve",
      "method": "post",
      "href": "https://<ip_address>/api/provision_requests/2"
    },
    {
      "name": "deny",
      "method": "post",
      "href": "https://<ip_address>/api/provision_requests/2"
    }
  ]
}


response on EC2:
{
  "href": "https://<ip_address>/api/provision_requests/3",
  "id": 3,
  "description": "Provision from [rhel-63-with-shutdown] to [test-prov-tsxu]",
  "approval_state": "approved",
  "type": "MiqProvisionRequest",
  "created_on": "2017-05-19T07:53:57Z",
  "updated_on": "2017-05-19T07:57:05Z",
  "fulfilled_on": "2017-05-19T07:57:05Z",
  "requester_id": 1,
  "requester_name": "Administrator",
  "request_type": "template",
  "request_state": "finished",
  "message": "[EVM] VM [test-prov-tsxu] IP [<ip_address>] Provisioned Successfully",
  "status": "Ok",
  "options": {
    "use_pre_dialog": false,
    "request_type": "template",
    "initial_pass": true,
    "placement_auto": [
      false,
      0
    ],
    "src_vm_id": [
      30,
      "rhel-63-with-shutdown"
    ],
    "miq_request_dialog_name": "miq_provision_amazon_dialogs_template",
    "customize_enabled": [
      "enabled"
    ],
    "owner_first_name": "Administrator",
    "owner_last_name": "Administratorovich",
    "owner_email": "admin",
    "vm_tags": [],
    "placement_availability_zone": [
      5,
      "us-west-1c"
    ],
    "cloud_network": [
      7,
      "vpc-d946aabc (<ip_address>)"
    ],
    "cloud_subnet": [
      7,
      "subnet-52162a14 (<ip_address>) | us-west-1c"
    ],
    "security_groups": [
      213,
      "default: default VPC security group"
    ],
    "floating_ip_address": [
      null,
      null
    ],
    "number_of_vms": [
      1,
      "1"
    ],
    "vm_name": "test-prov-tsxu",
    "schedule_type": [
      "immediately",
      "Immediately on Approval"
    ],
    "schedule_time": "2017-05-20T03:53:56.867-04:00",
    "retirement": [
      0,
      "Indefinite"
    ],
    "retirement_warn": [
      604800,
      "1 Week"
    ],
    "instance_type": [
      66,
      "m1.small: M1 General Purpose Small"
    ],
    "guest_access_key_pair": [
      null,
      null
    ],
    "monitoring": [
      "basic",
      "Basic"
    ],
    "addr_mode": [
      "dhcp",
      "DHCP"
    ],
    "customization_template_id": [
      null,
      null
    ],
    "src_vm_nics": [],
    "src_vm_lans": [],
    "src_ems_id": [
      5,
      "ec2-west"
    ],
    "auto_approve": false,
    "ws_values": {},
    "ws_ems_custom_attributes": {},
    "ws_miq_custom_attributes": {},
    "requester_group": "EvmGroup-super_administrator",
    "delivered_on": "2017-05-19T07:54:21.549Z",
    "user_message": "[EVM] VM [test-prov-tsxu] IP [<ip_address>] Provisioned Successfully"
  },
  "userid": "admin",
  "source_id": 30,
  "source_type": "template",
  "tenant_id": 1,
  "process": true,
  "actions": [
    {
      "name": "approve",
      "method": "post",
      "href": "https://<ip_address>/api/provision_requests/3"
    },
    {
      "name": "deny",
      "method": "post",
      "href": "https://<ip_address>/api/provision_requests/3"
    }
  ]
}


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