rescontainerlxc

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 44 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// GroupCreation holds how lxc-create makes the container at its
	// provision: the template it unpacks, and the arguments and the
	// variables given to the script of the template.
	GroupCreation = keywords.Group{
		ID:    "creation",
		Name:  "Creation",
		Text:  keywords.NewText(fs, "text/group/creation"),
		Order: 20,
	}
)

Functions

func New

func New() resource.Driver

Types

type T

type T struct {
	resource.T
	resource.Restart
	resource.SSH
	resource.SCSIPersistentReservation
	Path                     naming.Path    `json:"path"`
	ObjectID                 uuid.UUID      `json:"object_id"`
	Nodes                    []string       `json:"nodes"`
	DNS                      []string       `json:"dns"`
	SCSIReserv               bool           `json:"scsireserv"`
	PromoteRW                bool           `json:"promote_rw"`
	OsvcRootPath             string         `json:"osvc_root_path"`
	GuestOS                  string         `json:"guest_os"`
	Name                     string         `json:"name"`
	Hostname                 string         `json:"hostname"`
	DataDir                  string         `json:"data_dir"`
	RootDir                  string         `json:"root_dir"`
	ConfigFile               string         `json:"cf"`
	Template                 string         `json:"template"`
	TemplateOptions          []string       `json:"template_options"`
	CreateSecretsEnvironment []string       `json:"create_secrets_environment"`
	CreateConfigsEnvironment []string       `json:"create_configs_environment"`
	CreateEnvironment        []string       `json:"create_environment"`
	RCmd                     []string       `json:"rcmd"`
	StartTimeout             *time.Duration `json:"start_timeout"`
	EncapNodes               []string       `json:"encapnodes"`
	StopTimeout              *time.Duration `json:"stop_timeout"`
	// contains filtered or unexported fields
}

func (*T) Abort

func (t *T) Abort(ctx context.Context) bool

func (*T) ContainerHead

func (t *T) ContainerHead(ctx context.Context) (string, error)

ContainerHead implements the interface replacing b2.1 the zonepath resource attribute

func (*T) ContainerName

func (t *T) ContainerName() string

ContainerName returns the name of the container, which the zone keyword of a filesystem names to be mounted under its root directory.

func (*T) DriverID

func (t *T) DriverID() driver.ID

func (*T) EncapCmd

func (t *T) EncapCmd(ctx context.Context, args []string, envs []string, stdin io.Reader) (resource.Commander, error)

func (*T) EncapCp

func (t *T) EncapCp(ctx context.Context, src, dst string) error

func (*T) Enter

func (t *T) Enter(ctx context.Context) error

func (*T) GetHostname

func (t *T) GetHostname() string

func (*T) GetOsvcRootPath

func (t *T) GetOsvcRootPath() string

func (*T) Holds

func (t *T) Holds(src resource.HoldSource) []resource.Hold

Holds says the name of the container.

func (*T) Label

func (t *T) Label(_ context.Context) string

Label implements Label from resource.Driver interface, it returns a formatted short description of the Resource

func (*T) LinkNames

func (t *T) LinkNames() []string

LinkNames implements the interface necessary for the container.lxc resources to be targeted by ip.cni, ip.netns, ...

func (*T) Manifest

func (t *T) Manifest() *manifest.T

Manifest exposes to the core the input expected by the driver.

func (*T) NetNSPath

func (t *T) NetNSPath(ctx context.Context) (string, error)

NetNSPath implements the resource.NetNSPather optional interface. Used by ip.netns and ip.route to configure network stuff in the container.

func (*T) PID

func (t *T) PID(ctx context.Context) int

PID implements the resource.PIDer optional interface. Used by ip.netns to name the veth pair devices.

func (*T) ProvisionAsLeader

func (t *T) ProvisionAsLeader(ctx context.Context) error

func (*T) ProvisionConflicts

func (t *T) ProvisionConflicts(ctx context.Context) []string

ProvisionConflicts says a container of the name exists already, when the provision would create one, as a template or a rootfs to create it from says: a container made by a sysadmin, which a resource setting none of them is configured on, is its own.

func (*T) ProvisionStart

func (t *T) ProvisionStart(ctx context.Context) error

ProvisionStart starts the guest at the end of its provision on the placement leader only: see rescontainer.ProvisionStarts. Off the leader, the guest is not created yet, and its disks are on the resources the leader alone starts.

func (*T) Provisioned

func (t *T) Provisioned(ctx context.Context) (provisioned.T, error)

func (*T) SetEncapFileOwnership

func (t *T) SetEncapFileOwnership(ctx context.Context, p string) error

SetEncapFileOwnership sets the ownership of the file to be the same ownership than the container root dir, which may be not root for unprivileged containers.

func (*T) Signal

func (t *T) Signal(ctx context.Context, sig syscall.Signal) error

Signal implements object.signaler

func (*T) Start

func (t *T) Start(ctx context.Context) error

func (*T) Status

func (t *T) Status(ctx context.Context) status.T

func (*T) Stop

func (t *T) Stop(ctx context.Context) error

func (*T) SyncScope

func (t *T) SyncScope() string

SyncScope is the name of the container: the files to sync are the ones of the container, which a name scoped per node makes another one on another node.

func (*T) ToSync

func (t *T) ToSync(ctx context.Context) []string

func (*T) Unprovision

func (t *T) Unprovision(ctx context.Context) error

func (*T) UnprovisionAsFollower

func (t *T) UnprovisionAsFollower(ctx context.Context) error

func (*T) UnprovisionAsLeader

func (t *T) UnprovisionAsLeader(ctx context.Context) error

Jump to

Keyboard shortcuts

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