Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1441319 - [SCVMM] Error during provision to CSVFS storage
[SCVMM] Error during provision to CSVFS storage
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
5.7.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.9.0
Assigned To: Daniel Berger
Leo Khomenko
scvmm:provision
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-11 12:34 EDT by Leo Khomenko
Modified: 2018-03-01 08:11 EST (History)
8 users (show)

See Also:
Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-01 08:11:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 13:37:12 EST

  None (edit)
Description Leo Khomenko 2017-04-11 12:34:33 EDT
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 12:33:12 EDT
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 16:42:54 EDT
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 18:13:04 EDT
Please see https://github.com/ManageIQ/manageiq/pull/14842
Comment 9 errata-xmlrpc 2018-03-01 08:11:36 EST
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.