Skip to content

Commit e3054d2

Browse files
committed
Update to reflect xrootd backend and always require xrdhttp-pelican
1 parent d2810d4 commit e3054d2

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

xrootd/plugin_check.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ var pluginPackageMap = map[string]string{
401401
"libXrdHTTPServer": "xrootd-s3-http",
402402
"libXrdOssGlobus": "xrootd-s3-http",
403403
"libXrdPurgeLotMan": "xrootd-lotman",
404+
"libXrdN2NPrefix": "xrdcl-pelican",
404405
}
405406

406407
// pluginBaseName strips the extension from a plugin filename (e.g. "libXrdS3.so" -> "libXrdS3").
@@ -424,10 +425,8 @@ func ValidateRequiredPlugins(isOrigin bool, xrdConfig *XrootdConfig) error {
424425
missingPlugins := []string{}
425426

426427
if isOrigin {
427-
// libXrdHttpPelican is required when drop privileges is enabled
428-
if xrdConfig.Server.DropPrivileges {
429-
checkAndAppendMissing(&missingPlugins, "libXrdHttpPelican.so", false)
430-
}
428+
// libXrdHttpPelican is always required for origins
429+
checkAndAppendMissing(&missingPlugins, "libXrdHttpPelican.so", false)
431430

432431
// libXrdMacaroons is needed when macaroons are enabled
433432
if xrdConfig.Origin.EnableMacaroons {
@@ -456,6 +455,8 @@ func ValidateRequiredPlugins(isOrigin bool, xrdConfig *XrootdConfig) error {
456455
case "globus":
457456
checkAndAppendMissing(&missingPlugins, "libXrdHTTPServer.so", false)
458457
checkAndAppendMissing(&missingPlugins, "libXrdOssGlobus.so", false)
458+
case "xroot":
459+
checkAndAppendMissing(&missingPlugins, "libXrdN2NPrefix.so", false)
459460
}
460461
} else {
461462
// Cache-specific checks

xrootd/plugin_check_test.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,8 @@ func TestCheckPluginExists(t *testing.T) {
367367
}
368368

369369
func TestValidateRequiredPlugins(t *testing.T) {
370-
t.Run("OriginWithDropPrivileges", func(t *testing.T) {
370+
t.Run("OriginAlwaysRequiresHttpPelican", func(t *testing.T) {
371371
xrdConfig := &XrootdConfig{
372-
Server: ServerConfig{
373-
DropPrivileges: true,
374-
},
375372
Origin: OriginConfig{
376373
StorageType: "posix",
377374
},
@@ -430,6 +427,19 @@ func TestValidateRequiredPlugins(t *testing.T) {
430427
}
431428
})
432429

430+
t.Run("OriginWithXrootStorage", func(t *testing.T) {
431+
xrdConfig := &XrootdConfig{
432+
Origin: OriginConfig{
433+
StorageType: "xroot",
434+
},
435+
}
436+
437+
err := ValidateRequiredPlugins(true, xrdConfig)
438+
if err != nil {
439+
assert.Contains(t, err.Error(), "libXrdN2NPrefix.so")
440+
}
441+
})
442+
433443
t.Run("OriginWithMacaroons", func(t *testing.T) {
434444
xrdConfig := &XrootdConfig{
435445
Origin: OriginConfig{

0 commit comments

Comments
 (0)