Bug 1508023
| Summary: | NPE when adding fence agent through REST API using nonexistent host UUID | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Petr Matyáš <pmatyas> | ||||
| Component: | BLL.Infra | Assignee: | Eli Mesika <emesika> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Matyáš <pmatyas> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.2.0 | CC: | bugs, mperina, oourfali, pmatyas | ||||
| Target Milestone: | ovirt-4.2.0 | Keywords: | AutomationBlocker, Regression | ||||
| Target Release: | --- | Flags: | rule-engine:
ovirt-4.2+
rule-engine: blocker+ |
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-12-20 11:39:59 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Petr Matyáš
2017-10-31 17:25:54 UTC
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP. Unable to reproduce on master : curl -v -u "$user@$domain:$password" -H "Content-type: application/xml" --insecure -X POST $url/ovirt-engine/api/hosts/$host-uuid/fenceagents -d "<agent><address>$ip</address><concurrent>false</concurrent><order>1</order><password>$user-passwd</password><type>$type</type><username>$user</username></agent>" Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 127.0.0.1... * TCP_NODELAY set * Connected to laptop.emesika.com (127.0.0.1) port 8080 (#0) * Server auth using Basic with user 'admin@internal' > POST /ovirt-engine/api/hosts/6fbf21d8-1ada-4f7a-8ab9-3e4d61727f3d/fenceagents HTTP/1.1 > Host: laptop.emesika.com:8080 > Authorization: Basic YWRtaW5AaW50ZXJuYWw6YQ== > User-Agent: curl/7.51.0 > Accept: */* > Content-type: application/xml > Content-Length: 189 > * upload completely sent off: 189 out of 189 bytes < HTTP/1.1 201 Created < Connection: keep-alive < Location: http://laptop.emesika.com:8080/ovirt-engine/api/v4/ovirt-engine/api/hosts/6fbf21d8-1ada-4f7a-8ab9-3e4d61727f3d/fenceagents/b856934b-37ec-4117-930b-ff8b656daa34 < Content-Type: application/xml;charset=UTF-8 < Content-Length: 568 < Correlation-Id: e7286067-0bd0-45a7-9212-989c21e64ec6 < Date: Tue, 07 Nov 2017 10:47:55 GMT < <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <agent href="/ovirt-engine/api/hosts/6fbf21d8-1ada-4f7a-8ab9-3e4d61727f3d/fenceagents/b856934b-37ec-4117-930b-ff8b656daa34" id="b856934b-37ec-4117-930b-ff8b656daa34"> <address>XXXXXXXX</address> <encrypt_options>false</encrypt_options> <order>1</order> <password>XXXXXXX</password> <type>apc_snmp</type> <username>XXXXXX</username> <host href="/ovirt-engine/api/hosts/6fbf21d8-1ada-4f7a-8ab9-3e4d61727f3d" id="6fbf21d8-1ada-4f7a-8ab9-3e4d61727f3d"/> </agent> * Curl_http_done: called premature == 0 * Connection #0 to host laptop.emesika.com left intact I just reproduced this on ovirt-engine-4.2.0-0.0.master.20171106202508.gitf5140b9.el7.centos.noarch with the same exception. From the log it seems that you are trying to execute the operation with an invalid host uuid , can you please verify that the uuid you are giving in the REST API call is valid Anyway, this is really a potential NPE in the code and I will fix that so in such cases you will get a "Host not found" message and not an NPE Yeah, you were right, I didn't check the hosts uuid and it was wrong. And yes, it would be nice to get some meaningful message and no NPE. Verified on ovirt-engine-4.2.0-0.0.master.20171113223918.git25568c3.el7.centos.noarch This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report. |