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.
Created attachment 1156611 [details] sample_request.show.json attached theoutput provided when asking the api to show the non-working provision request
Created attachment 1156628 [details] sample_request.json
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.
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.
Martin, can you try and reproduce this please. It might require working with the OSP QE team and/or helping them to do it.
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" } ] }