Created attachment 1521234 [details] engine log Description of problem: Tring to add, via REST API, a HP3PAR managed storage domain with property 'hpe3par_cpg' (CPG that exist on the stoage of course) with more than one letter like 'SSD_r5' fails with the error below. It looks like we/CinderLib are parsing the 'hpe3par_cpg' value expecting a list and not a string so it takes the first letter only 'S' (see from error below ' CPG (S) doesn't exist on array') Engine log: 2019-01-17 10:09:15,322+02 INFO [org.ovirt.engine.core.common.utils.cinderlib.CinderlibExecutor] (default task-73) [9da5f8df-cd9b-4957-b5e7-279ca9c3419d] cinderlib output: Invalid input received: CPG (S) doesn't exist on array 2019-01-17 10:09:15,330+02 ERROR [org.ovirt.engine.core.bll.storage.disk.managedblock.GetManagedBlockStorageStatsCommand] (default task-73) [9da5f8df-cd9b-4957-b5e7-279ca9c3419d] Failed to fetch Managed block storage stats, output: 'Invalid input received: CPG (S) doesn't exist on array', '{}': org.codehaus.jackson.JsonParseException: Unexpected character ('I' (code 73)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@3a8c040f; line: 1, column: 2] at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433) [jackson-core-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521) [jackson-core-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442) [jackson-core-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1198) [jackson-core-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:485) [jackson-core-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770) [jackson-mapper-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718) [jackson-mapper-asl-1.9.13.jar:1.9.13] Version-Release number of selected component (if applicable): Software Version:4.3.0-0.4.master.20190106162157.gitd96a412.el7 How reproducible: 100% Steps to Reproduce: 1. Try to add via RESTAPI a HP3PAR managed storage with 'hpe3par_cpg' that exist with more than one letter like 'SSD_r5'(see excat REST request used in 'Additional info' section) RESTAPI that was used: Method: POST Headers: content-type →application/xml Authorization -> Basic Auth ( Username: admin@internal, Password: 123456) URL: https://storage-ge-08.scl.lab.tlv.redhat.com/ovirt-engine/api/storagedomains Body: <storage_domain> <name>cinder-hp3par</name> <type>managed_block_storage</type> <storage> <type>managed_block_storage</type> <driver_name>hpe</driver_name> <driver_options> <property> <name>hpe3par_api_url</name> <value>https://3par-cli.mgmt.lab3.tlv.redhat.com:8080/api/v1</value> </property> <property> <name>san_ip</name> <value>10.35.84.14</value> </property> <property> <name>san_login</name> <value>admin</value> </property> <property> <name>san_password</name> <value>Qum!0net</value> </property> <property> <name>hpe3par_username</name> <value>3paredit</value> </property> <property> <name>hpe3par_password</name> <value>123456</value> </property> <property> <name>hpe3par_cpg</name> <value>SSD_r5,</value> </property> <property> <name>volume_driver</name> <value>cinder.volume.drivers.hpe.hpe_3par_fc.HPE3PARFCDriver</value> </property> <property> <name>hpe3par_debug</name> <value>False</value> </property> <property> <name>hpe3par_iscsi_chap_enabled</name> <value>False</value> </property> <property> <name>hpe3par_snapshot_retention</name> <value>48</value> </property> <property> <name>hpe3par_snapshot_expiration</name> <value>72</value> </property> <property> <name>max_over_subscription_ratio</name> <value>20.0</value> </property> <property> <name>reserved_percentage</name> <value>15</value> </property> </driver_options> </storage> <host> <name>host_mixed_1</name> </host> </storage_domain> Actual results: Action fails with the following error at engine log: Engine log: 2019-01-17 10:09:15,322+02 INFO [org.ovirt.engine.core.common.utils.cinderlib.CinderlibExecutor] (default task-73) [9da5f8df-cd9b-4957-b5e7-279ca9c3419d] cinderlib output: Invalid input received: CPG (S) doesn't exist on array 2019-01-17 10:09:15,330+02 ERROR [org.ovirt.engine.core.bll.storage.disk.managedblock.GetManagedBlockStorageStatsCommand] (default task-73) [9da5f8df-cd9b-4957-b5e7-279ca9c3419d] Failed to fetch Managed block storage stats, output: 'Invalid input received: CPG (S) doesn't exist on array', '{}': org.codehaus.jackson.JsonParseException: Unexpected character ('I' (code 73)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@3a8c040f; line: 1, column: 2] Expected results: Action should not fail, it looks like using regular(open stack cinder with the same storage works) so this looks either an our(Rhv) issue or cinderLib driver issue. Additional info: A work around is to create a CPG at HP3PAR storage itself with 1 letter for exmple I created a CPG named 'O' and the REST request worked.
This bug has not been marked as blocker for oVirt 4.3.0. Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.
This issue has been fixed in cinderlib Version: 0.3.4
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason: [No relevant external trackers attached] For more info please contact: infra
Verified on ovirt-engin Version:4.3.1.1-0.1.el7 cinderlib Version: 0.3.9
This bugzilla is included in oVirt 4.3.1 release, published on February 28th 2019. Since the problem described in this bug report should be resolved in oVirt 4.3.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.