Bug 1405774 - Access to action status doesn't work, returns HTTP 404
Summary: Access to action status doesn't work, returns HTTP 404
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.6.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium with 1 vote
Target Milestone: ovirt-4.1.0-rc
: 4.1.0
Assignee: Juan Hernández
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-18 11:28 UTC by Juan Hernández
Modified: 2017-02-01 14:45 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:45:57 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.1+
mgoldboi: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RESTEASY-1569 0 Major Resolved Regex with parenthesis doesn't work with resource locator 2017-05-16 14:06:28 UTC
oVirt gerrit 68751 0 master MERGED Use non capturing groups in @Path annotations 2017-01-03 16:44:11 UTC
oVirt gerrit 68754 0 master MERGED restapi: Use non-capturing groups for action status 2017-01-20 08:11:54 UTC
oVirt gerrit 69512 0 metamodel_1.1 MERGED Use non capturing groups in @Path annotations 2017-01-03 16:44:30 UTC
oVirt gerrit 69513 0 metamodel_1.0 MERGED Use non capturing groups in @Path annotations 2017-01-03 16:44:51 UTC
oVirt gerrit 69598 0 master MERGED restapi: Update to model 4.2.1 and metamodel 1.2.0 2017-01-04 14:22:58 UTC
oVirt gerrit 69617 0 ovirt-engine-4.1 MERGED restapi: Update to model 4.1.26 and metamodel 1.1.10 2017-01-04 18:00:13 UTC
oVirt gerrit 69640 0 ovirt-engine-4.0 MERGED restapi: Update to model 4.0.40 and metamodel 1.0.23 2017-01-05 13:34:19 UTC
oVirt gerrit 70908 0 ovirt-engine-4.1 MERGED restapi: Use non-capturing groups for action status 2017-01-20 13:14:10 UTC
oVirt gerrit 71073 0 ovirt-engine-4.0 MERGED restapi: Use non-capturing groups for action status 2017-01-24 13:30:11 UTC

Description Juan Hernández 2016-12-18 11:28:35 UTC
The API provides a mechanism to get the status of actions. For example, when a template is imported it returns a response like this:

  <action href="/ovirt-engine/api/storagedomains/123/templates/456/import/789">
    ...
  </action>

The user can then use the provided 'href' to get the status of the action.

Those links to action aren't currently working, they return 404 HTTP error messages.

Apparently this is an issue in the application server, as this used to work with JBoss 7.1.1 but doesn't work with WildFly 10.1.0.

The implementation of the action resource uses the following code:

  @Path("{action: (import|register)}/{oid}")
  ActionResource getActionResource(@PathParam("action") String action, @PathParam("oid") String oid) {
    ...
  }

But apparently the application server isn't handling correctly the parenthesis within the path template.

Note that this also affects version 3.6 of the engine, as it also uses WildFly (version 8).

Comment 1 Juan Hernández 2016-12-19 18:35:36 UTC
If we want to fix this without waiting for a new release of Resteasy/WildFly, we need to apply the following patches:

  https://gerrit.ovirt.org/#/q/topic:RESTEASY-1569

Comment 2 Juan Hernández 2016-12-22 20:22:33 UTC
In the linked Resteasy issue Bartosz Spyrko-Śmietanko is suggesting that using non-capturing groups works correctly. I verified that it does, and adapted the proposed patches. They are now much more simple: just one line.

Comment 3 Oved Ourfali 2017-01-24 08:09:47 UTC
Juan - is that "modified"? Anything missing and pending any review?

Comment 4 Juan Hernández 2017-01-24 08:48:46 UTC
It is missing the backport to 4.0.7. I am working on that.

Comment 5 Juan Hernández 2017-01-24 14:00:38 UTC
Moving to 4.1 and MODIFIED, as 4.0.7 won't be released.

Comment 6 Petr Matyáš 2017-01-31 12:21:44 UTC
Verified on 4.1.0-9


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