Documentation
¶
Index ¶
- Constants
- Variables
- func AcmeChallengeKey(token string) (string, error)
- func ApplyRefs(ns string, doc RefsDocument, mode RefsMode) ([]string, error)
- func ApplyRefsUndoable(ns string, doc RefsDocument, mode RefsMode) ([]string, func() error, error)
- func CheckLocalFileStopToChange(p naming.Path, dst string) error
- func CheckLocalUpdateStopToChange(p naming.Path, deletes []string, unsets []key.T, sets []keyop.T) error
- func CheckStopToChange(kind naming.Kind, from, to *xconfig.T, statuses map[string]*instance.Status) error
- func ClusterCAPrivateKey() ([]byte, error)
- func CollectorResponseStatusCheck(resp *http.Response, method, path string, wanted []int) error
- func ConsumersInstallWarnings(err error) ([]string, error)
- func DecodeSecValueWith(value, clusterName, secret string) ([]byte, error)
- func DescribeComputeClaims(m map[string]int64) string
- func ForgetWrites(varDir, nodename string) error
- func GetSecEncryptDecrypter() (encryptDecrypter, error)
- func HasDataStoreKey(p naming.Path, keyName string) bool
- func Holds(p naming.Path, oc Configurer, nodes []string) []resource.ObjectHold
- func InitData()
- func IsSecretKey(kind naming.Kind, k key.T, sectionType string) bool
- func IsWriting(data instance.Status) bool
- func KeywordGroups(store keywords.Store) []keywords.DriverGroup
- func KeywordOptions(kind naming.Kind, section string) []string
- func KeywordStoreWithDrivers(kind naming.Kind) keywords.Store
- func ListenerTLSSecs(refs []string) []naming.Path
- func LockRefs(ns string) (func(), error)
- func New(p naming.Path, opts ...funcopt.O) (any, error)
- func NewCfg(path naming.Path, opts ...funcopt.O) (*cfg, error)
- func NewList(paths naming.Paths, opts ...funcopt.O) ([]any, error)
- func NewNscfg(path naming.Path, opts ...funcopt.O) (*nscfg, error)
- func NewSec(path naming.Path, opts ...funcopt.O) (*sec, error)
- func NewSvc(path naming.Path, opts ...funcopt.O) (*svc, error)
- func NewT(p naming.Path) any
- func NewUsr(path naming.Path, opts ...funcopt.O) (*usr, error)
- func NewVol(path naming.Path, opts ...funcopt.O) (*vol, error)
- func NodeKeywordGroups() []keywords.DriverGroup
- func ObjectKeywordGroups() []keywords.Group
- func PGKeywords(kind naming.Kind) []*keywords.Keyword
- func PKCS(privateKeyBytes, certificateChainBytes, passwordBytes []byte) ([]byte, error)
- func PeerWrites(varDir, nodename string, data instance.Status) (bool, error)
- func PeerWritesStopped(varDir, nodename string, at time.Time) (bool, error)
- func RedactSecrets(b []byte, kind string) ([]byte, error)
- func RegisterClusterConfigCheck(f func(*xconfig.T) xconfig.Alerts)
- func SeedKey(ctx context.Context, ds DataStore, keyName, source string, log *plog.Logger, ...) error
- func SetClusterConfig() (cluster.Config, error)
- func ValueTooBig(size, max int64) error
- func WithClusterConfigFile(s string) funcopt.O
- func WithConfigData(b any) funcopt.O
- func WithConfigFile(s string) funcopt.O
- func WithLogger(s *plog.Logger) funcopt.O
- func WithStaticReferences() funcopt.O
- func WithVolatile(s bool) funcopt.O
- func WritesStoppedAt(varDir string) time.Time
- type Actor
- type ActorStatus
- type ArrayItem
- type ArrayPush
- type Ccfg
- func (t *Ccfg) App() string
- func (t *Ccfg) Cluster() (*Ccfg, error)
- func (t *Ccfg) ComputeClaims() (map[string]int64, error)
- func (t *Ccfg) Config() *xconfig.T
- func (t *Ccfg) ConfigData() any
- func (t *Ccfg) ConfigFile() string
- func (t *Ccfg) DRPNodes() ([]string, error)
- func (t *Ccfg) Delete(ctx context.Context) error
- func (t *Ccfg) DeleteSection(ctx context.Context, rids ...string) error
- func (t *Ccfg) Dereference(ref string) (string, error)
- func (t *Ccfg) DiscardAndEditConfig() error
- func (t *Ccfg) Domain() string
- func (t *Ccfg) DriverKeywordGroups(did driver.ID) []keywords.Group
- func (t *Ccfg) EditConfig() error
- func (t *Ccfg) Env() string
- func (t *Ccfg) Eval(k key.T) (interface{}, error)
- func (t *Ccfg) EvalAs(k key.T, impersonate string) (interface{}, error)
- func (t *Ccfg) EvalConfig() (rawconfig.T, error)
- func (t *Ccfg) EvalConfigAs(nodename string) (rawconfig.T, error)
- func (t *Ccfg) FQDN() string
- func (t *Ccfg) FlexMax() (int, error)
- func (t *Ccfg) FlexMin() (int, error)
- func (t *Ccfg) FlexTarget() (int, error)
- func (t *Ccfg) FreshStatus(ctx context.Context) (instance.Status, error)
- func (t *Ccfg) Get(k key.T) (interface{}, error)
- func (t *Ccfg) ID() uuid.UUID
- func (t *Ccfg) IsVolatile() bool
- func (t *Ccfg) KeywordLookup(k key.T, sectionType string) *keywords.Keyword
- func (t *Ccfg) List() (string, error)
- func (t *Ccfg) Log() *plog.Logger
- func (t *Ccfg) LogDir() string
- func (t *Ccfg) MemCap(rid string) (int64, error)
- func (t *Ccfg) MonitorStatus(ctx context.Context) (instance.Status, error)
- func (t *Ccfg) Name() string
- func (t *Ccfg) NewCompliance() (*compliance.T, error)
- func (t *Ccfg) Node() (*Node, error)
- func (t *Ccfg) Nodes() ([]string, error)
- func (t *Ccfg) ObjectMemCap() (int64, error)
- func (t *Ccfg) Orchestrate() string
- func (t *Ccfg) PGClean(ctx context.Context)
- func (t *Ccfg) Path() naming.Path
- func (t *Ccfg) Peers() ([]string, error)
- func (t *Ccfg) Placement() placement.Policy
- func (t *Ccfg) PostCommit() error
- func (t *Ccfg) Priority() priority.T
- func (t *Ccfg) RawConfig() (rawconfig.T, error)
- func (t *Ccfg) RecoverAndEditConfig() error
- func (t *Ccfg) ResourceCap(rid, claimType string) (int64, error)
- func (t *Ccfg) Set(ctx context.Context, kops ...keyop.T) error
- func (t *Ccfg) SetPostCommit(fn func() error)
- func (t *Ccfg) SetVolatile(v bool)
- func (t *Ccfg) Status(ctx context.Context) (instance.Status, error)
- func (t *Ccfg) String() string
- func (t *Ccfg) TmpDir() string
- func (t *Ccfg) Topology() topology.T
- func (t *Ccfg) Unset(ctx context.Context, kws ...key.T) error
- func (t *Ccfg) Update(ctx context.Context, deleteSections []string, unsetKeys []key.T, ...) (err error)
- func (t *Ccfg) ValidateConfig(ctx context.Context) (xconfig.Alerts, error)
- func (t *Ccfg) ValidateSections(cfg *xconfig.T) xconfig.Alerts
- func (t *Ccfg) VarDir() string
- type CertificateRenewOptions
- type CertificateRenewal
- type Cfg
- type CollectorConfigRaw
- type CollectorProblem
- type ComputeClaimer
- type Configurer
- type ConsumersInstallError
- type Core
- type Data
- type DataElement
- type DataStore
- type Dataer
- type Digest
- type ErrRandomKeyMissing
- type FlexStatus
- type KVInstall
- type KVInstallAccessControl
- type KeyStore
- type Migration
- type MigrationRule
- type MigrationRules
- type Node
- func (t *Node) AllowEnvs() []string
- func (t *Node) AllowsEnv(env string) bool
- func (t *Node) App() string
- func (t *Node) Array(name string) array.Driver
- func (t *Node) Arrays() []array.Driver
- func (t *Node) CNIConfig() (string, error)
- func (t *Node) CNIPlugins() (string, error)
- func (t Node) Checks(ctx context.Context) (check.ResultSet, error)
- func (t *Node) Cluster() (id, name string)
- func (t *Node) ClusterConfigFile() string
- func (t *Node) CollectorFeeder() (*httphelper.T, error)
- func (t *Node) CollectorRawConfig() *CollectorConfigRaw
- func (t *Node) CollectorServer() (*httphelper.T, error)
- func (t *Node) CollectorServerAPIURL() (*url.URL, error)
- func (t *Node) CollectorServerWithAuth(auth string) (*httphelper.T, error)
- func (t *Node) CollectorServerWithoutAuth() (*httphelper.T, error)
- func (t *Node) Config() *xconfig.T
- func (t *Node) ConfigData() any
- func (t *Node) ConfigFile() string
- func (t *Node) DNSUDSDir() string
- func (t *Node) DRPNodes() ([]string, error)
- func (t Node) DeleteSection(s ...string) error
- func (t *Node) Dequeue() error
- func (t *Node) Dereference(ref string) (string, error)
- func (t Node) DiscardAndEditConfig() error
- func (t *Node) DriverKeywordGroups(did driver.ID) []keywords.Group
- func (t Node) Drivers() (interface{}, error)
- func (t Node) EditConfig() error
- func (t *Node) EncapNodes() ([]string, error)
- func (t *Node) Env() string
- func (t *Node) Eval(ctx context.Context, kw string) (interface{}, error)
- func (t *Node) EvalAs(ctx context.Context, kw string, impersonate string) (interface{}, error)
- func (t *Node) EvalConfig() (rawconfig.T, error)
- func (t *Node) EvalConfigAs(impersonate string) (rawconfig.T, error)
- func (t *Node) Exists() bool
- func (t Node) ForceSysreport() error
- func (t *Node) Freeze() error
- func (t *Node) Frozen() time.Time
- func (t *Node) FrozenScope() freeze.Scope
- func (t *Node) Get(ctx context.Context, kw string) (interface{}, error)
- func (t *Node) ID() uuid.UUID
- func (t Node) IsVolatile() bool
- func (t Node) KeywordLookup(k key.T, sectionType string) *keywords.Keyword
- func (t *Node) ListArrays() []ArrayItem
- func (t *Node) ListPools() []string
- func (t *Node) ListStores() []StoreItem
- func (t *Node) ListSwitches() []SwitchItem
- func (t Node) LoadDisks() (disks.Disks, error)
- func (t Node) LoadPkg() ([]packages.Pkg, error)
- func (t Node) LoadSystem() (asset.Data, error)
- func (t *Node) Log() *plog.Logger
- func (t *Node) LogDir() string
- func (t *Node) MergedConfig() *xconfig.T
- func (t *Node) Nameservers() ([]string, error)
- func (t *Node) NewCompliance() (*compliance.T, error)
- func (t *Node) Nodes() ([]string, error)
- func (t *Node) OCIEngine() string
- func (t Node) PRKey() (string, error)
- func (t *Node) Pools() []pool.Pooler
- func (t *Node) PostCommit() error
- func (t Node) PrintCapabilities() (capabilities.L, error)
- func (t Node) PushArrays(ctx context.Context, name string) ([]ArrayPush, error)
- func (t Node) PushAsset() (asset.Data, error)
- func (t Node) PushAssetDryRun() (asset.Data, error)
- func (t Node) PushDisks() (disks.Disks, error)
- func (t Node) PushDisksDryRun() (disks.Disks, error)
- func (t Node) PushPkg() ([]packages.Pkg, error)
- func (t Node) PushPkgDryRun() ([]packages.Pkg, error)
- func (t Node) PushRegistered(ctx context.Context) error
- func (t *Node) PushStats(ctx context.Context, o PushStatsOptions) (PushStatsResult, error)
- func (t *Node) PushStatsDryRun(ctx context.Context, o PushStatsOptions) (PushStatsResult, error)
- func (t Node) PushSwitches(ctx context.Context, name string) ([]SwitchPush, error)
- func (t *Node) RawConfig() (rawconfig.T, error)
- func (t Node) RecoverAndEditConfig() error
- func (t Node) Register(ctx context.Context, user, password, app string) error
- func (t *Node) RegisterJoiningNode(ctx context.Context, nodename, prevUUID string) (string, error)
- func (t *Node) SaveApplied(consumer string) error
- func (t Node) ScanCapabilities(ctx context.Context) (capabilities.L, error)
- func (t Node) ScanSCSI(ctx context.Context, hba, target, lun string) error
- func (t *Node) Schedules() schedule.Table
- func (t Node) SendSysreport(archive string, deleted []string, full bool) error
- func (t *Node) Set(ctx context.Context, kops ...keyop.T) error
- func (t *Node) SetVolatile(v bool)
- func (t *Node) ShowPools(ctx context.Context) pool.StatusList
- func (t *Node) ShowPoolsByName(ctx context.Context, name string) pool.StatusList
- func (t *Node) Stonith(nodename string) error
- func (t *Node) Store(ref string, reader naming.Path) (backup.Driver, error)
- func (t Node) String() string
- func (t *Node) Switch(name string) sanswitch.Driver
- func (t Node) Sysreport() error
- func (t *Node) TmpDir() string
- func (t *Node) Unfreeze() error
- func (t *Node) Unset(ctx context.Context, kws ...key.T) error
- func (t *Node) Update(ctx context.Context, deleteSections []string, unsetKeys []key.T, ...) (err error)
- func (t *Node) UpdateCompliance() (string, error)
- func (t *Node) UpdatePkg(ctx context.Context, dryRun bool) error
- func (t *Node) ValidateConfig() (xconfig.Alerts, error)
- func (t *Node) VarDir() string
- type Nscfg
- type PushStatsOptions
- type PushStatsResult
- type QueuedAction
- type QueuedActionDone
- type QueuedActionRunning
- type QueuedActions
- type RefsDocument
- type RefsMode
- type ResizeGrowsNothingError
- type ResizeOptions
- type ResizePlan
- type ResizeStep
- type Sec
- type Status
- type StoreItem
- type Svc
- type SwitchItem
- type SwitchPush
- type SyncSnapshot
- type Usr
- type UsrDB
- func (_ *UsrDB) GrantsFromUsername(username string) ([]string, error)
- func (_ *UsrDB) GrantsFromUsernameAndPassword(username, password string) ([]string, error)
- func (_ *UsrDB) UXGrantsFromCgroup(cg string) (string, []string, error)
- func (_ *UsrDB) UsrFromUXUser(login string, uid uint32) (string, []string, error)
- type Vol
- type VolStatus
Constants ¶
const ( DefaultNodeMaxParallel = 10 // MinNodeMaxParallel is the least number of CRM actions the daemon lets // run in parallel, whatever node.max_parallel says: a lower one is too // dangerous to honor. MinNodeMaxParallel = 2 )
const ( // AcmeLetsEncrypt is the directory of Let's Encrypt, which // acme.directory = letsencrypt names. AcmeLetsEncrypt = "https://acme-v02.api.letsencrypt.org/directory" // AcmeLetsEncryptStaging is the staging directory of Let's Encrypt, // which acme.directory = letsencrypt-staging names. AcmeLetsEncryptStaging = "https://acme-staging-v02.api.letsencrypt.org/directory" )
const (
// AcmeChallengeKeyPattern matches the keys of the challenge tokens.
AcmeChallengeKeyPattern = acmeChallengeKeyPrefix + "*"
)
const RedactedValue = redacted
RedactedValue is what a secret value is shown as to a reader not allowed to see it.
Variables ¶
var ( ErrInvalidNode = errors.New("invalid node") // ErrDisabled is the action of a disabled instance, which does // nothing: the command exits xerrors.ExitCodeInstanceDisabled. ErrDisabled = xerrors.InstanceDisabled ErrEncapAgentNotInstalled = errors.New("opensvc is not installed in the container") )
var ( ErrKeyExist = errors.New("key already exists") ErrKeyEmpty = errors.New("key name is empty") ErrKeyNotExist = errors.New("key does not exist") ErrValueTooBig = errors.New("key value exceeds the allowed size") )
var ( // ErrSeedOtherNamespace is the refusal to seed a key of a datastore of // another namespace. A datastore sharing its keys with a namespace lets // it read them: writing one is not the reader's to do. ErrSeedOtherNamespace = errors.New("a key of a datastore of another namespace is not seeded") // ErrSourceNotRegular is the refusal to read a source that is no // regular file: a device as /dev/urandom never ends, a fifo blocks // until a writer comes, and a directory is no content. ErrSourceNotRegular = errors.New("not a regular file") )
var ErrCertificateNotIssued = errors.New("the certificate was not issued by the sec")
ErrCertificateNotIssued is the refusal to renew a certificate the sec did not issue, as one installed from elsewhere: generating one would replace it, with the names of the sec rather than the ones it was installed for.
var (
ErrKeyNotFound = errors.New("key not found")
)
var ErrProvisionConflict = errors.New("the provision would take what something on the node holds")
ErrProvisionConflict is the refusal of a provision finding on the node a system resource holding what it would take.
var ErrRuntimeReference = errors.New("the reference evaluates only at run time")
ErrRuntimeReference is a reference evaluating only at run time, refused by an object evaluating its configuration from the configuration alone.
var ErrStopToChange = errors.New("the resource is not known to be stopped")
ErrStopToChange is the refusal of a configuration change a resource up on a node would leak by: a change of a keyword saying what it holds there, of its type, or the removal of its section.
var ErrStoreNotUsable = errors.New("not usable")
ErrStoreNotUsable is the refusal of a store of a sec to a namespace other than the sec's, which the sec does not share with, or which names a sec, or a store of it, that does not exist: the api answers it 403.
var ErrWrongType = errors.New("wrong type provided for interface")
var NodeKeywordStore = keywords.Store(append(nodePrivateKeywords, nodeCommonKeywords...))
var NodeMigrationRules = MigrationRules{ { Doc: "A keyword written under a former name, which om still reads as an alias, " + "is written under its name: node.db_min_ping_interval becomes collector_ping_interval, " + "node.min_avail_mem_pct becomes min_avail_mem, listener.tls_port becomes port, " + "the name of an arbitrator becomes uri, the cmd of a stonith becomes command, " + "and so on for every alias the keyword reference lists.", // contains filtered or unexported fields }, { Doc: "The secret of a pure array becomes its private_key, which names the same secret and reads its private_key key.", // contains filtered or unexported fields }, { Doc: "The ips_per_node of a routed_bridge network becomes mask_per_node, " + "the prefix length of the subnet each node is given, on the address family of its network. " + "A network setting neither is given the mask_per_node the ips_per_node default of 1024 amounts to, " + "so its subnets keep their size.", // contains filtered or unexported fields }, { Doc: "listener.openid_well_known becomes listener.openid_issuer: " + "the url without its /.well-known/openid-configuration end, which om appends itself. " + "An issuer without listener.openid_client_id is reported: om refuses openid logins " + "without the client id om3-webapp is registered with at the provider.", // contains filtered or unexported fields }, { Doc: "The schedule of the brocade section moves to the brocade switch sections that set none, " + "as each switch is inventoried on its own schedule, and the brocade section is deleted.", // contains filtered or unexported fields }, { Doc: "What om no longer reads is removed: the reboot, rotate_root_pw, stats_collection and dequeue_actions sections, " + "node.default_mon_format, the timeout and the secret of an arbitrator, " + "and the secret of a relay heartbeat that authenticates with a username.", // contains filtered or unexported fields }, { Doc: "A relay heartbeat authenticating with a secret, and a switch reached with telnet, are reported and kept: " + "what replaces them is a decision, a relay user with the heartbeat grant and a password secret, " + "an ssh key or a password secret. " + "An arbitrator written with name, reached by a tcp connect without a port, is reported: om reaches it on listener.port, " + "1215 by default, where a v2 agent was reached on 1214, and only its admin knows whether it still runs one.", // contains filtered or unexported fields }, }
NodeMigrationRules is the rules the configuration of a node, or of the cluster, is migrated by.
var ObjectMigrationRules = MigrationRules{ { Doc: "A filesystem that made the volume it mounts, its vg and size keywords set, " + "becomes a disk.lv resource and a filesystem resting on it. " + "A size written as a share of a volume group becomes arithmetic on what om reports of that group, " + "where the group is a resource of the object, and is kept as it is where it is not.", // contains filtered or unexported fields }, { Doc: "The size and the mode options of the mnt_opt of a tmpfs become its size and mode keywords, " + "the size being what a resize records. " + "The tmpfs of a volume is sized {DEFAULT.size}, the size the volume is claimed with. " + "A size written as a share of the memory is kept in mnt_opt: om cannot say how big it is.", // contains filtered or unexported fields }, { Doc: "The secrets_environment and configs_environment keywords become lines of the environment keyword, " + "and the create_secrets_environment and create_configs_environment of a lxc container lines of its " + "create_environment: NAME=sec1/key becomes NAME from ./sec/sec1 key key, " + "and sec1/pattern becomes * from ./sec/sec1 key pattern, the variables named after the keys.", // contains filtered or unexported fields }, { Doc: "The presnap_trigger and postsnap_trigger keywords are removed: " + "om runs no hook around the snapshots the sync resources take, as with sync.zfs " + "or sync.rsync with snap set.", // contains filtered or unexported fields }, }
ObjectMigrationRules is the rules the configuration of an object is migrated by.
Functions ¶
func AcmeChallengeKey ¶
AcmeChallengeKey returns the key of the sec holding the key authorization of the http-01 challenge token, and refuses a token which is not one: a token is a base64url string, so it names no other key.
func ApplyRefs ¶
func ApplyRefs(ns string, doc RefsDocument, mode RefsMode) ([]string, error)
ApplyRefs writes the keys of the document into the datastores of the namespace ns, as mode says, and returns what it did and what it left: a datastore created, a key added, rewritten, or left with a value differing from the document's.
func ApplyRefsUndoable ¶
ApplyRefsUndoable is ApplyRefs, returning too how to undo what it did, on an error as well: remove the keys it added, put back the values it rewrote, and delete the datastores it created, as the create of an object the keys were applied for does when it fails after.
func CheckLocalFileStopToChange ¶
CheckLocalFileStopToChange refuses the configuration file at dst replacing the one of the object at p, as an edit does, when a resource up on this node would leak by it, as CheckStopToChange says.
func CheckLocalUpdateStopToChange ¶
func CheckLocalUpdateStopToChange(p naming.Path, deletes []string, unsets []key.T, sets []keyop.T) error
CheckLocalUpdateStopToChange refuses the update of the configuration of the object at p a resource up on this node would leak by, as CheckStopToChange says, for a write made without the daemon, which knows the status of the other nodes.
func CheckStopToChange ¶
func CheckStopToChange(kind naming.Kind, from, to *xconfig.T, statuses map[string]*instance.Status) error
CheckStopToChange refuses a change from the configuration from to the configuration to of an object of kind, for a resource up on a node, as statuses say, the instance statuses of the object by node:
- a change of the value of a keyword marked StopToChange, as the mount point of a filesystem or the address of an ip, evaluated on the node, so a change of what it references is one too, unless the value was empty, which designates nothing the resource could have set up, as a required keyword left empty, which leaves the resource not configured and its status not known;
- a change of its type, which is a change of the driver stopping it;
- its disable, which leaves it running with nothing to stop it, and its values held with no hold said: the configuration of a disabled object holds nothing, so another can be made holding them;
- the removal of its section, which nothing stops once it is gone.
The stop of the resource acts on the configuration it reads then: what the former value set up stays on the node, for root to find and undo, as a filesystem still mounted, an address still configured.
A resource is up on a node unless its status there is known to be stopped: down, standby down, or n/a, or undef for an error of its configuration while it holds nothing there, its ConfigError, which a change of the configuration fixes. Any other undef status is not known, and the refusal says so, and that a change forced is the operator's to make once sure the resource holds nothing. An object created changes nothing.
func ClusterCAPrivateKey ¶
ClusterCAPrivateKey returns the private key of the cluster authority, system/sec/ca, in PEM, read from its configuration. The api tokens and the kvm vsock tokens are signed with it.
It is read where it signs, and never written out of the configuration of the sec: a copy in a file is one more path for it to leak by.
func CollectorResponseStatusCheck ¶
CollectorResponseStatusCheck verifies if the HTTP response status code matches any of the expected codes in `wanted`. If it doesn't match, attempts to decode the response body as a `CollectorProblem` and includes its details in the error.
func ConsumersInstallWarnings ¶
ConsumersInstallWarnings splits the error of a datastore write: the failures of the installs it refreshed, which leave the write done, and the error of the write, nil when it was done.
func DecodeSecValueWith ¶
DecodeSecValueWith decodes the value of a sec key as written in its configuration file, crypt:<data>, with the secret of the cluster named clusterName rather than the one of the cluster of this node: a node joining a cluster reads the keys of the sec it fetched from it before it installs its configuration.
func DescribeComputeClaims ¶
DescribeComputeClaims says what an object claims, in the words of the units, for a message.
func ForgetWrites ¶
ForgetWrites removes the record of the writes of a node no longer in the scope of the object of varDir: it writes nothing of the object.
func GetSecEncryptDecrypter ¶
func GetSecEncryptDecrypter() (encryptDecrypter, error)
func HasDataStoreKey ¶
HasDataStoreKey says the datastore p exists and holds the key.
func Holds ¶
func Holds(p naming.Path, oc Configurer, nodes []string) []resource.ObjectHold
Holds returns the values the resources of the object hold, evaluated for each of the nodes, with the nodes each is held on: the nodes it evaluates to that value on, or every cluster node for a shared resource.
The configurer evaluates from the configuration alone, as one made with WithStaticReferences: a value referencing what another resource exposes is not held by this resource, but by the one it comes from. A disabled resource holds nothing, never being started.
func IsSecretKey ¶
IsSecretKey says whether the value of k, in a configuration of an object of kind, is a secret: a key of a sec or usr data section, or a keyword declared with RedactSecret. kind is invalid for a node or cluster configuration, and sectionType is the type of the section k is in.
func IsWriting ¶
IsWriting says whether the instance may write its data: an app, container or share resource of it runs, or says nothing of whether it does. A standby resource, running on every node, is not counted, nor a disabled one. What writes behind the back of opensvc is not counted either.
func KeywordGroups ¶
func KeywordGroups(store keywords.Store) []keywords.DriverGroup
KeywordGroups returns the groups the keywords of the store belong to, each once per driver declaring it, in the order a wizard shows them.
A group every resource has, the one of the keywords not grouped yet, and a group of the keywords of the objects, as the DEFAULT section holds them, are returned once, with no driver. A group a driver declares is returned with the driver of each keyword naming it: the drivers its section and types name, as the store of an object kind says them, or else the drivers holding the keyword, as a keyword looked up in a section of a configuration is the one of the driver manifest.
A keyword of the node or cluster configuration names a group of these configurations, returned with no driver, or with the section type declaring one of its id, as array.hp3par.
func KeywordOptions ¶
KeywordOptions returns the options of the keywords a section of a configuration of kind may hold, sorted, each once: the ones the drivers of its group declare, and the ones of the store of the kind. The node configuration is the kind naming.KindInvalid.
It is a superset. Which of them a section holds depends on the driver its type names, and on keywords limited to other kinds or sections, which is what the keyword lookup of the configuration says of each.
func KeywordStoreWithDrivers ¶
KeywordStoreWithDrivers return the keywords supported by a specific object kind, including all resource drivers keywords.
func ListenerTLSSecs ¶
ListenerTLSSecs returns the secs listener.tls_secs names, as paths, or by their names in the system namespace. A reference naming no sec is left out.
func LockRefs ¶
LockRefs takes the lock of the copies of referenced keys into the namespace ns. Held from a copy until the configuration it is made for lands or is taken back, a second copy of the same keys finds those of the first there and adds none, so the undo of either takes back nothing the other committed. The lock of the file serializes the processes, the mutex the requests of one, as the daemon api serves them, a lock of the file being held per process.
func NodeKeywordGroups ¶
func NodeKeywordGroups() []keywords.DriverGroup
NodeKeywordGroups returns the groups of the node and cluster configurations: the ones of the configurations, then the ones a section type declares, each with its driver.
func ObjectKeywordGroups ¶
ObjectKeywordGroups returns the groups of the keywords of the objects, the ones of a store of an object kind that are not keywords of a driver.
func PGKeywords ¶
PGKeywords returns the pg_* keywords of the objects of a kind, which set the process group caps of the object, of a subset or of a resource, sorted by name.
It is what a command setting caps documents and completes, so a keyword added to the store is offered by the command without the command changing.
func PeerWrites ¶
PeerWrites records whether the instance of a peer writes the data of the object of varDir, as the status it publishes says, since at, when its record here says otherwise: a peer back after it was lost, or one whose record was not received. A peer never seen writing is not recorded as stopped. It says whether the record changed.
func PeerWritesStopped ¶
PeerWritesStopped records that the instance of a node the cluster lost no longer writes the data of the object of varDir, since at, when its record says it wrote: a dead node writes nothing, and says nothing either. The time it was lost is a little after its last write, which counts a little more of writes missed, not less. It says whether the record changed.
The loss always stops a record saying the node writes: the time of the record comes from the clock of the peer, ahead of this one maybe, and the stop is then recorded right after it, so a status of the peer from before its loss, replayed from a cache, is older still and changes nothing.
func RedactSecrets ¶
RedactSecrets returns b with the value of every keyword declared with RedactSecret, and of every key of a sec or usr data section, replaced by asterisks. kind is the object kind the configuration belongs to, empty for a node or cluster configuration.
Only those values change. The parser writes back verbatim the lines it was not asked to touch, so comments, blank lines, spacing, inline comments and multiline layout are all preserved, and the substitution is refused if it would not parse back to the redacted value.
An unparseable configuration is an error rather than a configuration returned unredacted.
func RegisterClusterConfigCheck ¶
RegisterClusterConfigCheck adds a check of the sections of the cluster configuration against one another, which its validation runs, so that a write making it fail is refused.
func SeedKey ¶
func SeedKey(ctx context.Context, ds DataStore, keyName, source string, log *plog.Logger, p naming.Path, rid string) error
SeedKey writes the key of the datastore from the source, a key the datastore does not hold, for the object p, whose resource rid seeds it: an empty rid is the object, seeding for all its resources.
The source is an http or https url, fetched as the node.allowed_urls and SSRF policies allow, "random", a password generated, or the path of a regular file of the node. A template is seeded as it is written, and rendered on each node at each install.
The key is written for the object p, and the refresh of the consumers of the datastore skips the resources of p seeding it, which install it next. The datastore is to be of the namespace of p.
func SetClusterConfig ¶
SetClusterConfig refreshes the config data cache and returns the new config data.
func ValueTooBig ¶
ValueTooBig is the error of a key value of size bytes, over the max allowed by node.max_key_size: it says both sizes and the keyword to raise, the sentinel ErrValueTooBig wrapped for errors.Is.
func WithClusterConfigFile ¶
WithConfigFile sets a non-standard configuration location.
func WithConfigData ¶
WithConfigData sets configuration file (string) or content ([]byte) overriding what is installed in the config file. Useful for testing volatile services.
func WithConfigFile ¶
WithConfigFile sets a non-standard configuration location.
func WithLogger ¶
WithLogger let the factory user decide what kind of logging he wants
func WithStaticReferences ¶
WithStaticReferences has the object evaluate its configuration from the configuration alone: a reference evaluating only at run time, as what another resource exposes or the head of a volume, is an error ErrRuntimeReference rather than something run.
func WithVolatile ¶
WithVolatile makes sure not data is ever written by the object.
func WritesStoppedAt ¶
WritesStoppedAt is when the instances of the object of varDir stopped writing its data, the latest stop the records of its nodes say, and zero while one of them writes, or when none ever said.
A copy of the data, or a snapshot of it, misses the writes made since it was taken, which end when the instance writing them stops: the copy of a stopped instance does not age.
One instance writing is enough: a node coming back after it died records its stop at its return, later than the start of the node that took over.
Types ¶
type Actor ¶
type Actor interface {
Core
PG() *pg.Config
IsVolatile() bool
ResourceSets() resourceset.L
ResourceByID(rid string) resource.Driver
GetActionResDeps() *actionresdeps.Store
ConfigureResources()
IsDisabled() bool
Boot(context.Context) error
Restart(context.Context) error
Run(context.Context) error
Shutdown(context.Context) error
Start(context.Context) error
StartStandby(context.Context) error
Stop(context.Context) error
Install(context.Context) error
PRStart(context.Context) error
PRStop(context.Context) error
PGUpdate(context.Context) error
Provision(context.Context) error
Unprovision(context.Context) error
ResourceHandlingDevice(ctx context.Context, p device.T) (resource.Driver, error)
ResourceHandlingFile(ctx context.Context, filename string) (resource.Driver, error)
SetProvisioned(context.Context) error
SetUnprovisioned(context.Context) error
SyncFull(context.Context) error
SyncResync(context.Context) error
SyncRestore(context.Context) error
SyncSnapshots(context.Context) ([]SyncSnapshot, error)
RestoredConfig(context.Context) ([]byte, []string, error)
SyncSplit(context.Context) error
SyncUpdate(context.Context) error
SyncIngest(context.Context) error
Enter(context.Context, string) error
ContainerLogs(context.Context, string, bool, int) error
ContainerLogsStream(context.Context, string, bool, int) (<-chan []byte, error)
Schedules() schedule.Table
RefreshResInfo(context.Context) (resource.Infos, error)
HardAffinity() []string
HardAntiAffinity() []string
SoftAffinity() []string
SoftAntiAffinity() []string
// contains filtered or unexported methods
}
Actor is implemented by object kinds supporting start, stop, ...
type ActorStatus ¶
type ActorStatus struct {
Avail status.T `json:"avail"`
Frozen string `json:"frozen"`
Orchestrate string `json:"orchestrate"`
Overall status.T `json:"overall"`
PlacementPolicy placement.Policy `json:"placement_policy"`
PlacementState placement.State `json:"placement_state"`
Provisioned provisioned.T `json:"provisioned"`
Topology topology.T `json:"topology"`
UpInstancesCount int `json:"up_instances_count"`
Flex *FlexStatus `json:"flex,omitempty"`
}
func (*ActorStatus) AllowedInstances ¶
func (s *ActorStatus) AllowedInstances() int
AllowedInstances is the number of instances the topology allows up at once: one for a failover object, flex_max for a flex one, and 0 when the topology sets no bound, as a flex object whose bounds are not known yet.
func (*ActorStatus) DeepCopy ¶
func (s *ActorStatus) DeepCopy() *ActorStatus
func (*ActorStatus) ExcessInstances ¶
func (s *ActorStatus) ExcessInstances() int
ExcessInstances is the number of instances up beyond the ones the topology allows, as two instances of a failover object, which may write the shared resources at once: an error, where a warn status says no more than something is not as it should be.
func (*ActorStatus) ExpectedInstances ¶
func (s *ActorStatus) ExpectedInstances() int
ExpectedInstances is the number of instances the object is expected to run: the flex target, or one, as om mon reads it in its "up/expected" counter.
type ArrayPush ¶
type ArrayPush struct {
Name string `json:"name"`
Type string `json:"type"`
Keys int `json:"keys"`
Error string `json:"error,omitempty"`
}
ArrayPush is what came of pushing one array to the collector.
type Ccfg ¶
type Ccfg struct {
// contains filtered or unexported fields
}
Ccfg is the clusterwide configuration store.
The content is the same as node.conf, and is overridden by the definition found in node.conf.
func (*Ccfg) Cluster ¶
Cluster returns a cached Ccfg struct pointer. If none is already cached, allocate a new Ccfg{} and cache it.
func (*Ccfg) ComputeClaims ¶
ComputeClaims is what the object claims of each compute type, cluster-wide: what its processes are capped to, on every instance it may run at once.
A failover object runs one started instance, and a flex object as many as its target. Every other instance runs its standby resources. The instances started are counted where they take the most, since any node may be the one running them: the claim is what the object may take, not what it takes now.
A process capped by nothing takes what it finds, and makes the claim of the object Unbounded on that type.
func (*Ccfg) ConfigData ¶
func (t *Ccfg) ConfigData() any
func (*Ccfg) ConfigFile ¶
func (t *Ccfg) ConfigFile() string
ConfigFile returns the absolute path of an opensvc object configuration file.
func (*Ccfg) DRPNodes ¶
DRPNodes implements DRPNodes() ([]string, error) to retrieve cluster drpnodes from config cluster.drpnodes This is required because embedded implementation from core is not valid for ccfg
func (*Ccfg) DeleteSection ¶
DeleteSection deletes a resource section from object.
TODO: Fix/verify following doc If no resource selector is set, remove all etc, var and log file belonging to the object.
If a resource selector is set, only delete the corresponding sections in the configuration file.
func (*Ccfg) Dereference ¶
func (*Ccfg) DiscardAndEditConfig ¶
func (t *Ccfg) DiscardAndEditConfig() error
func (*Ccfg) DriverKeywordGroups ¶
DriverKeywordGroups returns the groups the keywords of a section of the driver may name, the referrer hook the validation of the cluster configuration reads the strategies of a section by.
func (*Ccfg) EditConfig ¶
func (t *Ccfg) EditConfig() error
func (*Ccfg) EvalConfig ¶
func (*Ccfg) FlexTarget ¶
func (*Ccfg) IsVolatile ¶
func (t *Ccfg) IsVolatile() bool
func (*Ccfg) KeywordLookup ¶
func (*Ccfg) MemCap ¶
MemCap is the most memory the process group of a resource may take on this node, see ResourceCap.
func (*Ccfg) MonitorStatus ¶
func (*Ccfg) NewCompliance ¶
func (t *Ccfg) NewCompliance() (*compliance.T, error)
func (*Ccfg) Node ¶
Node returns a cached Node struct pointer. If none is already cached, allocate a new Node{} and cache it.
func (*Ccfg) Nodes ¶
Nodes implements Nodes() ([]string, error) to retrieve cluster nodes from config cluster.nodes This is required because embedded implementation from core is not valid for ccfg
func (*Ccfg) ObjectMemCap ¶
ObjectMemCap is the most memory the process group of the object may take on this node, claim.Unbounded when nothing caps it.
func (*Ccfg) Orchestrate ¶
func (t *Ccfg) Orchestrate() string
func (*Ccfg) PostCommit ¶
func (t *Ccfg) PostCommit() error
func (*Ccfg) RecoverAndEditConfig ¶
func (t *Ccfg) RecoverAndEditConfig() error
func (*Ccfg) ResourceCap ¶
ResourceCap is the most of a compute claim type the process group of a resource may take on this node, the smallest of the caps of the groups holding it, claim.Unbounded when none does. What the namespace caps is what its objects add up to, and says nothing of one of them.
func (*Ccfg) SetPostCommit ¶
func (t *Ccfg) SetPostCommit(fn func() error)
func (*Ccfg) SetVolatile ¶
func (t *Ccfg) SetVolatile(v bool)
func (*Ccfg) Update ¶
func (t *Ccfg) Update(ctx context.Context, deleteSections []string, unsetKeys []key.T, keyOps []keyop.T) (err error)
Update updates applies configurations changes in the configuration file.
func (*Ccfg) ValidateConfig ¶
ValidateConfig validates the configuration
func (*Ccfg) ValidateSections ¶
ValidateSections runs the checks of the sections of the cluster configuration against one another.
type CertificateRenewOptions ¶
type CertificateRenewOptions struct {
// Force issues a certificate even when the current one is not due.
Force bool
// Webroot is the host directory the http-01 challenge token is
// written in, acme.webroot when empty. It is ignored when HTTP01
// is set.
Webroot string
// HTTP01 writes the http-01 challenge token where the http server
// of the domains serves it from, as a task writes it in a volume of
// its object, confined there.
HTTP01 challenge.Provider
// Accounts are the secs whose account at the directory the sec
// takes when it holds none there: the first of them holding one
// registered at the directory, with the email of the sec. The secs
// a task renews share one account so, as a directory limits the
// accounts an address registers, and each keeps it: the one that
// registered it going does not take it away.
Accounts []naming.Path
// RenewBefore is how long before its expiry a certificate is
// due when the sec sets no acme.renew_before, 30 days when
// zero. The daemon renews the cluster ca a longer time before,
// as a node away when it is renewed trusts the former one until
// it is back.
RenewBefore time.Duration
}
CertificateRenewOptions says how a certificate is renewed.
type CertificateRenewal ¶
type CertificateRenewal struct {
// Renewed is true when a certificate was issued.
Renewed bool `json:"renewed"`
// Reason says why a certificate was issued, or why none was.
Reason string `json:"reason"`
// Sec is the sec the certificate is of, for a renewal of several.
Sec string `json:"sec,omitempty"`
Domains []string `json:"domains"`
// Directory is the ACME directory the certificate is issued by,
// empty for a certificate generated, self-signed or signed by the
// ca of the sec.
Directory string `json:"directory,omitempty"`
NotAfter time.Time `json:"not_after,omitzero"`
}
CertificateRenewal tells what a certificate renewal did.
func (CertificateRenewal) Render ¶
func (t CertificateRenewal) Render() string
Render is the renewal as a person reads it.
type Cfg ¶
type Cfg interface {
DataStore
}
Cfg is the cfg-kind object.
These objects are unencrypted key-value store. Values can be binary or text.
A Key can be installed as a file in a Vol, then exposed to apps and containers. A Key can be exposed as a environment variable for apps and containers. A Signal can be sent to consumer processes upon exposed key value changes.
type CollectorConfigRaw ¶
type CollectorConfigRaw struct {
// contains filtered or unexported fields
}
func (*CollectorConfigRaw) AsConfig ¶
func (t *CollectorConfigRaw) AsConfig() *collector.Config
func (*CollectorConfigRaw) FeederUrl ¶
func (t *CollectorConfigRaw) FeederUrl() string
func (*CollectorConfigRaw) HasServerV3 ¶
func (t *CollectorConfigRaw) HasServerV3() bool
func (*CollectorConfigRaw) ServerUrl ¶
func (t *CollectorConfigRaw) ServerUrl() string
type CollectorProblem ¶
type CollectorProblem struct {
Text string `json:"text"`
}
type ComputeClaimer ¶
ComputeClaimer is an object claiming compute of its namespace.
type Configurer ¶
type Configurer interface {
ConfigFile() string
Config() *xconfig.T
EditConfig() error
RecoverAndEditConfig() error
DiscardAndEditConfig() error
RawConfig() (rawconfig.T, error)
EvalConfig() (rawconfig.T, error)
EvalConfigAs(string) (rawconfig.T, error)
Eval(key.T) (interface{}, error)
EvalAs(key.T, string) (interface{}, error)
Get(key.T) (interface{}, error)
ValidateConfig(context.Context) (xconfig.Alerts, error)
DeleteSection(context.Context, ...string) error
Delete(context.Context) error
Set(context.Context, ...keyop.T) error
Update(context.Context, []string, []key.T, []keyop.T) error
Unset(context.Context, ...key.T) error
}
Configurer is implemented by object kinds supporting get, set, unset, eval, edit, ...
func CreatedConfig ¶
func CreatedConfig(p naming.Path, b []byte, restore bool, sets ...keyop.T) (Configurer, []byte, error)
CreatedConfig returns the configuration b of an object created at p, as it is written, and the configurer reading it. The keyword operations sets apply last, so a keyword they name is kept, recorded or not: they say what the creator wants of this object.
The DEFAULT section is given a header, as OpenSVC v2 wrote it, so the keywords of that section are grouped under it whatever their rank.
Unless restore, the configuration is another object's copied, as a clone, a template or a configuration saved elsewhere: what it recorded of the thing it was made for does not come with it, the id it was created with, the disk its provision created, the address it drew. They are written again, for the new object, when it makes what they name. The id is given again at once, as an object has one from the moment it is created. With restore, the object is the one the configuration was saved from, and keeps them; it is given an id only when the configuration holds none.
func NewConfigurer ¶
NewConfigurer returns a Configurer interface from an object path
type ConsumersInstallError ¶
type ConsumersInstallError struct {
Errs []error
}
ConsumersInstallError is the failure of the installs a datastore write refreshes, in the services installing its keys: the write itself is done. Each error names the service and the resource it failed in.
func (*ConsumersInstallError) Error ¶
func (t *ConsumersInstallError) Error() string
func (*ConsumersInstallError) Unwrap ¶
func (t *ConsumersInstallError) Unwrap() []error
func (*ConsumersInstallError) Warnings ¶
func (t *ConsumersInstallError) Warnings() []string
Warnings returns the failures of the installs of the consumers, one line each.
type Core ¶
type Core interface {
Configurer
Nodes() ([]string, error)
Path() naming.Path
FQDN() string
FreshStatus(context.Context) (instance.Status, error)
MonitorStatus(context.Context) (instance.Status, error)
Status(context.Context) (instance.Status, error)
// contains filtered or unexported methods
}
Core is implemented by all object kinds.
type Data ¶
Data defines a shared holder for all objects Dataer
var ( // StatusData is the package data holder for all objects statuses StatusData *Data[Status] )
func (*Data[T]) GetAll ¶
func (c *Data[T]) GetAll() []DataElement[T]
type DataElement ¶
type DataStore ¶
type DataStore interface {
Core
AddKey(name string, b []byte) error
AddKeySeeded(name string, b []byte, p naming.Path, rid string) error
ChangeKey(name string, b []byte) error
DecodeKey(name string) ([]byte, error)
DecodeKeys(name ...string) ([][]byte, error)
EditKey(name string) error
InstallKey(name string) error
InstallKeyTo(KVInstall) (bool, error)
RemoveKey(name string) error
RenameKey(name, to string) error
Allow(string) bool
HasKey(name string) bool
AllKeys() ([]string, error)
MatchingKeys(string) ([]string, error)
TransactionAddKey(name string, b []byte) error
TransactionChangeKey(name string, b []byte) error
TransactionChangeOrAddKey(name string, b []byte) error
TransactionRemoveKey(name string) error
TransactionRenameKey(name, to string) error
}
DataStore is the base interface of sec, cfg and usr objects
func EnsureDataStore ¶
EnsureDataStore returns the datastore p, which it creates when it does not exist and is of the namespace given, and says whether it created it. A datastore of another namespace is not created: it is the one of that namespace to make.
type Digest ¶
type Digest struct {
IsCompat bool `json:"is_compat"`
Instances instance.StatesList `json:"instances"`
Object Status `json:"object"`
Path naming.Path `json:"path"`
}
Digest is a composite extract of different parts of the cluster status.
func NewStatus ¶
func NewStatus() *Digest
NewStatus allocates and return a struct to host an object full state dataset.
func (Digest) LoadTreeNode ¶
LoadTreeNode add the tree nodes representing the type instance into another.
func (Digest) ObjectWarningsString ¶
ObjectWarningsString returns a string presenting notable information at the object, instances-aggregated, level.
type ErrRandomKeyMissing ¶
ErrRandomKeyMissing is a key generated, "source random", missing where it is used. The provision of the object generates it once, on its leader node: a key made anywhere else would differ from the one each other node reads, so it is an error, and never a password made on the spot.
func (ErrRandomKeyMissing) Error ¶
func (t ErrRandomKeyMissing) Error() string
type FlexStatus ¶
type FlexStatus struct {
Target int `json:"target,omitempty"`
Min int `json:"min,omitempty"`
Max int `json:"max,omitempty"`
}
func (*FlexStatus) DeepCopy ¶
func (s *FlexStatus) DeepCopy() *FlexStatus
type KVInstall ¶
type KVInstall struct {
Required bool
ToLog *plog.Logger
ToHead string
ToPath string
FromPattern string
FromStore naming.Path
Source string
AccessControl KVInstallAccessControl
Signals *volsignal.T
// Render, when set, makes the file installed from a key out of the
// key content: a template rendered on the node. The file then
// depends on more than the key, so it is compared to what it
// renders to at each install, its time saying nothing.
Render func(key string, b []byte) ([]byte, error)
// LogUnchanged logs what the install leaves as it is, a file up to
// date or a key the store does not hold, as an install report asked
// by the user shows them. A start installs quietly what has not
// changed.
LogUnchanged bool
// Wrote, when set, is called with each file the install wrote,
// relative to ToHead: the files of a key pattern or a directory
// key one by one, rather than the destination of the line.
Wrote func(path string)
// Holds, when set, is called with each file the install leaves at
// its destination, written or found up to date, relative to
// ToHead: what the line installs, as against what it changed, so
// the file of a key the store no longer holds can be told.
Holds func(path string)
// Line, when set, names the install line the item is one of: a
// line installing from the datastores a pattern names is an item
// per datastore, each with its FromStore and its ToPath.
Line string
// contains filtered or unexported fields
}
func (KVInstall) RelativeToPath ¶
type KVInstallAccessControl ¶
type KeyStore ¶
type KeyStore interface {
GenCert() error
RenewCertificate(ctx context.Context, opts CertificateRenewOptions) (CertificateRenewal, error)
GenCertificateSigningRequest() ([]byte, error)
PKCS(password []byte) ([]byte, error)
}
KeyStore is implemented by encrypting KeyStore object kinds (usr, sec).
type Migration ¶
type Migration struct {
Sets []keyop.T
Unsets []key.T
Deletes []string
// Notes is what changed, in the words of whoever has to read the
// configuration afterwards, one line per change.
Notes []string
// Refusals is what a rule recognized and could not write, with the
// reason. A configuration keeps what nothing can migrate for it.
Refusals []string
}
Migration is what a configuration has to become for om to run what it describes, as the keyword changes a configuration update takes.
It is expressed that way so that it lands through the path every other configuration write takes: the same validation, the same policy, the same claim on a pool.
func MigrateConfig ¶
MigrateConfig is what a configuration has to become for om to run what it describes.
A configuration written for om2 describes things om3 no longer reads that way. What it asked for is still possible, in another shape, and the shape is what this writes: the configuration says the same thing afterwards, in words om3 reads.
It changes nothing by itself. What it answers is what a configuration update would take, so that the caller can show it before writing it.
func MigrateNodeConfig ¶
MigrateNodeConfig is what a node or cluster configuration has to become for om to run what it describes. It changes nothing by itself, as MigrateConfig.
type MigrationRule ¶
type MigrationRule struct {
// Doc says what the rule rewrites, in the words of the help of the
// command applying it: one paragraph, wrapped where it is shown.
Doc string
// contains filtered or unexported fields
}
MigrationRule is one change of shape a configuration written for an older agent takes.
type MigrationRules ¶
type MigrationRules []MigrationRule
MigrationRules is the rules a kind of configuration is migrated by, in the order they apply.
func MigrationRulesOf ¶
func MigrationRulesOf(kind naming.Kind) MigrationRules
MigrationRulesOf returns the rules the configuration of a kind of object is migrated by: the node ones for the cluster configuration, which holds the same keywords as the node one.
func (MigrationRules) Apply ¶
func (t MigrationRules) Apply(cfg *xconfig.T) Migration
Apply returns what the configuration has to become by the rules.
func (MigrationRules) Doc ¶
func (t MigrationRules) Doc(width int) string
Doc lists the rules as the help of a command shows them, a dash heading each, wrapped at width.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is the node struct.
func LoadApplied ¶
LoadApplied returns the node configured as it was when the janitor named consumer last applied its configuration, or nil when it never did. The node is volatile, and opts apply to it as to NewNode.
func (*Node) AllowEnvs ¶
AllowEnvs returns the envs of the objects allowed to run on this node, nil when the node env decides: the node.allow_envs keyword of the node or of the cluster configuration.
func (*Node) Array ¶
Array returns the driver of the array named in the node or cluster configuration, or nil when no section names it or no driver serves its type.
The name is the one of the section, and the driver is chosen by the type that section declares: the two are not the same, and looking a driver up by the name of the array only ever worked for an array named after its own type.
func (*Node) CNIPlugins ¶
func (Node) Checks ¶
Checks finds and runs the check drivers. Results are aggregated and sent to the collector.
func (*Node) Cluster ¶
Cluster returns the id and the name of the cluster of the node, which the runs it writes into a store say: several clusters may write one store.
func (*Node) ClusterConfigFile ¶
func (*Node) CollectorFeeder ¶
func (t *Node) CollectorFeeder() (*httphelper.T, error)
CollectorFeeder returns new collector feeder client from config
func (*Node) CollectorRawConfig ¶
func (t *Node) CollectorRawConfig() *CollectorConfigRaw
func (*Node) CollectorServer ¶
func (t *Node) CollectorServer() (*httphelper.T, error)
CollectorServer returns new collector server client from config
func (*Node) CollectorServerAPIURL ¶
CollectorServerAPIURL returns the url of the api of the oc3 server, which the {collector_api} reference names.
func (*Node) CollectorServerWithAuth ¶
func (t *Node) CollectorServerWithAuth(auth string) (*httphelper.T, error)
CollectorServer returns new collector server client from config
func (*Node) CollectorServerWithoutAuth ¶
func (t *Node) CollectorServerWithoutAuth() (*httphelper.T, error)
CollectorServer returns new collector server client from config
func (*Node) ConfigData ¶
func (*Node) ConfigFile ¶
func (Node) DeleteSection ¶
DeleteSection removes sections from node config
func (*Node) Dequeue ¶
Dequeue runs the actions the collector queued for the node, and posts their results.
Each request to the collector has a deadline of its own, and the actions have none, as in v2: an action is an array disk creation or a service action, which can run for minutes, and killing it midway would leave the array or the service half changed, with no result telling the collector so.
func (Node) DiscardAndEditConfig ¶
func (*Node) DriverKeywordGroups ¶
DriverKeywordGroups returns the groups the keywords of a section of the driver may name, the referrer hook the validation of the node configuration reads the strategies of a section by.
func (Node) EditConfig ¶
func (*Node) EncapNodes ¶
func (*Node) Env ¶
Env returns the env of the node, the node.env keyword of the node or of the cluster configuration.
func (*Node) EvalAs ¶
EvalAs returns a keyword evaluated value, as if the evaluator was another node
func (Node) ForceSysreport ¶
ForceSysreport sends every file the agent tracks, as a full report the collector replaces what it holds of the node with.
func (*Node) Freeze ¶
Freeze creates a persistent flag file that prevents orchestration of the object instance.
The flag records a freeze of the cluster when the node monitor says so, for the freeze to reach the nodes that missed it.
func (*Node) FrozenScope ¶
FrozenScope returns the scope of the freeze of the node, empty when it is not frozen.
func (Node) IsVolatile ¶
func (Node) KeywordLookup ¶
func (*Node) ListArrays ¶
func (*Node) ListStores ¶
ListStores returns the stores declared in the cluster configuration, then the ones declared in the secs of the node.
func (*Node) ListSwitches ¶
func (t *Node) ListSwitches() []SwitchItem
ListSwitches returns the switch sections of the node and cluster configuration.
func (*Node) MergedConfig ¶
func (*Node) Nameservers ¶
func (*Node) NewCompliance ¶
func (t *Node) NewCompliance() (*compliance.T, error)
func (*Node) OCIEngine ¶
OCIEngine returns the engine the oci container and task resources of the node run with: the node.oci keyword, else podman when the node has it, else docker, as in v2.
func (Node) PRKey ¶
PRKey returns the SCSI3-PR key stored as node.prkey in the node config. It sets a new key if not found.
func (*Node) PostCommit ¶
func (Node) PrintCapabilities ¶
func (t Node) PrintCapabilities() (capabilities.L, error)
PrintCapabilities load and return node capabilities
func (Node) PushArrays ¶
PushArrays reports the configuration of the arrays of the cluster to the collector.
Each array is posted to the array feed of the oc3 feeder, compressed: the sections its driver reports, under the names v2 sent them, which the collector parses by type.
One array failing does not stop the others: an array that is down or whose credentials have expired must not keep the ones that are reachable from being reported. What failed is in the result, and in the error.
func (Node) PushAsset ¶
PushAsset assembles the asset inventory data. Each entry value comes from: * overrides (in config) * probes * default (code)
func (Node) PushRegistered ¶
PushRegistered sends the collector the initial inventory of a node just registered: asset, packages, disks, sysreport and checks. The collector then knows the node in details, and can serve it contextualized compliance rulesets, without waiting for the scheduled pushes.
The asset, package and disk pushes are required, the sysreport and checks pushes are not supported by every collector yet.
func (*Node) PushStats ¶
func (t *Node) PushStats(ctx context.Context, o PushStatsOptions) (PushStatsResult, error)
PushStats sends the performance statistics of the node to the collector, as the pushstats action of the v2 agent did: cpu, memory, swap, load, block and network i/o read from sysstat, and the file system usage.
func (*Node) PushStatsDryRun ¶
func (t *Node) PushStatsDryRun(ctx context.Context, o PushStatsOptions) (PushStatsResult, error)
PushStatsDryRun reads the statistics a push would send, and sends nothing.
func (Node) PushSwitches ¶
PushSwitches inventories the SAN switches of the node and cluster configuration, all of them or the one named, and reports their configuration to the collector.
The report goes to the switch feed of the oc3 feeder.
One switch failing does not stop the others: a switch out of reach must not keep the reachable ones from being reported.
func (Node) RecoverAndEditConfig ¶
func (Node) Register ¶
Register logs in to the collector using the provided user credentials.
If the node is not already known to the collector, a new node uuid is generated by the collector and stored by the agent in the node config as a node.uuid key.
The node registers on the oc3 server, by POST /api/auth/node: with the credentials of the user given, in the app given or the default one of the user, or anonymously, which the collector may refuse, in the app given, which oc3 requires.
If app is not set, the node is added to any app under the user's responsibility.
func (*Node) RegisterJoiningNode ¶
RegisterJoiningNode registers on the collector the node nodename joining the cluster, authenticated by this node registration id, and returns the new registration id of the joining node.
prevUUID is the registration id the joining node held before the join: the collector only registers a joining node already registered under its nodename, and moves it to the app and the cluster of this node.
func (*Node) SaveApplied ¶
SaveApplied records the configuration of the node, the cluster configuration merged, as the one the janitor named consumer applied.
A janitor undoes what the configuration it applied held and the one it applies no longer does. The configuration of the node changes through the daemon, a write made without it, an edit of the file or a restore, so the janitor diffs against what it applied, not against a change it was told of: a change made while the daemon was down would never be.
func (Node) ScanCapabilities ¶
ScanCapabilities scan node capabilities and return new capabilities
func (Node) SendSysreport ¶
SendSysreport posts a sysreport to the oc3 feeder, as a multipart form: the archive in the "file" part, when there is one, each deleted file in a "deleted" part, and the "full" flag.
func (*Node) SetVolatile ¶
func (*Node) ShowPoolsByName ¶
func (*Node) Store ¶
Store returns the driver of the store ref names, as the object at reader uses it, zero for a node command, configured from its section.
A bare name is a store#<name> section of the cluster configuration. A store of a sec is named from <sec> store#<name>, a ./ path naming a sec of the namespace of reader: the stores never clash, a bare name never meaning a store of a sec.
A store of a sec is one its namespace, or one it shares with, uses, its keys read as the object using it, and a store the daemon reaches over the network: a namespace does not choose a directory of the node, which the daemon would read and write as root.
func (*Node) Switch ¶
Switch returns the driver of the switch named in the node or cluster configuration, or nil when no section names it or no driver serves its type. The name is the one of the section, with or without its "switch#" prefix.
func (Node) Sysreport ¶
Sysreport sends an archive of modified files the agent is configured to track, and the list of files deleted since the last call.
The collector is in charge of versioning this information and of reporting on changes.
func (*Node) Unfreeze ¶
Unfreeze removes the persistent flag file that prevents orchestration of the object instance.
func (*Node) Update ¶
func (t *Node) Update(ctx context.Context, deleteSections []string, unsetKeys []key.T, keyOps []keyop.T) (err error)
Update updates applies configurations changes in the configuration file.
func (*Node) UpdateCompliance ¶
UpdateCompliance installs the compliance modules of the collector and returns the commit of the modules repository installed.
func (*Node) UpdatePkg ¶
UpdatePkg upgrades the opensvc packages installed on the node, from the repositories its package manager has configured, else from the package repository node.repopkg names, https://packages.opensvc.com by default, for the branch node.branch, prod by default.
The asset of the node is pushed after the upgrade, so the collector knows the new version of the agent without waiting for the asset schedule.
func (*Node) ValidateConfig ¶
ValidateConfig node configuration
type PushStatsOptions ¶
PushStatsOptions bound the statistics a push sends. A zero Begin starts where the last scheduled push left, a zero End is now.
type PushStatsResult ¶
type PushStatsResult struct {
Begin time.Time `json:"begin"`
End time.Time `json:"end"`
// Batches is the number of requests the range was sent in, a day
// of statistics each.
Batches int `json:"batches"`
// Rows is the number of rows read, by group.
Rows map[string]int `json:"rows"`
Series int `json:"series"`
Points int `json:"points"`
Skipped []string `json:"skipped,omitempty"`
Disabled []string `json:"disabled,omitempty"`
// DryRun says the statistics were read and not sent.
DryRun bool `json:"dry_run,omitempty"`
}
PushStatsResult tells what a push read and what the collector stored.
func (PushStatsResult) Render ¶
func (t PushStatsResult) Render() string
Render is the result as a person reads it: the range read, how many rows of each group, and what the collector stored.
type QueuedAction ¶
type QueuedAction struct {
Command string `json:"command"`
DequeuedAt time.Time `json:"dequeued_at"`
Id int `json:"id"`
Nodename string `json:"nodename"`
QueuedAt time.Time `json:"queued_at"`
Status string `json:"status"`
SvcId string `json:"svc_id"`
Svcname string `json:"svcname"`
}
QueuedAction defines the model for QueuedAction.
type QueuedActionDone ¶
type QueuedActionDone struct {
DequeuedAt time.Time `json:"dequeued_at"`
Id int `json:"id"`
Ret int `json:"ret"`
Stderr string `json:"stderr"`
Stdout string `json:"stdout"`
}
QueuedActionDone defines the action queued result processed by the node
type QueuedActionRunning ¶
type QueuedActionRunning struct {
// Ids list of queued action ids
Ids []int `json:"ids"`
}
QueuedActionRunning defines the model for QueuedActionRunning.
type QueuedActions ¶
type QueuedActions struct {
Actions []QueuedAction `json:"actions"`
}
QueuedActions defines the model for QueuedActions.
type RefsDocument ¶
RefsDocument is the keys of the sec and cfg an object references, by datastore, named "<kind>/<name>" relative to the namespace of the object, so a clone into another namespace lands its references there. The values are decoded, base64 in json.
func RefsDocumentOf ¶
func RefsDocumentOf(ns string, paths naming.Paths) (RefsDocument, error)
RefsDocumentOf returns the keys of the datastores at paths, decoded, named relative to the namespace ns.
type RefsMode ¶
type RefsMode string
RefsMode says how a restore applies a RefsDocument.
const ( // RefsMissing creates the datastores and the keys absent, leaves the // keys there as they are, and reports the ones whose value differs. RefsMissing RefsMode = "missing" // RefsSkip applies no reference. RefsSkip RefsMode = "skip" // RefsOverwrite rewrites every key of the document. RefsOverwrite RefsMode = "overwrite" )
func ParseRefsMode ¶
ParseRefsMode returns the mode s names, missing when empty.
type ResizeGrowsNothingError ¶
type ResizeGrowsNothingError struct {
// Name is the volume, or the link the size of the chain was worked out
// up to.
Name string
// Asked is the size asked of the bottom, and Head what the head holds,
// which is no less than what Asked leaves it.
Asked, Head int64
// Smallest is the smallest size of the bottom that grows the chain, and
// 0 when none does.
Smallest int64
}
ResizeGrowsNothingError refuses a size asked of a volume, more than the size it is configured to hold, that grows nothing: the links of its chain keep a cut of what they rest on and hand out whole units, so a bottom grown by less than that hands up no more than the head already holds. The size would be written to the configuration and claimed of the pool, and nothing would hold it.
func (*ResizeGrowsNothingError) Error ¶
func (e *ResizeGrowsNothingError) Error() string
type ResizeOptions ¶
type ResizeOptions struct {
// SkipHeadStage leaves the last stage of the chain alone. It holds
// the head, which grows only where the object is up, so a node that
// does not hold it up asks for the stages below it and is told there
// is no stage of that number to run here when it reaches the last.
SkipHeadStage bool
// Force allows a resize that would grow one replica of a replicated
// object on its own. The orchestration passes it for the phase that
// runs once every node has grown what is under the replicated
// resource.
Force bool
// Bottom says the size asked is the size of the bottom of the chain,
// rather than of the resource the resize is asked of. It is what a
// resize asked of a volume means: the size of a volume is what its
// pool and the claims of its namespace count, which is what the
// bottom of its chain holds, and the links above it keep a cut of
// what they rest on for their own metadata, so the head never holds
// it.
//
// The size the head has to reach is worked out from it, up the chain,
// from what each link hands out of what is below it, and the links
// are then asked from the top down, as they are for a size of the
// head: the bottom ends up asked for about the size given. A head
// already holding what that leaves it has nothing to do, which is
// what makes asking a volume for the size it is configured to hold
// harmless.
//
// A size recorded in DEFAULT.size is never more than the size given:
// that is the size the claim of the volume was checked for, and a
// rounding up on the way down is no reason to outgrow it.
Bottom bool
// Configured is the size the volume is configured to hold, for a
// resize asked of the bottom, and 0 when it says nothing. A size
// above it that grows nothing is refused with a
// ResizeGrowsNothingError naming the smallest one that does: asked
// of the pool through the configuration, it would be claimed with
// nothing holding it.
Configured int64
}
ResizeOptions tunes a resize.
type ResizePlan ¶
type ResizePlan struct {
// Steps are ordered as they would be applied, which is up from the
// device to the filesystem: the space has to exist before anything
// is stretched onto it.
Steps []ResizeStep `json:"steps"`
// Stages is how many stages the chain is grown in, which is one more
// than the number of replicated resources it crosses. Every node has
// to finish a stage before any node starts the next one: a replicated
// resource offers only what its smallest replica holds.
Stages int `json:"stages"`
// Bottom is the size asked of the bottom of the chain, when the size
// asked is of the bottom rather than of the resource the resize was
// asked of, and 0 otherwise. See ResizeOptions.Bottom.
Bottom int64 `json:"bottom,omitempty"`
}
ResizePlan is what a resize would do, in the order it would do it.
func (ResizePlan) HasWork ¶
func (t ResizePlan) HasWork() bool
HasWork says the plan changes something. A plan of links that all hold enough already changes nothing.
func (ResizePlan) String ¶
func (t ResizePlan) String() string
type ResizeStep ¶
type ResizeStep struct {
// Path names the object the resource belongs to, and is empty for
// the object the resize was asked of. A chain can cross into another
// object: a volume resource stands for the head of its volume.
Path string `json:"path,omitempty"`
RID string `json:"rid"`
Driver string `json:"driver"`
From int64 `json:"from"`
To int64 `json:"to"`
Comment string `json:"comment,omitempty"`
// Skip says the link already holds what the link above it needs, so
// there is nothing to do to it. It is listed so a plan shows the
// whole chain.
Skip bool `json:"skip,omitempty"`
// Stage is the step of the chain this link is grown in. A chain
// crossing no replicated resource has one stage, numbered 0.
Stage int `json:"stage"`
// contains filtered or unexported fields
}
ResizeStep is one link of the chain a resize walks, and the size that link is asked to reach.
func (ResizeStep) String ¶
func (t ResizeStep) String() string
type Sec ¶
Sec is the sec-kind object.
These objects are encrypted key-value store. Values can be binary or text.
A Key can be installed as a file in a Vol, then exposed to apps and containers. A Key can be exposed as a environment variable for apps and containers. A Signal can be sent to consumer processes upon exposed key value changes.
type Status ¶
type Status struct {
Priority priority.T `json:"priority"`
Scope []string `json:"scope"`
UpdatedAt time.Time `json:"updated_at"`
*ActorStatus
*VolStatus
}
Status contains the object states obtained via aggregation of all instances states. It exists when an instance config exists somewhere
type StoreItem ¶
type StoreItem struct {
// Ref is the reference to the store, as a store keyword names it.
Ref string `json:"ref"`
Type string `json:"type"`
URL string `json:"url"`
// one for a store of the cluster configuration, the namespace of the
// sec and the ones it shares with otherwise.
Share []string `json:"share"`
}
StoreItem is a store declared in the cluster configuration, or in a sec.
type Svc ¶
type Svc interface {
Actor
}
Svc is the svc-kind object.
These objects contain front facing resources like app and containers.
type SwitchItem ¶
SwitchItem is a switch section of the node or cluster configuration.
type SwitchPush ¶
type SwitchPush struct {
Name string `json:"name"`
Type string `json:"type"`
// Commands is the number of switch commands whose output was
// pushed.
Commands int `json:"commands"`
Error string `json:"error,omitempty"`
}
SwitchPush is what came of pushing one SAN switch to the collector.
type SyncSnapshot ¶
SyncSnapshot is a point in time a sync resource of the object can restore.
type Usr ¶
type Usr interface {
Sec
}
Usr is the usr-kind object.
These objects contain a opensvc api user grants and credentials. They are required for basic, session and x509 api access, but not for OpenID access (where grants are embedded in the trusted token)
type UsrDB ¶
type UsrDB struct{}
UsrDB implements UserGrants to authenticate user and get its grants
func (*UsrDB) GrantsFromUsername ¶
GrantsFromUsername returns grants for username if username existing usr object
func (*UsrDB) GrantsFromUsernameAndPassword ¶
GrantsFromUsernameAndPassword returns grants for username if username and password match existing usr object
func (*UsrDB) UXGrantsFromCgroup ¶
UXGrantsFromCgroup returns the name and the grants of the container resource whose process group holds the cgroup cg, the one of a process of a sidecar connected to the user socket: the uxgrant keyword of the resource. The name is "<path>:<rid>". It returns an empty name when no container resource of the node grants anything to that cgroup.
The configurations are read first, and an object is loaded only when one of its container sections sets uxgrant, to compute the process group of that resource.
func (*UsrDB) UsrFromUXUser ¶
UsrFromUXUser returns the name and the grants of the user of the system namespace whose uxuser keyword names login or uid, the local account connected to the user socket. A user naming neither is no local account, whatever its name. It returns an empty name when no user names them, and refuses several users naming them, a configuration to fix rather than grants to merge.
type Vol ¶
type Vol interface {
Actor
Head() string
HeadRID(context.Context) (string, error)
ConfiguredSize() (int64, error)
PoolName() (string, error)
ExposedDevice(context.Context) *device.T
ExposedDevices(context.Context) device.L
ExposedDeviceResource(context.Context) resource.Driver
SubDevice(context.Context) *device.T
SubDevices(context.Context) device.L
HoldersExcept(ctx context.Context, p naming.Path) (naming.Paths, error)
Access() (volaccess.T, error)
Children() (naming.Relations, error)
}
Vol is the vol-kind object.
These objects contain cluster-dependent fs, disk and sync resources.
They are created by feeding a volume resource configuration (cluster independent) to a pool.
Source Files
¶
- actor.go
- actor_boot.go
- actor_container_logs.go
- actor_edit_config.go
- actor_encap_api.go
- actor_enter.go
- actor_freeze.go
- actor_graphics.go
- actor_install.go
- actor_interrupt_syncs.go
- actor_key_sources.go
- actor_pg_reset.go
- actor_pg_update.go
- actor_print_schedule.go
- actor_provision.go
- actor_provision_restore.go
- actor_prstart.go
- actor_prstop.go
- actor_resinfo.go
- actor_resize.go
- actor_restart.go
- actor_run.go
- actor_set.go
- actor_set_provisioned.go
- actor_set_unprovisioned.go
- actor_shutdown.go
- actor_signal.go
- actor_start.go
- actor_startstandby.go
- actor_status.go
- actor_status_usage.go
- actor_stop.go
- actor_stopped.go
- actor_sync_full.go
- actor_sync_ingest.go
- actor_sync_restore.go
- actor_sync_resync.go
- actor_sync_snapshots.go
- actor_sync_split.go
- actor_sync_update.go
- actor_trigger.go
- actor_unprovision.go
- actor_unset.go
- actor_unstop.go
- actor_validate_resources.go
- ccfg.go
- cfg.go
- claim.go
- compliance.go
- config_create.go
- config_migrate.go
- config_migrate_node.go
- config_stop_to_change.go
- core.go
- core_action.go
- core_action_collector.go
- core_compliance.go
- core_config.go
- core_delete.go
- core_edit_config.go
- core_eval.go
- core_get.go
- core_keywords.go
- core_lock.go
- core_paths.go
- core_print_config.go
- core_print_devices.go
- core_purge.go
- core_set.go
- core_status.go
- core_unset.go
- core_update_config.go
- core_validate_config.go
- data.go
- datastore.go
- datastore_key_add.go
- datastore_key_decode.go
- datastore_key_edit.go
- datastore_key_install.go
- datastore_key_list.go
- datastore_key_remove.go
- datastore_key_rename.go
- datastore_seed.go
- factory.go
- holds.go
- interfaces.go
- keyword_groups.go
- node.go
- node_applied.go
- node_array.go
- node_capabilities.go
- node_checks.go
- node_collector.go
- node_compliance.go
- node_config.go
- node_delete_section.go
- node_deueue.go
- node_drivers.go
- node_edit_config.go
- node_freeze.go
- node_get.go
- node_keyword_groups.go
- node_keywords.go
- node_oci.go
- node_paths.go
- node_pool.go
- node_print_schedule.go
- node_prkey.go
- node_push_array.go
- node_push_asset.go
- node_push_disks.go
- node_push_pkg.go
- node_push_stats.go
- node_push_switch.go
- node_register.go
- node_set.go
- node_sources.go
- node_stonith.go
- node_store.go
- node_sysreport.go
- node_unset.go
- node_update_config.go
- node_update_pkg.go
- node_validate_config.go
- nscfg.go
- object_keyword_groups.go
- pg.go
- pg_keywords.go
- redact.go
- refs.go
- sec.go
- sec_acme.go
- sec_acme_listener.go
- sec_ca.go
- sec_decode_with.go
- sec_gencert.go
- sec_pkcs.go
- svc.go
- svc_disable.go
- svc_enable.go
- type_status.go
- usr.go
- vol.go
- writes.go