Bug 1402503 - Azure - Provisioning VM via Service fails if OS type is "Unknown"
Summary: Azure - Provisioning VM via Service fails if OS type is "Unknown"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: cfme-future
Assignee: Bill Wei
QA Contact: Leo Khomenko
URL:
Whiteboard: service:stack:vm:azure
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-07 17:06 UTC by Leo Khomenko
Modified: 2017-11-21 15:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-21 15:57:33 UTC
Category: ---
Cloudforms Team: Azure
Target Upstream Version:


Attachments (Terms of Use)

Description Leo Khomenko 2016-12-07 17:06:09 UTC
Description of problem:Provisioning a VM with Services with the built-in Orchestration Template "azure-single-vm-from-user-image" fails if Operating System Type left equal to "Unknown"
Error message "[InvalidTemplate] Deployment template validation failed: 'The provided value 'unknown' for the template parameter 'operatingSystemType' at line '1' and column '601' is not valid. The parameter value is not part of the allowed value(s): 'windows,linux'...."


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


How reproducible:100%


Steps to Reproduce:
1.Create Catalog in Services/Catalogs
2.Add Orchestration Catalog Item to our Catalog
3.Order a Service
4.Fill all fields 
5.Do not change Default value of Operating System Type
6.Submit

Actual results:Request fails (see error above)
Expected results:Validation of Operating System Type

Additional info: available values for OS Type are "windows" and "linux"
even if you copy "azure-single-vm-from-user-image" to extend operatingSystemType with "unknown" - stack creation fails - "Error converting value "unknown" to type 'System.Nullable`1[Microsoft.WindowsAzure.ComputeResourceProvider.API.OSType]'. Path 'properties.storageProfile.osDisk.osType', line 1, position 260."

Comment 3 Bill Wei 2017-01-23 16:01:33 UTC
Erik, can you take a look?
Every appliance should have a service dialog "azure-single-vm-from-useroimage" out of bix. Dynamic textbox "User Image Name" has "Auto Refresh other fields when modified" flag on. Dynamic textbox "Operating System Type" has "Auto refresh" flag on. So when the a user image is selected, it should auto refresh the selection of operating system. The BZ reports it is not working as suppose.

Comment 4 Bill Wei 2017-01-23 16:01:45 UTC
Erik, can you take a look?
Every appliance should have a service dialog "azure-single-vm-from-useroimage" out of bix. Dynamic textbox "User Image Name" has "Auto Refresh other fields when modified" flag on. Dynamic textbox "Operating System Type" has "Auto refresh" flag on. So when the a user image is selected, it should auto refresh the selection of operating system. The BZ reports it is not working as suppose.

Comment 5 eclarizi 2017-01-23 17:54:19 UTC
The reason that the operating system type doesn't get updated to either linux or windows is because the way auto-refresh works for drop-down fields is that if something is selected, and you update the field, it will prefer the already selected value over anything new. Since "unknown" is selected already, it will continue to choose "unknown", and this is expected behavior right now.

I feel like maybe the dynamic drop-down isn't the right choice for this field, as I believe it was originally intended to actually change the list of values, not just which one was selected. If it were a text box, it would automatically update with the correct default value whenever you change the image, and if someone enters in "window" or some other misspelling, we'll just get the same error that it doesn't conform to "linux" or "windows", right?

Comment 6 eclarizi 2017-02-02 20:49:04 UTC
Bill, do you have any insight into what we want to do in this case? It appears this ticket is more focused around the validation on the back end when something improper is submitted. However if the case is more that the drop-downs in the UI should update to a preferred value instead of continuing with a previously selected value, then I can take this back and Greg and I can talk about an RFE that will allow users to override that.

Comment 7 Bill Wei 2017-05-08 20:20:59 UTC
I propose to close this issue with WONTFIX. The original intention was to dynamically change the dropdown based on user's selection on other fields. As Erik explains it is actually not the way how service dialog works. The user will then have to select a correct OS type.

This dialog is not a must but was created as a convenience for customers.


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