Skip to content

Commit

Permalink
Xrootd log levels now configurable
Browse files Browse the repository at this point in the history
Moves many of the xrootd log levels to be configurable. Set defaults in
defaults.yaml to what we previously had set.
  • Loading branch information
joereuss12 committed Jan 12, 2024
1 parent 3caae35 commit 5d5ee0d
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 14 deletions.
9 changes: 9 additions & 0 deletions config/resources/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
Debug: false
Logging:
Level: "Error"
XrootdScitokensTrace: all
XrootdPssTrace: all
XrootdCmsTrace: all
XrootdOfsTrace: all
XrootdPfcTrace: info
XrootdXrdTrace: all -sched
XrootdXrootdTrace: emsg login stall redirect
XrootdPssSetOptCache: DebugLevel 3
XrootdPssSetOptOrigin: DebugLevel 1
Server:
WebPort: 8444
WebHost: "0.0.0.0"
Expand Down
68 changes: 68 additions & 0 deletions docs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,74 @@ type: filename
default: none
components: ["*"]
---
name: Logging.XrootdPssSetOptOrigin
description: >-
Configures the XRootD client used by the proxy top communicate with the origin (we use to set debug level).
Values include: DebugLevel (0, 1, 2, 3)
type: string
default: DebugLevel 1
components: ["cache"]
---
name: Logging.XrootdPssSetOptCache
description: >-
Configures the XRootD client used by the proxy top communicate with the cache (we use to set debug level).
Values include: DebugLevel (0, 1, 2, 3)
type: string
default: DebugLevel 3
components: ["cache"]
---
name: Logging.XrootdPssTrace
description: >-
Logging level of pss within Xrootd configuration values include: all, on, debug
type: string
default: all
components: ["cache"]
---
name: Logging.XrootdScitokensTrace
description: >-
Trace level of scitokens debug output within Xrootd configuration. Values include: all, on, debug
type: string
default: all
components: ["origin", "cache"]
---
name: Logging.XrootdCmsTrace
description: >-
Trace level of cms debug output within Xrootd configuration. Values include: all, debug, defer, files, forward, redirect, space, stage
type: string
default: all
components: ["cache"]
---
name: Logging.XrootdOfsTrace
description: >-
Trace level of ofs debug output within Xrootd configuration. Values include: aio, all, chmod, close, closedir, debug, delay, dir, exists,
fsctl, getstats, io, mkdir, most, open, opendir, qscan, read, readdir, redirect, remove, rename, sync, truncate, write
type: string
default: all
components: ["cache"]
---
name: Logging.XrootdPfcTrace
description: >-
Trace level of pfc debug output within Xrootd configuration. Values include: none, error, warning, info, debug, dump
type: string
default: info
components: ["origin"]
---
name: Logging.XrootdXrootdTrace
description: >-
Trace options for Xrootd debug output within Xrootd configuration. Values include: all, auth, debug, emsg, fs, fsaio, fsio, login, mem, off,
pgcserr, redirect, request, response, stall
type: string
default: emsg login stall redirect
components: ["origin"]
---
name: Logging.XrootdXrdTrace
description: >-
Trace options for Xrootd debug output (xrd) within Xrootd configuration. Values include: all, conn, debug, mem, net, none, off, poll, protocol,
sched, tls, tlsctx, tlsio, tlssok
type: string
default: all -sched
components: ["cache"]
---
############################
# Federation-Level Configs #
############################
Expand Down
9 changes: 9 additions & 0 deletions param/parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions param/parameters_struct.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions xrootd/resources/xrootd-cache.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ oss.localroot {{.Cache.DataLocation}}
#oss.space meta {{.Cache.DataLocation}}/meta*
#oss.space data {{.Cache.DataLocation}}/data*
pss.debug
pss.setopt DebugLevel 3
pss.trace all
ofs.trace all
xrd.trace all -sched
cms.trace all
scitokens.trace all
pss.setopt {{.Logging.XrootdPssSetOptCache}}
pss.trace {{.Logging.XrootdPssTrace}}
ofs.trace {{.Logging.XrootdOfsTrace}}
xrd.trace {{.Logging.XrootdXrdTrace}}
cms.trace {{.Logging.XrootdCmsTrace}}
scitokens.trace {{.Logging.XrootdScitokensTrace}}
8 changes: 4 additions & 4 deletions xrootd/resources/xrootd-origin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ ofs.osslib libXrdMultiuser.so default
ofs.ckslib * libXrdMultiuser.so
{{end}}
xrootd.chksum max 2 md5 adler32 crc32
xrootd.trace emsg login stall redirect
pfc.trace info
pss.setopt DebugLevel 1
xrootd.trace {{.Logging.XrootdXrootdTrace}}
pfc.trace {{.Logging.XrootdPfcTrace}}
pss.setopt {{.Logging.XrootdPssSetOptOrigin}}
xrootd.tls all
scitokens.trace all
scitokens.trace {{.Logging.XrootdScitokensTrace}}
21 changes: 17 additions & 4 deletions xrootd/xrootd_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,24 @@ type (
TLSCACertificateFile string
}

LoggingConfig struct {
XrootdScitokensTrace string
XrootdPssTrace string
XrootdCmsTrace string
XrootdOfsTrace string
XrootdPfcTrace string
XrootdXrootdTrace string
XrootdXrdTrace string
XrootdPssSetOptCache string
XrootdPssSetOptOrigin string
}

XrootdConfig struct {
Server ServerConfig
Origin OriginConfig
Xrootd XrootdOptions
Cache CacheConfig
Server ServerConfig
Origin OriginConfig
Xrootd XrootdOptions
Cache CacheConfig
Logging LoggingConfig
}
)

Expand Down

0 comments on commit 5d5ee0d

Please sign in to comment.