Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cache/cache_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ func CheckCacheSentinelLocation() error {
// should have director-test- as the prefix
func LaunchDirectorTestFileCleanup(ctx context.Context) {
server_utils.LaunchWatcherMaintenance(ctx,
[]string{filepath.Join(param.Cache_NamespaceLocation.GetString(), "pelican", "monitoring")},
[]string{filepath.Join(param.Cache_NamespaceLocation.GetString(), server_utils.MonitoringBaseNs)},
"cache director-based health test clean up",
time.Minute,
func(notifyEvent bool) error {
// We run this function regardless of notifyEvent to do the cleanup
dirPath := filepath.Join(param.Cache_NamespaceLocation.GetString(), "pelican", "monitoring")
dirPath := filepath.Join(param.Cache_NamespaceLocation.GetString(), server_utils.MonitoringBaseNs)
dirInfo, err := os.Stat(dirPath)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion github_scripts/osx_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ sudo mkdir -p "$xrootd_libdir"
sudo ln -s "$PWD/release_dir/lib/libXrdHttpPelican-5.so" "$xrootd_libdir"
popd

git clone --recurse-submodules --branch v0.6.5 https://github.com/PelicanPlatform/xrootd-s3-http.git
git clone --recurse-submodules --branch v0.6.6 https://github.com/PelicanPlatform/xrootd-s3-http.git
pushd xrootd-s3-http
mkdir build
cd build
Expand Down
2 changes: 1 addition & 1 deletion images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ARG XRDCL_PELICAN_VER=1.6.2
ARG XROOTD_LOTMAN_SRC_BUILD=false
ARG XROOTD_LOTMAN_VER=0.0.5
ARG XROOTD_S3_HTTP_SRC_BUILD=true
ARG XROOTD_S3_HTTP_VER=0.6.5
ARG XROOTD_S3_HTTP_VER=0.6.6
# Installed from Koji if not building it from source.
ARG XRDHTTP_PELICAN_SRC_BUILD=false
ARG XRDHTTP_PELICAN_VER=0.0.11
Expand Down
3 changes: 2 additions & 1 deletion lotman/lotman_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import (
"github.com/pelicanplatform/pelican/config"
"github.com/pelicanplatform/pelican/param"
"github.com/pelicanplatform/pelican/server_structs"
"github.com/pelicanplatform/pelican/server_utils"
)

var (
Expand Down Expand Up @@ -752,7 +753,7 @@ func configLotsFromFedPrefixes(nsAds []server_structs.NamespaceAdV2) (map[string
}
for _, nsAd := range nsAds {
// Skip monitoring namespaces
if strings.HasPrefix(nsAd.Path, "/pelican/monitoring") {
if strings.HasPrefix(nsAd.Path, server_utils.MonitoringBaseNs) {
continue
}
var issuer string
Expand Down
4 changes: 2 additions & 2 deletions origin/origin_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
// Configure XrootD directory for both self-based and director-based file transfer tests
func ConfigureXrootdMonitoringDir() error {
pelicanMonitoringPath := filepath.Join(param.Origin_RunLocation.GetString(),
"export", "pelican", "monitoring")
"export", server_utils.MonitoringBaseNs)

uid, err := config.GetDaemonUID()
if err != nil {
Expand Down Expand Up @@ -69,7 +69,7 @@ func ConfigureXrootdMonitoringDir() error {
// from diector-based/self tests. There could be dangling files due to
// error in testing
func LaunchOriginFileTestMaintenance(ctx context.Context) {
monitoringDir := filepath.Join(param.Origin_RunLocation.GetString(), "export", "pelican", "monitoring")
monitoringDir := filepath.Join(param.Origin_RunLocation.GetString(), "export", server_utils.MonitoringBaseNs)

server_utils.LaunchWatcherMaintenance(
ctx,
Expand Down
6 changes: 3 additions & 3 deletions xrootd/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ func GenerateDirectorMonitoringIssuer() (issuer Issuer, err error) {
}
issuer.Name = "Federation-based Monitoring"
issuer.Issuer = fedInfo.DiscoveryEndpoint
issuer.BasePaths = []string{"/pelican/monitoring"}
issuer.BasePaths = []string{server_utils.MonitoringBaseNs}
issuer.DefaultUser = "xrootd"

return
Expand Down Expand Up @@ -1145,10 +1145,10 @@ func EmitScitokensConfig(server server_structs.XRootDServer) error {
}
cacheIssuer := server_structs.NamespaceAdV2{
Caps: server_structs.Capabilities{PublicReads: false, Reads: true, Writes: true},
Path: "/pelican/monitoring",
Path: server_utils.MonitoringBaseNs,
Issuer: []server_structs.TokenIssuer{
{
BasePaths: []string{"/pelican/monitoring"},
BasePaths: []string{server_utils.MonitoringBaseNs},
IssuerUrl: *serverIssuer,
},
},
Expand Down
7 changes: 6 additions & 1 deletion xrootd/resources/xrootd-origin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ posc.trace {{.Logging.OriginOss}}
# We don't use the Origin.UploadTempLocation directly because
# of the relative path semantics.
posc.prefix /in-progress
{{- if or .Origin.SelfTest .Origin.DirectorTest}}
# Bypass POSC for monitoring paths so that self/director test files
# are written directly (they live on a different filesystem in K8s).
posc.bypass {{.Origin.MonitoringPrefix}}
{{- end}}
{{end}}
{{else if eq .Origin.StorageType "s3"}}
ofs.osslib libXrdS3.so
Expand Down Expand Up @@ -159,7 +164,7 @@ all.export {{.FederationPrefix}}
{{- end}}
{{- if or .Origin.SelfTest .Origin.DirectorTest }}
# Note we don't want to export this via cmsd; only for self-test
xrootd.export /pelican/monitoring
xrootd.export {{.Origin.MonitoringPrefix}}
xrootd.export /.well-known
{{- end}}
{{- if .Server.DropPrivileges}}
Expand Down
4 changes: 2 additions & 2 deletions xrootd/self_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import (

const (
selfTestBody string = "This object was created by the Pelican self-test functionality"
selfTestDir string = "/pelican/monitoring/selfTest"
selfTestDir string = server_utils.MonitoringBaseNs + "/selfTest"
selfTestPrefix string = "self-test-"
)

Expand Down Expand Up @@ -289,7 +289,7 @@ func generateFileTestScitoken() (string, error) {
fTestTokenCfg.Lifetime = time.Minute
fTestTokenCfg.Issuer = issuerUrl
fTestTokenCfg.Subject = "cache"
fTestTokenCfg.AddResourceScopes(token_scopes.NewResourceScope(token_scopes.Wlcg_Storage_Read, "/pelican/monitoring/selfTest"))
fTestTokenCfg.AddResourceScopes(token_scopes.NewResourceScope(token_scopes.Wlcg_Storage_Read, selfTestDir))
// For self-tests, the audience is the server itself
fTestTokenCfg.AddAudienceAny()

Expand Down
2 changes: 2 additions & 0 deletions xrootd/xrootd_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ type (
EnableListings bool
EnableAtomicUploads bool
SelfTest bool
MonitoringPrefix string
Concurrency int
Port int
FederationPrefix string
Expand Down Expand Up @@ -1174,6 +1175,7 @@ func ConfigXrootd(ctx context.Context, isOrigin bool) (string, error) {
return "", errors.Wrap(err, "failed to generate Origin export list for xrootd config")
}
xrdConfig.Origin.Exports = originExports
xrdConfig.Origin.MonitoringPrefix = server_utils.MonitoringBaseNs

switch xrdConfig.Origin.StorageType {
case "https":
Expand Down
Loading