common

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 35 modules, 25 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 (
	// common field parsing
	ErrNoVariant      = errors.New("error parsing variant; must be specified")
	ErrInvalidVersion = errors.New("error parsing version; must be a valid semver")

	// high-level errors for fatal reports
	ErrInvalidSourceConfig    = errors.New("source config is invalid")
	ErrInvalidGeneratedConfig = errors.New("config generated was invalid")

	// deprecated variant/version
	ErrRhcosVariantUnsupported = errors.New("rhcos variant has been removed; use openshift variant instead: https://coreos.github.io/butane/upgrading-openshift/")

	// resources and trees
	ErrTooManyResourceSources = errors.New("only one of the following can be set: inline, local, source")
	ErrFilesDirEscape         = errors.New("local file path traverses outside the files directory")
	ErrFileType               = errors.New("trees may only contain files, directories, and symlinks")
	ErrNodeExists             = errors.New("matching filesystem node has existing contents or different type")
	ErrNoFilesDir             = errors.New("local file paths are relative to a files directory that must be specified with -d/--files-dir")
	ErrTreeNotDirectory       = errors.New("root of tree must be a directory")
	ErrTreeNoLocal            = errors.New("local is required")

	// filesystem nodes
	ErrDecimalMode = errors.New("unreasonable mode would be reasonable if specified in octal; remember to add a leading zero")

	// systemd
	ErrTooManySystemdSources              = errors.New("only one of the following can be set: contents, contents_local")
	ErrQuadletBadExtension                = errors.New("unsupported file extension for quadlet: must be one of .container, .volume, .network, .kube, .image, .build, .pod, or .artifact")
	ErrTemplateInstanceCannotHaveContents = errors.New("template instances cannot have contents or contents_local")

	// mount units
	ErrMountUnitNoPath     = errors.New("path is required if with_mount_unit is true and format is not swap")
	ErrMountUnitNoFormat   = errors.New("format is required if with_mount_unit is true")
	ErrMountPointForbidden = errors.New("path must be under /etc or /var if with_mount_unit is true")

	// boot device
	ErrUnknownBootDeviceLayout       = errors.New("layout must be one of: aarch64, ppc64le, s390x-eckd, s390x-virt, s390x-zfcp, x86_64")
	ErrUnknownBootDeviceLayoutLegacy = errors.New("layout must be one of: aarch64, ppc64le, x86_64")
	ErrTooFewMirrorDevices           = errors.New("mirroring requires at least two devices")
	ErrMirrorRequiresLayout          = errors.New("boot_device.layout should be specified when boot_device.mirror is specified")
	ErrNoLuksBootDevice              = errors.New("device is required for layouts: s390x-eckd, s390x-zfcp")
	ErrMirrorNotSupport              = errors.New("mirroring not supported on layouts: s390x-eckd, s390x-zfcp, s390x-virt")
	ErrLuksBootDeviceBadName         = errors.New("device name must start with /dev/dasd on s390x-eckd layout or /dev/sd on s390x-zfcp layout")
	ErrCexArchitectureMismatch       = errors.New("when using cex the targeted architecture must match s390x")
	ErrCexNotSupported               = errors.New("cex is not currently supported on the target platform")
	ErrNoLuksMethodSpecified         = errors.New("no method specified for luks")

	// partition
	ErrReuseByLabel         = errors.New("partitions cannot be reused by label; number must be specified except on boot disk (/dev/disk/by-id/coreos-boot-disk) or when wipe_table is true")
	ErrWrongPartitionNumber = errors.New("incorrect partition number; a new partition will be created using reserved label")
	ErrRootTooSmall         = errors.New("root should have 8GiB of space assigned")
	ErrRootConstrained      = errors.New("root partition cannot expand; it is set to fill available space but is followed by an auto-positioned partition")

	// MachineConfigs
	ErrFieldElided              = errors.New("field ignored in raw mode")
	ErrNameRequired             = errors.New("metadata.name is required")
	ErrRoleRequired             = errors.New("machineconfiguration.openshift.io/role label is required")
	ErrInvalidKernelType        = errors.New("must be empty, \"default\", or \"realtime\"")
	ErrBtrfsSupport             = errors.New("btrfs is not supported in this spec version")
	ErrFilesystemNoneSupport    = errors.New("format \"none\" is not supported in this spec version")
	ErrFileSchemeSupport        = errors.New("file contents source must be data URL in this spec version")
	ErrFileAppendSupport        = errors.New("appending to files is not supported in this spec version")
	ErrFileCompressionSupport   = errors.New("file compression is not supported in this spec version")
	ErrFileHeaderSupport        = errors.New("file HTTP headers are not supported in this spec version")
	ErrFileSpecialModeSupport   = errors.New("special mode bits are not supported in this spec version")
	ErrGroupSupport             = errors.New("groups are not supported in this spec version")
	ErrUserFieldSupport         = errors.New("fields other than \"name\", \"ssh_authorized_keys\", and \"password_hash\" (4.13.0+) are not supported in this spec version")
	ErrUserNameSupport          = errors.New("users other than \"core\" are not supported in this spec version")
	ErrKernelArgumentSupport    = errors.New("this section cannot be used for kernel arguments in this spec version; use openshift.kernel_arguments instead")
	ErrMissingKernelArgumentCex = errors.New("'rd.luks.key=/etc/luks/cex.key' must be set as kernel argument when CEX is enabled for the boot device")

	// Storage
	ErrClevisSupport     = errors.New("clevis is not supported in this spec version")
	ErrDirectorySupport  = errors.New("directories are not supported in this spec version")
	ErrDiskSupport       = errors.New("disk customization is not supported in this spec version")
	ErrFilesystemSupport = errors.New("filesystem customization is not supported in this spec version")
	ErrLinkSupport       = errors.New("links are not supported in this spec version")
	ErrLuksSupport       = errors.New("luks is not supported in this spec version")
	ErrRaidSupport       = errors.New("raid is not supported in this spec version")

	// Grub
	ErrGrubUserNameNotSpecified = errors.New("field \"name\" is required")
	ErrGrubPasswordNotSpecified = errors.New("field \"password_hash\" is required")

	// Kernel arguments
	ErrGeneralKernelArgumentSupport = errors.New("kernel argument customization is not supported in this spec version")

	// Unkown ignition version
	ErrUnkownIgnitionVersion = errors.New("skipping validation for the merge/replace ignition config due to an unkown version")
)

Functions

This section is empty.

Types

type ErrUnknownVersion added in v0.19.0

type ErrUnknownVersion struct {
	Variant string
	Version semver.Version
}

func (ErrUnknownVersion) Error added in v0.19.0

func (e ErrUnknownVersion) Error() string

type ErrUnmarshal added in v0.19.0

type ErrUnmarshal struct {
	// don't wrap the underlying error object because we don't want to
	// commit to its API
	Detail string
}

func (ErrUnmarshal) Error added in v0.19.0

func (e ErrUnmarshal) Error() string

type TranslateBytesOptions

type TranslateBytesOptions struct {
	TranslateOptions
	Pretty bool
	Raw    bool // encode only the Ignition config, not any wrapper
}

type TranslateOptions

type TranslateOptions struct {
	FilesDir                  string // allow embedding local files relative to this directory
	NoResourceAutoCompression bool   // skip automatic compression of inline/local resources
	DebugPrintTranslations    bool   // report translations to stderr
}

Jump to

Keyboard shortcuts

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