github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/libpod/define/errors.go (about) 1 package define 2 3 import ( 4 "errors" 5 ) 6 7 var ( 8 // ErrNoSuchCtr indicates the requested container does not exist 9 ErrNoSuchCtr = errors.New("no such container") 10 11 // ErrNoSuchPod indicates the requested pod does not exist 12 ErrNoSuchPod = errors.New("no such pod") 13 14 // ErrNoSuchImage indicates the requested image does not exist 15 ErrNoSuchImage = errors.New("no such image") 16 17 // ErrMultipleImages found multiple name and tag matches 18 ErrMultipleImages = errors.New("found multiple name and tag matches") 19 20 // ErrNoSuchTag indicates the requested image tag does not exist 21 ErrNoSuchTag = errors.New("no such tag") 22 23 // ErrNoSuchVolume indicates the requested volume does not exist 24 ErrNoSuchVolume = errors.New("no such volume") 25 26 // ErrNoSuchNetwork indicates the requested network does not exist 27 ErrNoSuchNetwork = errors.New("network not found") 28 29 // ErrNoSuchExecSession indicates that the requested exec session does 30 // not exist. 31 ErrNoSuchExecSession = errors.New("no such exec session") 32 33 // ErrNoAliases indicates that the container does not have any network 34 // aliases. 35 ErrNoAliases = errors.New("no aliases for container") 36 37 // ErrCtrExists indicates a container with the same name or ID already 38 // exists 39 ErrCtrExists = errors.New("container already exists") 40 // ErrPodExists indicates a pod with the same name or ID already exists 41 ErrPodExists = errors.New("pod already exists") 42 // ErrImageExists indicates an image with the same ID already exists 43 ErrImageExists = errors.New("image already exists") 44 // ErrVolumeExists indicates a volume with the same name already exists 45 ErrVolumeExists = errors.New("volume already exists") 46 // ErrExecSessionExists indicates an exec session with the same ID 47 // already exists. 48 ErrExecSessionExists = errors.New("exec session already exists") 49 // ErrNetworkExists indicates that a network with the given name already 50 // exists. 51 ErrNetworkExists = errors.New("network already exists") 52 53 // ErrCtrStateInvalid indicates a container is in an improper state for 54 // the requested operation 55 ErrCtrStateInvalid = errors.New("container state improper") 56 // ErrExecSessionStateInvalid indicates that an exec session is in an 57 // improper state for the requested operation 58 ErrExecSessionStateInvalid = errors.New("exec session state improper") 59 // ErrVolumeBeingUsed indicates that a volume is being used by at least one container 60 ErrVolumeBeingUsed = errors.New("volume is being used") 61 62 // ErrRuntimeFinalized indicates that the runtime has already been 63 // created and cannot be modified 64 ErrRuntimeFinalized = errors.New("runtime has been finalized") 65 // ErrCtrFinalized indicates that the container has already been created 66 // and cannot be modified 67 ErrCtrFinalized = errors.New("container has been finalized") 68 // ErrPodFinalized indicates that the pod has already been created and 69 // cannot be modified 70 ErrPodFinalized = errors.New("pod has been finalized") 71 // ErrVolumeFinalized indicates that the volume has already been created and 72 // cannot be modified 73 ErrVolumeFinalized = errors.New("volume has been finalized") 74 75 // ErrInvalidArg indicates that an invalid argument was passed 76 ErrInvalidArg = errors.New("invalid argument") 77 // ErrEmptyID indicates that an empty ID was passed 78 ErrEmptyID = errors.New("name or ID cannot be empty") 79 80 // ErrInternal indicates an internal library error 81 ErrInternal = errors.New("internal libpod error") 82 83 // ErrPodPartialFail indicates that a pod operation was only partially 84 // successful, and some containers within the pod failed. 85 ErrPodPartialFail = errors.New("some containers failed") 86 87 // ErrDetach indicates that an attach session was manually detached by 88 // the user. 89 ErrDetach = errors.New("detached from container") 90 91 // ErrWillDeadlock indicates that the requested operation will cause a 92 // deadlock. This is usually caused by upgrade issues, and is resolved 93 // by renumbering the locks. 94 ErrWillDeadlock = errors.New("deadlock due to lock mismatch") 95 96 // ErrNoCgroups indicates that the container does not have its own 97 // CGroup. 98 ErrNoCgroups = errors.New("this container does not have a cgroup") 99 // ErrNoLogs indicates that this container is not creating a log so log 100 // operations cannot be performed on it 101 ErrNoLogs = errors.New("this container is not logging output") 102 103 // ErrRootless indicates that the given command cannot but run without 104 // root. 105 ErrRootless = errors.New("operation requires root privileges") 106 107 // ErrRuntimeStopped indicates that the runtime has already been shut 108 // down and no further operations can be performed on it 109 ErrRuntimeStopped = errors.New("runtime has already been stopped") 110 // ErrCtrStopped indicates that the requested container is not running 111 // and the requested operation cannot be performed until it is started 112 ErrCtrStopped = errors.New("container is stopped") 113 114 // ErrCtrRemoved indicates that the container has already been removed 115 // and no further operations can be performed on it 116 ErrCtrRemoved = errors.New("container has already been removed") 117 // ErrPodRemoved indicates that the pod has already been removed and no 118 // further operations can be performed on it 119 ErrPodRemoved = errors.New("pod has already been removed") 120 // ErrVolumeRemoved indicates that the volume has already been removed and 121 // no further operations can be performed on it 122 ErrVolumeRemoved = errors.New("volume has already been removed") 123 // ErrExecSessionRemoved indicates that the exec session has already 124 // been removed and no further operations can be performed on it. 125 ErrExecSessionRemoved = errors.New("exec session has already been removed") 126 127 // ErrDBClosed indicates that the connection to the state database has 128 // already been closed 129 ErrDBClosed = errors.New("database connection already closed") 130 // ErrDBBadConfig indicates that the database has a different schema or 131 // was created by a libpod with a different config 132 ErrDBBadConfig = errors.New("database configuration mismatch") 133 134 // ErrNSMismatch indicates that the requested pod or container is in a 135 // different namespace and cannot be accessed or modified. 136 ErrNSMismatch = errors.New("target is in a different namespace") 137 138 // ErrNotImplemented indicates that the requested functionality is not 139 // yet present 140 ErrNotImplemented = errors.New("not yet implemented") 141 142 // ErrOSNotSupported indicates the function is not available on the particular 143 // OS. 144 ErrOSNotSupported = errors.New("no support for this OS yet") 145 146 // ErrOCIRuntime indicates a generic error from the OCI runtime 147 ErrOCIRuntime = errors.New("OCI runtime error") 148 149 // ErrOCIRuntimePermissionDenied indicates the OCI runtime attempted to invoke a command that returned 150 // a permission denied error 151 ErrOCIRuntimePermissionDenied = errors.New("OCI permission denied") 152 153 // ErrOCIRuntimeNotFound indicates the OCI runtime attempted to invoke a command 154 // that was not found 155 ErrOCIRuntimeNotFound = errors.New("OCI not found") 156 157 // ErrOCIRuntimeUnavailable indicates that the OCI runtime associated to a container 158 // could not be found in the configuration 159 ErrOCIRuntimeUnavailable = errors.New("OCI unavailable") 160 161 // ErrConmonOutdated indicates the version of conmon found (whether via the configuration or $PATH) 162 // is out of date for the current podman version 163 ErrConmonOutdated = errors.New("outdated conmon version") 164 // ErrConmonDead indicates that the container's conmon process has been 165 // killed, preventing normal operation. 166 ErrConmonDead = errors.New("conmon process killed") 167 168 // ErrImageInUse indicates the requested operation failed because the image was in use 169 ErrImageInUse = errors.New("image is being used") 170 171 // ErrNetworkOnPodContainer indicates the user wishes to alter network attributes on a container 172 // in a pod. This cannot be done as the infra container has all the network information 173 ErrNetworkOnPodContainer = errors.New("network cannot be configured when it is shared with a pod") 174 175 // ErrNetworkInUse indicates the requested operation failed because the network was in use 176 ErrNetworkInUse = errors.New("network is being used") 177 178 // ErrStoreNotInitialized indicates that the container storage was never 179 // initialized. 180 ErrStoreNotInitialized = errors.New("the container storage was never initialized") 181 182 // ErrNoNetwork indicates that a container has no net namespace, like network=none 183 ErrNoNetwork = errors.New("container has no network namespace") 184 )