Bug 1441319 - [SCVMM] Error during provision to CSVFS storage
Summary: [SCVMM] Error during provision to CSVFS storage
Keywords:
Status: CLOSED ERRATA
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
: 5.9.0
Assignee: Daniel Berger
QA Contact: Leo Khomenko
URL:
Whiteboard: scvmm:provision
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-11 16:34 UTC by Leo Khomenko
Modified: 2018-03-01 13:11 UTC (History)
8 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-01 13:11:36 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 0 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 18:37:12 UTC

Description Leo Khomenko 2017-04-11 16:34:33 UTC
Description of problem: Error while provision to CSVFS is not recognized by CFME
"[EVM] VM [test-provt-w2fi] Step [CheckProvisioned] Status [[JSON::ParserError]: 743: unexpected token at ] Message [[JSON::ParserError]: 743: unexpected token at '']"

Version-Release number of selected component (if applicable):5.7.2.1/5.8.0.9


How reproducible:100%


Steps to Reproduce:
1.provison VM to CSVFS Storage
2.Check error message

Actual results:[EVM] VM [test-provt-w2fi] Step [CheckProvisioned] Status [[JSON::ParserError]: 743: unexpected token at ] Message [[JSON::ParserError]: 743: unexpected token at '']


Expected results:that is how error looks on SCVMM side: 
Error (23001)
Cannot create or update a non highly available virtual machine because the path C:\ClusterStorage\netapp_crud_vol\test-provt-w2fi is a clustered resource.

Comment 3 Jeff Teehan 2017-04-20 16:33:12 UTC
This is not a bug as far as what is happening.  You MUST use an HA template to provision on an HA resource.  The test as performed is expected to fail.  Dan and I are currently looking into the possibility of presenting a better error message.

Comment 4 Daniel Berger 2017-04-20 20:42:54 UTC
I think I see what's happening, in part thanks to Jeff's help.

The issue is that the build_ps_script in cloning.rb is actually running two commands - New-SCVirtualMachine and Set-SCVirtualMachine - and assumes that the first one always succeeds.

What's really happening is that the first command is failing. When I tried to run a deliberately bad provisioning script I get "Cannot create or update a non highly available virtual machine because the path C:\\whatever\\your_vm is a clustered resource."

But you never see that, and it sets $vm to a blank string. Ultimately that blank string is what gets passed back to our code. If you try JSON.parse("") in an irb shell, for example, you will see the same error that the reporter pasted.

So, I need to refactor the cloning.rb file, breaking up the powershell script into two parts, and doing some better error checking for each one.

Comment 5 Daniel Berger 2017-05-10 22:13:04 UTC
Please see https://github.com/ManageIQ/manageiq/pull/14842

Comment 9 errata-xmlrpc 2018-03-01 13:11:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0380


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