mirror of
https://github.com/containers/podman.git
synced 2025-06-25 03:52:15 +08:00
2
Makefile
2
Makefile
@ -304,7 +304,7 @@ test/version/version: version/version.go
|
||||
|
||||
.PHONY: codespell
|
||||
codespell:
|
||||
codespell -S bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif -w
|
||||
codespell -S bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L secon,passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif -w
|
||||
|
||||
.PHONY: validate
|
||||
validate: lint .gitvalidation validate.completions man-page-check swagger-check tests-included tests-expect-exit pr-removes-fixed-skips
|
||||
|
@ -19,7 +19,7 @@ outdated) example of it's output can be seen below:
|
||||
While it's arguably easier to read that `only_if`, it leads to a cluttered
|
||||
status output that's harder to page through when reviewing PRs. As opposed
|
||||
to `only_if` which will bypass creation of the task (at runtime) completely.
|
||||
Also, by sticking to one conditional style, it's easier to re-use the YAML
|
||||
Also, by sticking to one conditional style, it's easier to reuse the YAML
|
||||
statements across multiple tasks.
|
||||
|
||||
+ The only variables which can be used as part of conditions are defined by
|
||||
|
@ -4,7 +4,7 @@ set -euo pipefail
|
||||
|
||||
# This script is intended to be called by Cirrus-CI on a Mac M1 persistent worker.
|
||||
# It runs /after/ `mac_setup.sh` to help developers debug any environment
|
||||
# related issues. It must not make any actualy changes to the environment.
|
||||
# related issues. It must not make any actually changes to the environment.
|
||||
|
||||
# Many variables can affect operations, make them all known to assist debugging.
|
||||
echo "Selection of current env. vars:"
|
||||
|
@ -160,7 +160,7 @@ type ContainerRootFSConfig struct {
|
||||
// pre-1.8, which was used in very old Podman versions to determine how
|
||||
// image volumes were handled in Libpod (support for these eventually
|
||||
// moved out of Libpod into pkg/specgen).
|
||||
// Please DO NOT re-use the `imageVolumes` name in container JSON again.
|
||||
// Please DO NOT reuse the `imageVolumes` name in container JSON again.
|
||||
ImageVolumes []*ContainerImageVolume `json:"ctrImageVolumes,omitempty"`
|
||||
// CreateWorkingDir indicates that Libpod should create the container's
|
||||
// working directory if it does not exist. Some OCI runtimes do this by
|
||||
|
@ -40,7 +40,7 @@ const (
|
||||
sqliteOptionForeignKeys = "&_foreign_keys=1"
|
||||
// Make sure that transactions happen exclusively.
|
||||
sqliteOptionTXLock = "&_txlock=exclusive"
|
||||
// Make sure busy timeout is set to high value to keep retying when the db is locked.
|
||||
// Make sure busy timeout is set to high value to keep retrying when the db is locked.
|
||||
// Timeout is in ms, so set it to 100s to have enough time to retry the operations.
|
||||
sqliteOptionBusyTimeout = "&_busy_timeout=100000"
|
||||
|
||||
|
@ -71,7 +71,7 @@ type APIVersionError struct {
|
||||
|
||||
// NewAPIVersionError create bindings error when the endpoint on the server is not supported
|
||||
// because the version is to old.
|
||||
// - endpoint is the name fo the endpoint (e.g. /containers/json)
|
||||
// - endpoint is the name for the endpoint (e.g. /containers/json)
|
||||
// - version is the server API version
|
||||
// - requiredVersion is the server version need to use said endpoint
|
||||
func NewAPIVersionError(endpoint string, version *semver.Version, requiredVersion string) *APIVersionError {
|
||||
|
@ -481,7 +481,7 @@ type ContainerRenameOptions struct {
|
||||
NewName string
|
||||
}
|
||||
|
||||
// ContainerCloneOptions contains options for cloning an existing continer
|
||||
// ContainerCloneOptions contains options for cloning an existing container
|
||||
type ContainerCloneOptions struct {
|
||||
ID string
|
||||
Destroy bool
|
||||
|
@ -48,7 +48,7 @@ type ManifestAddOptions struct {
|
||||
type ManifestAnnotateOptions struct {
|
||||
// Annotation to add to manifest list
|
||||
Annotation []string `json:"annotation" schema:"annotation"`
|
||||
// Annotations to add to manifest list by a map which is prefferred over Annotation
|
||||
// Annotations to add to manifest list by a map which is preferred over Annotation
|
||||
Annotations map[string]string `json:"annotations" schema:"annotations"`
|
||||
// Arch overrides the architecture for the image
|
||||
Arch string `json:"arch" schema:"arch"`
|
||||
|
@ -464,7 +464,7 @@ func ValidatePodStatsOptions(args []string, options *PodStatsOptions) error {
|
||||
// PodLogsOptionsToContainerLogsOptions converts PodLogOptions to ContainerLogOptions
|
||||
func PodLogsOptionsToContainerLogsOptions(options PodLogsOptions) ContainerLogsOptions {
|
||||
// PodLogsOptions are similar but contains few extra fields like ctrName
|
||||
// So cast other values as is so we can re-use the code
|
||||
// So cast other values as is so we can reuse the code
|
||||
containerLogsOpts := ContainerLogsOptions{
|
||||
Details: options.Details,
|
||||
Latest: options.Latest,
|
||||
|
@ -630,7 +630,7 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
|
||||
// error out instead reuse the current volume.
|
||||
vol, err = ic.Libpod.GetVolume(v.Source)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("cannot re-use local volume for volume from configmap %q: %w", v.Source, err)
|
||||
return nil, nil, fmt.Errorf("cannot reuse local volume for volume from configmap %q: %w", v.Source, err)
|
||||
}
|
||||
} else {
|
||||
return nil, nil, fmt.Errorf("cannot create a local volume for volume from configmap %q: %w", v.Source, err)
|
||||
|
@ -121,7 +121,7 @@ func (ic *ContainerEngine) PodLogs(ctx context.Context, nameOrID string, options
|
||||
}
|
||||
|
||||
// PodLogsOptions are similar but contains few extra fields like ctrName
|
||||
// So cast other values as is so we can re-use the code
|
||||
// So cast other values as is so we can reuse the code
|
||||
containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options)
|
||||
|
||||
return ic.ContainerLogs(ctx, ctrNames, containerLogsOpts)
|
||||
|
@ -46,7 +46,7 @@ func (ic *ContainerEngine) PodKill(ctx context.Context, namesOrIds []string, opt
|
||||
|
||||
func (ic *ContainerEngine) PodLogs(ctx context.Context, nameOrIDs string, options entities.PodLogsOptions) error {
|
||||
// PodLogsOptions are similar but contains few extra fields like ctrName
|
||||
// So cast other values as is so we can re-use the code
|
||||
// So cast other values as is so we can reuse the code
|
||||
containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options)
|
||||
|
||||
// interface only accepts slice, keep everything consistent
|
||||
|
@ -5013,7 +5013,7 @@ type RollingUpdateDaemonSet struct {
|
||||
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
|
||||
// on that node is marked deleted. If the old pod becomes unavailable for any
|
||||
// reason (Ready transitions to false, is evicted, or is drained) an updated
|
||||
// pod is immediatedly created on that node without considering surge limits.
|
||||
// pod is immediately created on that node without considering surge limits.
|
||||
// Allowing surge implies the possibility that the resources consumed by the
|
||||
// daemonset on any given node can double if the readiness check fails, and
|
||||
// so resource intensive daemonsets should take into account that they may
|
||||
|
@ -87,7 +87,7 @@ import (
|
||||
//
|
||||
// This format is intended to make it difficult to use these numbers without
|
||||
// writing some sort of special handling code in the hopes that that will
|
||||
// cause implementors to also use a fixed point implementation.
|
||||
// cause implementers to also use a fixed point implementation.
|
||||
//
|
||||
// +protobuf=true
|
||||
// +protobuf.embed=string
|
||||
|
@ -781,7 +781,7 @@ func GetPodmanDockerTmpConfig(uid int, rootful bool, newline bool) string {
|
||||
}
|
||||
|
||||
// SetIgnitionFile creates a new Machine File for the machine's ignition file
|
||||
// and assignes the handle to `loc`
|
||||
// and assigns the handle to `loc`
|
||||
func SetIgnitionFile(loc *define.VMFile, vmtype define.VMType, vmName, vmConfigDir string) error {
|
||||
ignitionFile, err := define.NewMachineFile(filepath.Join(vmConfigDir, vmName+".ign"), nil)
|
||||
if err != nil {
|
||||
|
@ -146,7 +146,7 @@ EOF
|
||||
echo "-----------------"
|
||||
cat -vET $envfile2
|
||||
|
||||
# See above for resoning behind 'env -0' and a results file
|
||||
# See above for reasoning behind 'env -0' and a results file
|
||||
local resultsfile="$PODMAN_TMPDIR/envresults"
|
||||
touch $resultsfile
|
||||
run_podman run --rm -v "$resultsfile:/envresults:Z" \
|
||||
|
@ -880,7 +880,7 @@ EOF
|
||||
fi
|
||||
|
||||
local net1=a-$(random_string 10)
|
||||
# use /29 subnet to limt available ip space, a 29 gives 5 usable addresses (6 - 1 for the gw)
|
||||
# use /29 subnet to limit available ip space, a 29 gives 5 usable addresses (6 - 1 for the gw)
|
||||
local subnet="$(random_rfc1918_subnet).0/29"
|
||||
run_podman network create --subnet $subnet $net1
|
||||
local cname=con-$(random_string 10)
|
||||
|
@ -244,7 +244,7 @@ EOF
|
||||
run_podman container exec $cname grep CapBnd /proc/self/status
|
||||
non_privileged_caps="$output"
|
||||
run_podman --module=$conf_tmp container exec $cname grep CapBnd /proc/self/status
|
||||
assert "$output" != "$non_privileged_caps" "--module should enable a prvileged exec session"
|
||||
assert "$output" != "$non_privileged_caps" "--module should enable a privileged exec session"
|
||||
|
||||
run_podman rm -f -t0 $cname
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ func UntarToFileSystem(dest string, tarball *os.File, options *archive.TarOption
|
||||
return archive.Untar(tarball, dest, options)
|
||||
}
|
||||
|
||||
// Creates a new tar file and wrties bytes from io.ReadCloser
|
||||
// Creates a new tar file and writes bytes from io.ReadCloser
|
||||
func CreateTarFromSrc(source string, dest string) error {
|
||||
file, err := os.Create(dest)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user