Skip to content

Check for existence of required XRootD plugins before use#3026

Merged
bbockelm merged 6 commits into
mainfrom
copilot/check-required-plugins-existence
May 10, 2026
Merged

Check for existence of required XRootD plugins before use#3026
bbockelm merged 6 commits into
mainfrom
copilot/check-required-plugins-existence

Conversation

Copilot AI commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

Missing Pelican-specific XRootD plugins (libXrdHttpPelican, libXrdS3, libXrdClPelican) cause XRootD startup failures or runtime errors with cryptic messages. Detection happens too late to provide actionable guidance.

Changes

New xrootd/plugin_check.go:

  • Plugin existence validation in ConfigXrootd() before config file generation
  • Search paths: standard lib directories + XRD_PLUGINPATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH
  • Handles XRootD's automatic version suffixing (libXrdHttpPelican-5.so for v5.x)
  • Conditional checks based on configuration:
    • libXrdHttpPelican.so: when Server.DropPrivileges enabled (cache/origin)
    • libXrdS3.so: when Origin.StorageType is "s3"
    • libXrdClPelican.so: all caches (pelican:// URL support)

Error message format:

Required XRootD plugin(s) not found: libXrdHttpPelican.so, libXrdClPelican.so
Please install the missing plugin(s) in one of the following directories:
  /usr/lib
  /usr/lib64
  /usr/local/lib
Or set the XRD_PLUGINPATH, LD_LIBRARY_PATH, or DYLD_LIBRARY_PATH environment variable.
Note: XRootD may add a version suffix to plugin names (e.g., libXrdHttpPelican-5.so)

Platform support: Linux (.so), macOS (.dylib), with environment variable precedence.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cilogon.org
    • Triggering command: /tmp/go-build3516977188/b001/xrootd.test /tmp/go-build3516977188/b001/xrootd.test -test.testlogfile=/tmp/go-build3516977188/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true nIaJ7UXlI e_pubkey.go ux-amd64/pkg/tool/linux_amd64/vet -p github.com/press--norc mpile ux-amd64/pkg/tool/linux_amd64/vet -W olang.org/grpc@v1.67.3/encoding/-errorsas fg 0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/vet . theus/prometheus--64 mpile 0.1-go1.25.0.lin/tmp/ccVgu5b3.o (dns block)
    • Triggering command: /tmp/go-build3252025759/b001/xrootd.test /tmp/go-build3252025759/b001/xrootd.test -test.testlogfile=/tmp/go-build3252025759/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.run=TestHttpOriginConfig fg 0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/vet ists theus/prometheus--64 m 0.1-go1.25.0.lin/tmp/ccVgu5b3.o -o 36021/b779/_pkg_.a m 0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/vet _crypt.go g/grpc/credentia--64 mpile 0.1-go1.25.0.lin/tmp/cc6DDlAE.o (dns block)
  • topology.opensciencegrid.org
    • Triggering command: /tmp/go-build134467915/b001/xrootd.test /tmp/go-build134467915/b001/xrootd.test -test.testlogfile=/tmp/go-build134467915/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true .a -trimpath ux-amd64/pkg/tool/linux_amd64/vet -p rat-go/jwx/v2/jw-V=full mpile ux-amd64/pkg/tool/linux_amd64/vet -w 5qlY-QRxK fg 0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/vet -c /azure-sdk-for-g--64 mpile 0.1-go1.25.0.lin/tmp/ccxPwJdI.o (dns block)
    • Triggering command: /tmp/go-build3516977188/b001/xrootd.test /tmp/go-build3516977188/b001/xrootd.test -test.testlogfile=/tmp/go-build3516977188/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true nIaJ7UXlI e_pubkey.go ux-amd64/pkg/tool/linux_amd64/vet -p github.com/press--norc mpile ux-amd64/pkg/tool/linux_amd64/vet -W olang.org/grpc@v1.67.3/encoding/-errorsas fg 0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/vet . theus/prometheus--64 mpile 0.1-go1.25.0.lin/tmp/ccVgu5b3.o (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Check for existence of required plugins</issue_title>
<issue_description>@jhiemstrawisc noticed that if Pelican-specific XRootD plugins are not in the environment, this is not noticed they're used. In some cases (libXrdHttpPelican, libXrdOssS3), this may cause XRootD to fail startup with difficult-to-understand error messages. In other cases (libXrdClPelican), XRootD starts fine and the missing plugin isn't noticed until objects are downloaded.

In the cache configuration code, check for their existence and give a clearer error message.

Note that XRootD automatically adds the major version to the plugin name. So, libXrdHttpPelican.so in the config file will be libXrdHttpPelican-5.so on disk.

Search the dynamic loader paths for the appropriate plugin names according to the rules for the platform. This may include /etc/ld.so.conf and friends on Linux and multiple environment variables.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@bbockelm bbockelm added enhancement New feature or request cache Issue relating to the cache component origin Issue relating to the origin component labels Jan 23, 2026
Copilot AI changed the title [WIP] Check for existence of required Pelican plugins Check for existence of required XRootD plugins before use Jan 23, 2026
Copilot AI requested a review from bbockelm January 23, 2026 14:52
@bbockelm bbockelm force-pushed the copilot/check-required-plugins-existence branch 2 times, most recently from 28264d9 to 2ef074c Compare January 23, 2026 22:56
@turetske

turetske commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

@bbockelm This seems to share/duplicate the xrootd version work I did. Maybe see about getting copilot to take that into account? Specifically #3092

Comment thread xrootd/plugin_check.go Outdated
@bbockelm bbockelm force-pushed the copilot/check-required-plugins-existence branch from 2804e93 to fd9511e Compare February 21, 2026 16:26
@bbockelm bbockelm marked this pull request as ready for review February 21, 2026 16:34
Comment thread xrootd/plugin_check.go
Comment thread xrootd/plugin_check.go Outdated
Comment thread xrootd/plugin_check.go Outdated
@bbockelm bbockelm force-pushed the copilot/check-required-plugins-existence branch from fd9511e to ee07838 Compare March 21, 2026 14:19
@bbockelm bbockelm requested a review from jhiemstrawisc March 30, 2026 13:42
@bbockelm bbockelm force-pushed the copilot/check-required-plugins-existence branch 2 times, most recently from c587b89 to d2810d4 Compare March 30, 2026 23:40
@bbockelm

Copy link
Copy Markdown
Collaborator

@jhiemstrawisc - I think this one is ready for re-review!

Comment thread xrootd/plugin_check.go Outdated
Copilot AI and others added 6 commits May 9, 2026 22:13
Look at common system locations (and env var-based locations) to
make sure the necessary plugins exist _before_ starting up XRootD.
This also tweaks the existing version detection code to make sure
it is only run once by the binary: seems safe to assume XRootD versions
won't change.
Add additional checks for plugins that can depend on configuration.
@bbockelm bbockelm force-pushed the copilot/check-required-plugins-existence branch from e3054d2 to cfae7bd Compare May 10, 2026 03:13
@bbockelm bbockelm merged commit 1f53608 into main May 10, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cache Issue relating to the cache component enhancement New feature or request origin Issue relating to the origin component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check for existence of required plugins

4 participants