Skip to content

Conversation

@cplaursen
Copy link
Contributor

We're looking to remove the prefix matching that our homebrew HTTP server does with routes, so I've updated a couple things in the code to remove any reliance on this behaviour. In particular:

  • The Python RPC library makes requests to the /RPC2 endpoint, which used to get redirected by the prefix matching, so I've added that as a valid endpoint.
  • nbd was making requests to "/var/xapi/xapi" in error, as this is the socket it was connecting to.
  • "uri" in the HTTP server actually referred to the path, not the entire uri - changed this.

@cplaursen
Copy link
Contributor Author

In addition, we've recently removed requests to /host_rrds and /vm_rrds that XenCenter was making (prefix-matched to /host_rrd and /vm_rrd) - should we add these for compatibility, and indicate that they should be eventually removed?

@cplaursen cplaursen force-pushed the fix_uris branch 3 times, most recently from 8e69e34 to 8b52a3b Compare October 29, 2025 16:20
@cplaursen cplaursen marked this pull request as draft October 29, 2025 16:27
@cplaursen
Copy link
Contributor Author

Found some RBAC issues when running tests that I'm looking into.

@cplaursen cplaursen force-pushed the fix_uris branch 2 times, most recently from 62af0ed to 9fae088 Compare November 3, 2025 13:23
Requests in the Http library store the request path under the "uri"
field name - query parameters are stored separately.

This is confusing and unhelpful; "path" is clearer and more accurate.

Signed-off-by: Christian Pardillo Laursen <[email protected]>
PyRPC uses "/RPC2" by default, which is currently getting redirected
to "/" by the prefix matching logic on routes. Adding this endpoint in
preparation for removing the prefix matching.

Signed-off-by: Christian Pardillo Laursen <[email protected]>
@cplaursen cplaursen marked this pull request as ready for review November 4, 2025 14:42
Copy link
Member

@robhoes robhoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's one mistake: see above. Other than that it looks good.

XenCenter was using the above paths erroneously until build 8460.
Adding these paths for backwards compatibility.

Signed-off-by: Christian Pardillo Laursen <[email protected]>
Signed-off-by: Christian Pardillo Laursen <[email protected]>
@cplaursen
Copy link
Contributor Author

All done, thanks for spotting that.

@robhoes robhoes added this pull request to the merge queue Nov 13, 2025
Merged via the queue into xapi-project:master with commit d7a029b Nov 13, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants