xrootd

package
v0.0.0-...-75b087c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCacheXrootdEnv added in v1.0.4

func CheckCacheXrootdEnv(exportPath string, server server_structs.XRootDServer, uid int, gid int) (string, error)

func CheckOriginXrootdEnv added in v1.0.4

func CheckOriginXrootdEnv(exportPath string, server server_structs.XRootDServer, uid int, gid int, groupname string) error

CheckOriginXrootdEnv is almost a misnomer -- it does both checking and configuring. In partcicular, it is responsible for setting up the exports and handling all the symlinking we use to export our directories.

func CheckXrootdEnv added in v1.0.4

func CheckXrootdEnv(server server_structs.XRootDServer) error

func ConfigXrootd added in v1.0.4

func ConfigXrootd(ctx context.Context, origin bool) (string, error)

func ConfigureLaunchers added in v1.0.4

func ConfigureLaunchers(privileged bool, configPath string, useCMSD bool, enableCache bool) (launchers []daemon.Launcher, err error)

func CopyXrootdCertificates

func CopyXrootdCertificates(server server_structs.XRootDServer) error

Copies the server certificate/key files into the XRootD runtime directory. Combines the two files into a single one so the new certificate shows up atomically from XRootD's perspective. Adjusts the ownership and mode to match that expected by the XRootD framework.

func EmitAuthfile added in v1.0.4

func EmitAuthfile(server server_structs.XRootDServer) error

Parse the input xrootd authfile, add any default configurations, and then save it into the xrootd runtime directory

func EmitIssuerMetadata added in v1.0.4

func EmitIssuerMetadata(exportPath string, xServeUrl string) error

func EmitScitokensConfig

func EmitScitokensConfig(server server_structs.XRootDServer) error

Writes out the server's scitokens.cfg configuration

func LaunchDaemons

func LaunchDaemons(ctx context.Context, launchers []daemon.Launcher, egrp *errgroup.Group, portStartCallback func(int)) (pids []int, err error)

func LaunchXrootdMaintenance

func LaunchXrootdMaintenance(ctx context.Context, server server_structs.XRootDServer, sleepTime time.Duration)

Launch a separate goroutine that performs the XRootD maintenance tasks. For maintenance that is periodic, `sleepTime` is the maintenance period.

func ScanLinesWithCont

func ScanLinesWithCont(data []byte, atEOF bool) (advance int, token []byte, err error)

Scan through the lines of a file, respecting line continuation characters. That is,

``` foo \ bar ```

Would be parsed as a single line, `foo bar`.

Follows the ScanFunc interface defined by bufio.

func SetUpMonitoring added in v1.0.4

func SetUpMonitoring(ctx context.Context, egrp *errgroup.Group) error

Set up xrootd monitoring

The `ctx` is the context for listening to server shutdown event in order to cleanup internal cache eviction goroutine and `wg` is the wait group to notify when the clean up goroutine finishes

func WriteCacheScitokensConfig added in v1.0.4

func WriteCacheScitokensConfig(nsAds []server_structs.NamespaceAdV2) error

Writes out the cache's scitokens.cfg configuration

func WriteOriginScitokensConfig added in v1.0.4

func WriteOriginScitokensConfig(exportedPaths []string) error

Writes out the origin's scitokens.cfg configuration

Types

type CacheConfig added in v1.0.4

type CacheConfig struct {
	UseCmsd        bool
	EnableVoms     bool
	CalculatedPort string
	HighWaterMark  string
	LowWatermark   string
	ExportLocation string
	RunLocation    string
	DataLocation   string
	PSSOrigin      string
	Concurrency    int
}

type GlobalCfg added in v1.0.4

type GlobalCfg struct {
	Audience []string
}

XRootD server-wide configurations for SciTokens.

type Issuer added in v1.0.4

type Issuer struct {
	Name            string
	Issuer          string
	BasePaths       []string
	RestrictedPaths []string
	MapSubject      bool
	DefaultUser     string
	UsernameClaim   string
	NameMapfile     string
}

Per-issuer configuration

func GenerateDirectorMonitoringIssuer added in v1.0.4

func GenerateDirectorMonitoringIssuer() (issuer Issuer, err error)

We have a special issuer just for director-based monitoring of the origin.

func GenerateMonitoringIssuer added in v1.0.4

func GenerateMonitoringIssuer() (issuer Issuer, err error)

We have a special issuer just for self-monitoring the origin.

func GenerateOriginIssuer added in v1.0.4

func GenerateOriginIssuer(exportedPaths []string) (issuer Issuer, err error)

type LoggingConfig

type LoggingConfig struct {
	OriginCms       string
	OriginHttp      string
	OriginOfs       string
	OriginOss       string
	OriginScitokens string
	OriginXrd       string
	OriginXrootd    string
	CacheHttp       string
	CacheOfs        string
	CachePfc        string
	CachePss        string
	PssSetOptCache  string
	CacheScitokens  string
	CacheXrd        string
	CacheXrootd     string
}

type OriginConfig added in v1.0.4

type OriginConfig struct {
	Multiuser         bool
	EnableCmsd        bool
	EnableMacaroons   bool
	EnableVoms        bool
	EnablePublicReads bool
	EnableListings    bool
	SelfTest          bool
	CalculatedPort    string
	FederationPrefix  string
	HttpServiceUrl    string
	RunLocation       string
	StorageType       string

	// S3 specific options that are kept top-level because
	// they aren't specific to each export
	S3Region     string
	S3ServiceUrl string
	S3UrlStyle   string
	Exports      []server_utils.OriginExport
}

type PrivilegedXrootdLauncher

type PrivilegedXrootdLauncher struct {
	// contains filtered or unexported fields
}

func (PrivilegedXrootdLauncher) Launch

func (plauncher PrivilegedXrootdLauncher) Launch(ctx context.Context) (context.Context, int, error)

func (PrivilegedXrootdLauncher) Name added in v1.0.4

func (launcher PrivilegedXrootdLauncher) Name() string

type ScitokensCfg added in v1.0.4

type ScitokensCfg struct {
	Global    GlobalCfg
	IssuerMap map[string]Issuer
}

Top-level configuration object for the template

func LoadScitokensConfig added in v1.0.4

func LoadScitokensConfig(fileName string) (cfg ScitokensCfg, err error)

Given a filename, load and parse the file into a ScitokensCfg object

type ServerConfig added in v1.0.4

type ServerConfig struct {
	TLSCertificate            string
	TLSKey                    string
	TLSCACertificateDirectory string
	TLSCACertificateFile      string
}

type UnprivilegedXrootdLauncher

type UnprivilegedXrootdLauncher struct {
	daemon.DaemonLauncher
	// contains filtered or unexported fields
}

type XrootdConfig added in v1.0.4

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

type XrootdOptions added in v1.0.4

type XrootdOptions struct {
	Port                   int
	ManagerHost            string
	ManagerPort            string
	ConfigFile             string
	MacaroonsKeyFile       string
	RobotsTxtFile          string
	Sitename               string
	SummaryMonitoringHost  string
	SummaryMonitoringPort  int
	DetailedMonitoringHost string
	DetailedMonitoringPort int
	Authfile               string
	ScitokensConfig        string
	Mount                  string
	LocalMonitoringPort    int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL