Bug 854499
Summary: | RESTAPI - Wrong number of events when updating tag | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Elena <edolinin> |
Component: | ovirt-engine-restapi | Assignee: | Ori Liel <oliel> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Elena <edolinin> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.1.0 | CC: | acathrow, dyasny, ecohen, iheim, mpastern, Rhev-m-bugs, srevivo, yeylon, ykaul |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | infra | ||
Fixed In Version: | si18 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-12-04 19:59:22 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: |
Description
Elena
2012-09-05 08:14:20 UTC
this cannot be the sdk issue as sdk doesn't carry own logic, you probably used same correlation_id in move tag, check your code pls. Believe me, I'm checking a lot my code before opening a bug. Test scenario: create a tag update a tag name and assign some correlation id to this action search for events with the id assinged above Please run it and let me know if you have different results from mine. Also what is the event 'Tag TagRestTestUpd was moved from root to root by vdcadmin.'? It appears only when using sdk api, not rest (see above examples) please run sdk in debug mode and add the output + server log thanks. send: 'GET /api/tags HTTP/1.1\r\nHost: aqua-rhel.qa.lab.tlv.redhat.com\r\nAccept-Encoding: identity\r\ncookie: JSESSIONID=McOolbPbb-zCdbvoyXwYlHr9\r\nPrefer: persistent-auth\r\nContent-type: application/xml\r\nAuthorization: Basic dmRjYWRtaW5AcWEubGFiLnRsdi5yZWRoYXQuY29tOjEyMzQ1Ng==\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: Date: Wed, 05 Sep 2012 12:34:42 GMT header: Pragma: No-cache header: Cache-Control: no-cache header: Expires: Thu, 01 Jan 1970 02:00:00 IST header: Content-Type: application/xml header: Content-Length: 1939 header: Connection: close send: 'PUT /api/tags/4f9b1176-f72b-11e1-b569-0bfa0dd8375a HTTP/1.1\r\nHost: aqua-rhel.qa.lab.tlv.redhat.com\r\nAccept-Encoding: identity\r\nContent-Length: 285\r\ncookie: JSESSIONID=McOolbPbb-zCdbvoyXwYlHr9\r\nPrefer: persistent-auth\r\nContent-type: application/xml\r\nAuthorization: Basic dmRjYWRtaW5AcWEubGFiLnRsdi5yZWRoYXQuY29tOjEyMzQ1Ng==\r\nCorrelation-Id: 15233\r\n\r\n' send: '<tag href="/api/tags/4f9b1176-f72b-11e1-b569-0bfa0dd8375a" id="4f9b1176-f72b-11e1-b569-0bfa0dd8375a">\n <name>TagRestTestUpd</name>\n <description>Test Tag Description Updates</description>\n <parent>\n <tag id="00000000-0000-0000-0000-000000000000"/>\n </parent>\n</tag>\n' reply: 'HTTP/1.1 200 OK\r\n' header: Date: Wed, 05 Sep 2012 12:34:43 GMT header: Pragma: No-cache header: Cache-Control: no-cache header: Expires: Thu, 01 Jan 1970 02:00:00 IST header: Content-Type: application/xml header: Content-Length: 341 header: Connection: close send: 'GET /api/events;max=-1;case_sensitive=true?search=correlation_id%3D15233 HTTP/1.1\r\nHost: aqua-rhel.qa.lab.tlv.redhat.com\r\nAccept-Encoding: identity\r\ncookie: JSESSIONID=McOolbPbb-zCdbvoyXwYlHr9\r\nPrefer: persistent-auth\r\nContent-type: application/xml\r\nAuthorization: Basic dmRjYWRtaW5AcWEubGFiLnRsdi5yZWRoYXQuY29tOjEyMzQ1Ng==\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' Engine log: 2012-09-05 15:39:56,211 WARN [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8009-6) calling GetConfigurationValueQuery (SupportedClusterLevels) with null version, using default general for version 2012-09-05 15:39:57,798 WARN [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8009-4) calling GetConfigurationValueQuery (SupportedClusterLevels) with null version, using default general for version 2012-09-05 15:40:00,000 INFO [org.ovirt.engine.core.bll.AutoRecoveryManager] (QuartzScheduler_Worker-52) Autorecovering hosts is disabled, skipping 2012-09-05 15:40:01,322 INFO [org.ovirt.engine.core.bll.AutoRecoveryManager] (QuartzScheduler_Worker-52) Autorecovering storage domains is disabled, skipping 2012-09-05 15:40:07,436 WARN [org.ovirt.engine.core.dal.job.ExecutionMessageDirector] (ajp-/127.0.0.1:8009-3) [152338] The message key MoveTag is missing from bundles/ExecutionMessages 2012-09-05 15:40:16,897 INFO [org.ovirt.engine.core.bll.MoveTagCommand] (ajp-/127.0.0.1:8009-3) [152338] Running command: MoveTagCommand internal: false. 2012-09-05 15:40:16,903 INFO [org.ovirt.engine.core.bll.UpdateTagCommand] (ajp-/127.0.0.1:8009-3) [3c798182] Running command: UpdateTagCommand internal: true. 2012-09-05 15:40:17,929 WARN [org.ovirt.engine.core.dal.job.ExecutionMessageDirector] (ajp-/127.0.0.1:8009-3) [152338] The message key UpdateTag is missing from bundles/ExecutionMessages 2012-09-05 15:40:18,904 INFO [org.ovirt.engine.core.bll.UpdateTagCommand] (ajp-/127.0.0.1:8009-3) [152338] Running command: UpdateTagCommand internal: false. Elena, as i told, sdk is ok, please do same as sdk does (using same xmls): 1. get tag 2. change field as in xml, and PUT entire body as sdk did something cause MoveTagCommand to be called, i believe this is api/engine bug and you didn't catch it via restapi as you didn't used entire tag body (as sdk did) for update. You are right. If I'm sending this request in rest api: <tag> <name>TagRestTestUpd</name> <description>Test Tag Description Updates</description> </tag> I'll get only one event. But when providing the whole object (): <tag href="/api/tags/4f9b1176-f72b-11e1-b569-0bfa0dd8375a" id="4f9b1176-f72b-11e1-b569-0bfa0dd8375a"> <name>TagRestTestUpd</name> <description>Test Tag Description Updates</description> <parent> <tag id="00000000-0000-0000-0000-000000000000"/> </parent> </tag> 2 events will be registered although I still change the name only (parent remain the same). Second event looks a little meaningless - "Tag TagRestTestUpd was moved from root to root by vdcadmin". patch posted upstream: http://gerrit.ovirt.org/#/c/7818/ Verified in si18 |