eb-local.cvmfs

module eb-local.cvmfs  src/cvmfs.zig[source][autodoc]

CernVM-FS checks for eb-local doctor --cvmfs. A build does not call any of this, and it sets no client variable.

Types

pub const Repo = struct[source][autodoc]

The repository path doctor stats, and the name cvmfs_config probe takes.

path: []const u8[source]
name: []const u8[source]
pub const Mount = enum[source][autodoc]

What a stat of the repository mount means.

ok[source]
enotconn[source]
eio[source]
absent[source]
pub const ProxyMode = enum[source][autodoc]

Whether the client uses a proxy, talks directly, or has no setting.

unset[source]
direct[source]
proxy[source]
pub const Proxy = struct[source][autodoc]

The HTTP proxy the client would use, and the file or variable it came from.

mode: ProxyMode = .unset[source]
value: []const u8 = ""[source]
from: []const u8 = ""[source]
host_injected: bool = false[source]

True when CVMFS_HTTP_PROXY in the process environment won over the files.

pub const Tool = struct[source][autodoc]

One run of cvmfs_config or srun.

present: bool = false[source]
code: u32 = 0[source]
timed_out: bool = false[source]
pub const ParallelKind = enum[source][autodoc]

Why a parallel metadata read ran, or why it did not.

off[source]
stale[source]
outside[source]
srun_ok[source]
srun_fail[source]
srun_timeout[source]
fork_ok[source]
fork_fail[source]
pub const Parallel = struct[source][autodoc]

A parallel metadata read, or why it did not run.

kind: ParallelKind = .off[source]
tasks: u8 = 0[source]
code: u32 = 0[source]

Functions

pub fn repository(env: *const std.process.Environ.Map) Repo[source][autodoc]

EESSI_CVMFS_REPO when it is absolute, otherwise the public EESSI repository.

pub fn mountState(path: []const u8, forced: ?[]const u8) Mount[source][autodoc]

forced is a test seam: ENOTCONN, EIO, ABSENT or OK. Otherwise stat path.

pub fn readProxy(a: Allocator, env: *const std.process.Environ.Map, config_root: []const u8, repo_name: []const u8) Allocator.Error!Proxy[source][autodoc]

The effective CVMFS_HTTP_PROXY. A non-empty environment value wins. Otherwise the last assignment in the client files wins, from default.conf through config.d/<repo>.local. DIRECT is direct mode.

pub fn runTool(a: Allocator, exe: ?[]const u8, argv: []const []const u8, envp: proc.Envp) Tool[source][autodoc]

Run argv[0], already an absolute path. A missing program is present = false.

pub fn parallelProbe(a: Allocator, repo: []const u8, tasks: u8, in_job: bool, stale: bool, srun: ?[]const u8, envp: proc.Envp) Parallel[source][autodoc]

Read repository metadata from tasks processes. srun, when its path is set, runs srun -n N stat <repo>. Otherwise this process forks. A stale mount and a shell outside an allocation are not probed.