Skip to content

Conversation

@bbockelm
Copy link
Collaborator

This adds a simple integration test that downloads a file from a XCache server through another fixture as an origin, then verifies the file is unchanged.

@amadio - the approach is as what we discussed earlier today ... added explicit dependency between fixtures but did not rework how the CMakeLists.txt is working.

@amadio amadio added this to the 5.8.1 milestone Apr 11, 2025
@amadio amadio moved this to In review in Release Planning Apr 11, 2025
This adds a simple integration test that downloads a file from a
XCache server through another fixture as an origin, then verifies
the file is unchanged.
@amadio amadio merged commit 8d11ce3 into xrootd:master Apr 14, 2025
20 of 21 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Release Planning Apr 14, 2025
@amadio
Copy link
Member

amadio commented Apr 14, 2025

This test is failing on my machine as follows:

xrdcp -f /home/amadio/src/xrootd/tests/XRootD/host.cfg root://localhost:5094//host.cfg
xrdcp -f root://localhost:5094//host.cfg host.origin.cfg
diff -u /home/amadio/src/xrootd/tests/XRootD/host.cfg host.origin.cfg
xrdcp -f root://gentoo.cern.ch:7096///host.cfg host.cache.cfg
Run: [ERROR] Server responded with an error: [3011] Unable to open /host.cfg; no such file or directory (source)

error: command "xrdcp -f root://gentoo.cern.ch:7096///host.cfg host.cache.cfg" failed
==> cache/client.log <==
[2025-04-14 14:33:15.744010 +0200][Debug  ][ExDbgMsg          ] [u25@localhost:5094] Calling MsgHandler: 0x7ff92c0351e0 (message: kXR_open (file: /host.cfg, mode: 00, flags: kXR_open_read kXR_4dirlist kXR_async kXR_retstat ) ) with status: [ERROR] Error response: no such file or directory.
[2025-04-14 14:33:15.744026 +0200][Debug  ][File              ] [0x7ff92c001b20@root://u25@localhost:5094//host.cfg?xrdcl.requuid=21798c7c-174c-4efd-83e9-1a9f5cab6601] Open has returned with status [ERROR] Server responded with an error: [3011] Unable to open /host.cfg; no such file or directory
[2025-04-14 14:33:15.744032 +0200][Debug  ][File              ] [0x7ff92c001b20@root://u25@localhost:5094//host.cfg?xrdcl.requuid=21798c7c-174c-4efd-83e9-1a9f5cab6601] Error while opening at u25@localhost:5094: [ERROR] Server responded with an error: [3011] Unable to open /host.cfg; no such file or directory
[2025-04-14 14:33:15.744042 +0200][Debug  ][ExDbgMsg          ] [u25@localhost:5094] Destroying MsgHandler: 0x7ff92c0351e0.
[2025-04-14 14:33:15.744094 +0200][Debug  ][ExDbgMsg          ] [msg: 0x7fc544073a50] Assigned MsgHandler: 0x5582d2af4960.
[2025-04-14 14:33:15.744103 +0200][Debug  ][ExDbgMsg          ] [handler: 0x5582d2af4960] Removed MsgHandler: 0x5582d2af4960 from the in-queue.
[2025-04-14 14:33:15.744146 +0200][Debug  ][XRootD            ] [gentoo.cern.ch:7096] Handling error while processing kXR_open (file: //host.cfg, mode: 00, flags: kXR_open_read kXR_4dirlist kXR_async kXR_retstat ): [ERROR] Error response: no such file or directory.
[2025-04-14 14:33:15.744157 +0200][Debug  ][ExDbgMsg          ] [gentoo.cern.ch:7096] Calling MsgHandler: 0x5582d2af4960 (message: kXR_open (file: //host.cfg, mode: 00, flags: kXR_open_read kXR_4dirlist kXR_async kXR_retstat ) ) with status: [ERROR] Error response: no such file or directory.
[2025-04-14 14:33:15.744173 +0200][Debug  ][File              ] [0x5582d2ae72a0@root://gentoo.cern.ch:7096///host.cfg?xrdcl.requuid=336c9474-c605-4c6c-97a7-eb7a27af11d3] Open has returned with status [ERROR] Server responded with an error: [3011] Unable to open /host.cfg; no such file or directory
[2025-04-14 14:33:15.744178 +0200][Debug  ][File              ] [0x5582d2ae72a0@root://gentoo.cern.ch:7096///host.cfg?xrdcl.requuid=336c9474-c605-4c6c-97a7-eb7a27af11d3] Error while opening at gentoo.cern.ch:7096: [ERROR] Server responded with an error: [3011] Unable to open /host.cfg; no such file or directory
[2025-04-14 14:33:15.744185 +0200][Debug  ][ExDbgMsg          ] [gentoo.cern.ch:7096] Destroying MsgHandler: 0x5582d2af4960.
[2025-04-14 14:33:15.744219 +0200][Debug  ][JobMgr            ] Stopping the job manager...
[2025-04-14 14:33:15.744336 +0200][Debug  ][JobMgr            ] Job manager stopped
[2025-04-14 14:33:15.744340 +0200][Debug  ][Poller            ] Stopping the poller...
[2025-04-14 14:33:15.744481 +0200][Debug  ][TaskMgr           ] Stopping the task manager...
[2025-04-14 14:33:15.744534 +0200][Debug  ][TaskMgr           ] Task manager stopped
[2025-04-14 14:33:15.745107 +0200][Debug  ][AsyncSock         ] [gentoo.cern.ch:7096.0] Closing the socket
[2025-04-14 14:33:15.745113 +0200][Debug  ][Poller            ] <[2001:1458:202:228::100:82]:43294><--><[2001:1458:202:228::100:82]:7096> Removing socket from the poller
[2025-04-14 14:33:15.745130 +0200][Debug  ][PostMaster        ] [gentoo.cern.ch:7096] Destroying stream
[2025-04-14 14:33:15.745134 +0200][Debug  ][AsyncSock         ] [gentoo.cern.ch:7096.0] Closing the socket

@amadio
Copy link
Member

amadio commented Apr 14, 2025

There seems to be a race condition between the host and cache test setups. I will fix.

@bbockelm
Copy link
Collaborator Author

@amadio - indeed, it looks like the setup.sh script does not verify that XRootD is functioning and listening on a port before proceeding. I'm surprised this doesn't lead to other failures?

This is the (ugly) shell code I use to force my unit tests to pause until XRootD is ready:
https://github.com/PelicanPlatform/xrootd-s3-http/blob/main/test/s3-setup.sh#L302-L322

If you know of better ways, I'll be quite interested!

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.

2 participants