Errors — zun — branch stable/2026.2
Branch
stable/2026.2@34135a563699— repository https://opendev.org/openstack/zun — analysed on 2026-11-01
The inventory (_inventory/inventory_stable-2026.2.json, key exceptions) finds 155 exception classes: 151 in zun/common/exception.py, 3 in zun/common/docker_image/digest.py, and Retry in zun/scheduler/client/report.py:67. The base ZunException (zun/common/exception.py:182) carries message and code, 500 by default (zun/common/exception.py:191). Three more names are raised but defined nowhere (T9).
Evidence. Bodies come from reading the code, checked against [_rewrite/observed-errors_stable-2026.2.md](_rewrite/observed-errors_stable-2026.2.md) (221 API tests) and [_rewrite/probe_stable-2026.2.json](_rewrite/probe_stable-2026.2.json) (32 requests to the real Pecan application, without the paste pipeline). Those runs mock the scheduler and compute, so nothing here was observed against a real zun-compute. Other repositories cited: oslo.messaging 9df3fda5aa64, oslo.serialization 576f1c9ae949, python-keystoneclient b76de6a3807c.
Exception → HTTP translation
The layers, innermost first
- **
@exception.wrap_pecan_controller_exception** (zun/common/exception.py:139) sits on all controller methods underzun/api/controllers/v1/. OnlyRootController.get,_route,V1.get,Controller._routeand_no_version_matchare not wrapped (zun/api/controllers/root.py:80,zun/api/controllers/root.py:87,zun/api/controllers/v1/__init__.py:172,zun/api/controllers/v1/__init__.py:202,zun/api/controllers/base.py:98).wrap_controller_exception(zun/common/exception.py:95) decides:- a
ZunExceptionwithcode< 500 returns (zun/common/exception.py:150){"faultcode": "Client", "faultstring": <kebab-case class name>, "status_code": N, "title": str(e), "description": str(e)}, logged at debug; - a
ZunExceptionwithcode>= 500, or any other exception (zun/common/exception.py:111), logsLOG.exception("%(correlation_id)s:%(excp)s")and returns (zun/common/exception.py:141){"faultcode": "Server", "status_code": N, "title": <reason phrase>, "description": "Your request could not be handled because of a problem in the server. Error Correlation id is: <uuid>"}. There is nofaultstring.
- a
- **
convert_excp_to_err_code** (zun/common/exception.py:132) splits the class name:InvalidValuegivesinvalid-value,Base64Exceptiongivesbase-64-exception,ContainerNotFound_Remotegivescontainer-not-found-remote(checked by running the same regular expression). - **
NoExceptionTracebackHook.after** (zun/api/hooks.py:95, registered atzun/api/config.py:23) cutsTraceback (most recent call last):from **titleonly** (zun/api/hooks.py:110). It leavesdescriptionalone. Withdebug=Trueit does nothing forClientfaults (zun/api/hooks.py:107). - **
ParsableErrorMiddleware** (zun/api/middleware/parsable_error.py:25, wrapped atzun/api/app.py:45) rewrites every response whose status is not 2xx or 3xx (zun/api/middleware/parsable_error.py:60):
{"errors": [{"request_id": "", "code": "container.<faultstring lower-cased>", "status": 404,
"title": "<title>", "detail": "<description>", "links": []}]}
The body is built from these rules:
| Rule | Consequence | Source |
|---|---|---|
request_id is always "" | use the x-openstack-request-id header set by the request_id filter | zun/api/middleware/parsable_error.py:83, etc/zun/api-paste.ini:7 |
no faultstring gives code container. (with the final dot) | every 5xx, and every non-Zun 4xx, has the code container. | zun/api/middleware/parsable_error.py:76, zun/api/middleware/parsable_error.py:80 |
title and detail are copied only if the input JSON has both title and description | otherwise both are "" | zun/api/middleware/parsable_error.py:69 |
| any other key of the input is dropped | code, max_version, min_version, links do not survive | zun/api/middleware/parsable_error.py:82 |
| one error per chunk of the iterable | normally one element [inferred] | zun/api/middleware/parsable_error.py:62 |
Examples, derived by reading:
{"errors":[{"request_id":"","code":"container.container-not-found","status":404,"title":"Container abc could not be found.","detail":"Container abc could not be found.","links":[]}]}
{"errors":[{"request_id":"","code":"container.","status":500,"title":"Internal Server Error","detail":"Your request could not be handled because of a problem in the server. Error Correlation id is: 7c...","links":[]}]}
The middleware is inside api_v1, after authtoken in the pipeline (etc/zun/api-paste.ini:7). So the 401 of keystonemiddleware and the /healthcheck app do not get this format.
Errors not raised as ZunException
| Case | Status | Source | What the client sees |
|---|---|---|---|
OpenStack-API-Version not two words, or service word not container | 406 | zun/api/controllers/versions.py:134, zun/api/controllers/versions.py:141 | webob 406 through the middleware. code is container.. title and detail are empty unless Accept prefers JSON, in which case Pecan writes {code, title, description} before the middleware [inferred] |
version part not major.minor integers | 406 | zun/api/controllers/versions.py:149 | same |
| version within range, no method implementation for it | 406 | zun/api/controllers/base.py:102 | same. _no_version_match replaces the versioned method, and is not wrapped |
| major not 1, or minor outside 1.1 to 1.40 | intended 406 | zun/api/controllers/v1/__init__.py:181, zun/api/controllers/v1/__init__.py:193, zun/api/controllers/versions.py:78, zun/api/controllers/versions.py:79 | not a 406 (T1). The intended zun.microversion-unsupported (zun/api/http_error.py:61) can never reach a client: the response's __call__ crashes, and if it did not, the middleware would replace code and drop max_version, min_version and links |
wrong Content-Type on a method with enforce_content_types | intended 415 | zun/api/utils.py:89, zun/api/utils.py:92 | not a 415 (T2) |
| unknown path or method | 404 or 405 from Pecan | no Zun code | body rewritten with code container., empty title and detail (probes) |
Version.string is OpenStack-API-Version and Version.service_string is container (zun/api/controllers/versions.py:85, zun/api/controllers/versions.py:94). Default without header: container 1.1 (zun/api/controllers/v1/__init__.py:45). latest gives 1.40 (zun/api/controllers/versions.py:137).
RPC path
Verified in zun/common/rpc.py and in the sibling checkout oslo.messaging/oslo_messaging/_drivers/common.py (same workspace, version not pinned to this branch).
- The class survives.
ALLOWED_EXMODSis[zun.common.exception](zun/common/rpc.py:36), passed asallowed_remote_exmodson the client transport (zun/common/rpc.py:44). A remote exception of that module is rebuilt withklass(*args, **kwargs), socodeis the class's andisinstancestill holds. This is whyexcept exception.OperationNotSupportedatzun/compute/api.py:84works across RPC. - The class name changes. The client gets a dynamic subclass named
<Class>_Remote(oslo.messaging:oslo_messaging/_drivers/common.py:236). So the same error has codecontainer.container-not-foundfrom the API process andcontainer.container-not-found-remotefrom the compute (T4). - The traceback goes to the client.
__str__is overridden to return the message plus newline plus the remote traceback (oslo.messaging:oslo_messaging/_drivers/common.py:205,oslo.messaging:oslo_messaging/_drivers/common.py:235)._func_client_errorputsstr(excp)into bothtitleanddescription(zun/common/exception.py:156). The hook cuts onlytitle, so **detailcontains the compute traceback** on every 4xx coming from a computecall(T3). A 5xx is not affected: it is obfuscated. - **Other modules become
RemoteError.** Adocker.errors,neutronclientorcinderclientexception is not in the allowed modules, sooslo_messaging.RemoteError(oslo.messaging:oslo_messaging/_drivers/common.py:219) arrives: not aZunException, so 500container.. A rebuild failure (a class whose constructor refuses the kwargs, such asNetworkAlreadyExists,zun/common/exception.py:390) givesRemoteErrortoo (oslo.messaging:oslo_messaging/_drivers/common.py:229). - **
translate_exception** (zun/common/utils.py:216) decorates the synchronous manager methods (zun/compute/manager.py:617,zun/compute/manager.py:807,zun/compute/manager.py:825,zun/compute/manager.py:858,zun/compute/manager.py:890,zun/compute/manager.py:927,zun/compute/manager.py:944,zun/compute/manager.py:957,zun/compute/manager.py:972,zun/compute/manager.py:990,zun/compute/manager.py:1008,zun/compute/manager.py:1022,zun/compute/manager.py:1164) andcontainer_delete(zun/compute/manager.py:537). AZunExceptionpasses through. Anything else is logged (Unexpected error: %s) and replaced byZunException("Unexpected error: ..."): same 500.network_createandnetwork_deletearecalls without this decorator (zun/compute/manager.py:1282,zun/compute/manager.py:1286), so they can produceRemoteError. - **
callorcast.** Synchronous:container_show,container_logs,container_exec,container_exec_resize,container_update,container_attach,container_resize,container_top,container_get_archive,container_put_archive,container_stats,container_commit,image_search,network_create,network_delete,capsule_delete(zun/compute/rpcapi.py:75,zun/compute/rpcapi.py:102,zun/compute/rpcapi.py:108,zun/compute/rpcapi.py:115,zun/compute/rpcapi.py:124,zun/compute/rpcapi.py:133,zun/compute/rpcapi.py:138,zun/compute/rpcapi.py:143,zun/compute/rpcapi.py:148,zun/compute/rpcapi.py:155,zun/compute/rpcapi.py:161,zun/compute/rpcapi.py:166,zun/compute/rpcapi.py:185,zun/compute/rpcapi.py:199,zun/compute/rpcapi.py:213,zun/compute/rpcapi.py:218). All others arecasts: errors never return.rpcapi.capsule_createandcapsule_deletehave no target method in the manager and no caller inzun/compute/api.py; capsules go through the container methods [inferred]. - **
MessagingTimeout.** Noexcepton it inzun/. Client created withtimeout=None(zun/common/rpc_service.py:88), so[DEFAULT]/rpc_response_timeoutapplies (oslo.messaging default 60 s) [inferred for the default]. Effect: not aZunException, so **500container.**, after the delay. This includesGET /v1/containers/{id}of a container whose compute is up but stuck: onlyContainerHostNotUpis caught there (zun/api/controllers/v1/containers.py:236). Exception: the image validation call on create, swallowed (zun/compute/api.py:93), so create waits for the timeout and proceeds. - **
check_container_host** (zun/compute/rpcapi.py:25) raisesContainerHostNotUp(500) before the RPC when the host's service is down. It decorates allcalls on a container, andcontainer_delete, but **no othercast** (T20).
Catalogue
"Client sees" codes are the code of the JSON body. -remote means the raise is on the compute and reaches the client through an RPC call. In that case detail carries the traceback (T3). 500 container. means the obfuscated body. Messages built by the caller are quoted in the situation. Line numbers are from grep -n on complete files. Raises of NotImplementedError are in the table after this one.
| Exception | HTTP | Message (template) | Situation | Raised at | Seen by the client as |
|---|---|---|---|---|---|
SchemaValidationError (zun/common/exception.py:279) | 400 | %(detail)s | body or query parameter violates the JSON schema of the operation | zun/api/validation/validators.py:52 | 400 container.schema-validation-error |
ValidationError (zun/common/exception.py:275) | 400 | %(detail)s | image_driver of a rebuild is not in image_driver_list | zun/common/utils.py:130 | 400 container.validation-error |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | unknown query parameters on a list (Unknown parameters: %s) | zun/api/controllers/v1/containers.py:204, zun/api/controllers/v1/registries.py:132 | see trap T13: a % in a parameter name turns this into a 500 |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | run or interactive is not a boolean string (create, exec) | zun/api/controllers/v1/containers.py:331, zun/api/controllers/v1/containers.py:989 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | auto_remove is not a boolean string | zun/api/controllers/v1/containers.py:346 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | privileged is not a boolean string | zun/api/controllers/v1/containers.py:390 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | force or stop of a delete is not a boolean string | zun/api/controllers/v1/containers.py:794 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | stdout, stderr or timestamps of logs is not a boolean string | zun/api/controllers/v1/containers.py:960 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | the named security group does not exist in Neutron | zun/api/controllers/v1/containers.py:630 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | the security group is already on the container | zun/api/controllers/v1/containers.py:657 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | the security group is not on the container | zun/api/controllers/v1/containers.py:683 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | image pull names a host with no compute node record | zun/api/controllers/v1/images.py:45 | 400, not 404: conversion of ComputeNodeNotFound |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | exact_match of an image search is not a boolean string | zun/api/controllers/v1/images.py:175 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | forced_down of a service is not a boolean string | zun/api/controllers/v1/zun_services.py:117 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | limit is zero, negative or not an integer | zun/api/utils.py:42, zun/api/utils.py:44 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | sort_dir is neither asc nor desc | zun/api/utils.py:54 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | all_projects is not a boolean string | zun/common/utils.py:442 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | restart policy unless-stopped or always has a non-zero retry count | zun/common/utils.py:473 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | an exposed port has a protocol other than tcp or udp | zun/common/utils.py:482 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | an exposed port is not an integer | zun/common/utils.py:490 | 400 container.invalid-value |
InvalidValue (zun/common/exception.py:271) | 400 | Received value '%(value)s' is invalid for type %(type)s. | image validation: compute says the image name has an invalid format | zun/compute/api.py:90 | 400 container.invalid-value, only when [api]/enable_image_validation is on |
InvalidParamInVersion (zun/common/exception.py:335) | 400 | Invalid param %(param)s because current request version is %(req_version)s. %(param)s is only supported from version %(min_version)s | a parameter is used below its minimum microversion (auto_remove 1.3, mounts 1.11, force 1.7, ...) | zun/api/utils.py:120 | 400 container.invalid-param-in-version |
NoInteractiveFlag (zun/common/exception.py:533) | 400 | %(msg)s | attach to a container that is not interactive | zun/api/controllers/v1/containers.py:1059 | 400 container.no-interactive-flag |
InvalidStateException (zun/common/exception.py:498) | 409 | Cannot %(action)s container %(id)s in %(actual_state)s state | the action is not allowed in the container's current status (VALID_STATES table) | zun/common/utils.py:120 | 409 container.invalid-state-exception |
ResourceNotFound (zun/common/exception.py:240) | 404 | The %(name)s resource %(id)s could not be found. | the request id names no action of this container | zun/api/controllers/v1/containers.py:114 | 404 container.resource-not-found, "The Action resource ... could not be found." |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | several security groups match the name | zun/api/controllers/v1/containers.py:625 | 409 container.conflict |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | rename to the same name | zun/api/controllers/v1/containers.py:739 | 409 container.conflict |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | network detach: the port is not attached to this container | zun/api/controllers/v1/containers.py:1228 | 400 container.invalid |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | network detach: the network is not attached to this container | zun/api/controllers/v1/containers.py:1237 | 400 container.invalid |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | network attach: the port's network, or the network, is already on this container | zun/api/controllers/v1/containers.py:1263, zun/api/controllers/v1/containers.py:1270 | 400 container.invalid |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | capsule volume mount without mountPath or container uuid | zun/api/controllers/v1/capsules.py:474 | after removing the volumes, containers and capsule already created (zun/api/controllers/v1/capsules.py:475) |
FailedParseStringToJson (zun/common/exception.py:651) | 500 | Failed parse string to json: %(reason)s. | the capsule template string is not JSON | zun/api/controllers/v1/capsules.py:55 | never built: the constructor raises TypeError (T12). Client sees 500 container. |
InvalidCapsuleTemplate (zun/common/exception.py:647) | 500 | Invalid capsule template: %(reason)s. | kind is not capsule or Capsule | zun/api/controllers/v1/capsules.py:63 | 500 container.: a client error reported as a server error (T8) |
InvalidCapsuleTemplate (zun/common/exception.py:647) | 500 | Invalid capsule template: %(reason)s. | the template has no spec, or no containers | zun/api/controllers/v1/capsules.py:68, zun/api/controllers/v1/capsules.py:78 | 500 container. (T8) |
InvalidCapsuleTemplate (zun/common/exception.py:647) | 500 | Invalid capsule template: %(reason)s. | empty container list, or a container without image | zun/common/utils.py:372, zun/common/utils.py:378, zun/common/utils.py:391 | 500 container. (T8) |
InvalidCapsuleTemplate (zun/common/exception.py:647) | 500 | Invalid capsule template: %(reason)s. | a volume has no name; no size and no volumeID; both size and volumeID; not a Cinder volume | zun/common/utils.py:414, zun/common/utils.py:422, zun/common/utils.py:425, zun/common/utils.py:429 | 500 container. (T8) |
OverQuota (zun/common/exception.py:710) | 403 | Quota exceeded for resources: %(overs)s | creating the container exceeds containers, cpu, memory or disk quota | zun/common/quota.py:217 | 403 container.over-quota, "Quota exceeded for resources: [...]" |
InvalidQuotaValue (zun/common/exception.py:341) | 400 | Change would make usage less than 0 for the following resources: %(unders)s | a computed quota value is negative | zun/common/quota.py:194 | 400 container.invalid-quota-value |
QuotaResourceUnknown (zun/common/exception.py:736) | 404 | Unknow quota resources %(unknown)s. | quota count on a resource with no count function | zun/common/quota.py:522 | 404 container.quota-resource-unknown |
InvalidQuotaMethodUsage (zun/common/exception.py:346) | 400 | Wrong quota method %(method)s used on resource %(res)s | quota check on an unregistered resource (programming error) | zun/common/quota.py:601 | 400 container.invalid-quota-method-usage |
ZunServiceNotFound (zun/common/exception.py:416) | 404 | Zun service %(binary)s on host %(host)s could not be found. | enable, disable, force-down or delete of a service whose record does not exist | zun/api/controllers/v1/zun_services.py:80, zun/api/controllers/v1/zun_services.py:161, zun/db/sqlalchemy/api.py:419, zun/db/sqlalchemy/api.py:429 | 404 container.zun-service-not-found |
RegistryNotFound (zun/common/exception.py:383) | 404 | Registry %(registry)s could not be found. | the registry requested is unknown | zun/common/utils.py:452, zun/db/sqlalchemy/api.py:1460, zun/db/sqlalchemy/api.py:1473, zun/db/sqlalchemy/api.py:1486, zun/db/sqlalchemy/api.py:1499, zun/db/sqlalchemy/api.py:1516 | 404 container.registry-not-found |
NetworkNotFound (zun/common/exception.py:379) | 404 | Neutron network %(network)s could not be found. | network operation on a Neutron id with no Zun network record | zun/api/controllers/v1/networks.py:35 | 404 container.network-not-found |
RequestedHostNotFound (zun/common/exception.py:886) | 404 | Requested host %(host)s could not be found. | the requested host has no compute node record; the container row and its volumes are removed first | zun/compute/api.py:129 | 404 container.requested-host-not-found |
ExternalNetworkAttachForbidden (zun/common/exception.py:655) | 403 | It is not allowed to create an interface on external network %(network_uuid)s | the network is external and not shared, and network:attach_external_network is denied | zun/common/utils.py:563 | 403 container.external-network-attach-forbidden |
PolicyNotAuthorized (zun/common/exception.py:363) | 403 | Policy doesn't allow %(action)s to be performed. | the policy rule refuses the caller | zun/common/policy.py:101, zun/common/policy.py:141, zun/common/context.py:155 | 403 container.policy-not-authorized, "Policy doesn't allow container:create to be performed." |
HTTPNotAcceptable (webob.exc) | 406 | see situation | header is not two words, or the service word is not container | zun/api/controllers/versions.py:134, zun/api/controllers/versions.py:141 | 406; code container.; detail is the message only if Accept prefers JSON [inferred], else empty |
HTTPNotAcceptable (webob.exc) | 406 | see situation | version is not major.minor integers | zun/api/controllers/versions.py:149 | 406; code container.; detail is the message only if Accept prefers JSON [inferred], else empty |
HTTPNotAcceptable (webob.exc) | 406 | see situation | version in range, but this method has no implementation for it | zun/api/controllers/base.py:102 | 406; code container.; detail is the message only if Accept prefers JSON [inferred], else empty |
HTTPNotAcceptableAPIVersion (zun/api/http_error.py:19) | 406 (declared) | Mutually exclusive versions requested. Version %(ver)s requested but not supported by this service. The supported version range is: [%(min)s, %(max)s]. / Version %(ver)s was requested but the minor version is not supported by this service. The supported version range is: [%(min)s, %(max)s]. | major version is not 1, or minor outside 1.1 to 1.40 | zun/api/controllers/v1/__init__.py:181, zun/api/controllers/v1/__init__.py:193 | not a 406: AttributeError at zun/api/http_error.py:65 (T1) |
ApiVersionsIntersect (zun/common/exception.py:570) | 500 | Version of %(name)s %(min_ver)s %(max_ver)s intersects with another versions. | two versions of one method overlap (@api_version) | zun/api/controllers/base.py:190 | at import: zun-api does not start |
InvalidIdentity (zun/common/exception.py:304) | 400 | Expected an uuid or int but received %(identity)s. | an id used for an update or delete is neither integer nor UUID | zun/db/sqlalchemy/api.py:85 | 400 container.invalid-identity |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | pagination called without a query (programming error) | zun/db/sqlalchemy/api.py:91 | 500 container. (obfuscated) |
InvalidParameterValue (zun/common/exception.py:331) | 400 | %(err)s | sort_key is not a column | zun/db/sqlalchemy/api.py:99 | 400 container.invalid-parameter-value |
InvalidParameterValue (zun/common/exception.py:331) | 400 | %(err)s | an update tries to overwrite uuid (container, volume mapping, volume, image, resource provider, compute node, network, registry) | zun/db/sqlalchemy/api.py:244, zun/db/sqlalchemy/api.py:331, zun/db/sqlalchemy/api.py:395, zun/db/sqlalchemy/api.py:510, zun/db/sqlalchemy/api.py:634, zun/db/sqlalchemy/api.py:921, zun/db/sqlalchemy/api.py:1311, zun/db/sqlalchemy/api.py:1437 | 400 container.invalid-parameter-value |
ContainerAlreadyExists (zun/common/exception.py:432) | 409 | A container with %(field)s %(value)s already exists. | name already used, in the scope of [compute]/unique_container_name_scope (create or rename) | zun/db/sqlalchemy/api.py:181 | 409 container.container-already-exists |
ContainerAlreadyExists (zun/common/exception.py:432) | 409 | A container with %(field)s %(value)s already exists. | duplicate UUID on insert (DBDuplicateEntry) | zun/db/sqlalchemy/api.py:200 | 409 container.container-already-exists |
ContainerNotFound (zun/common/exception.py:367) | 404 | Container %(container)s could not be found. | no container with this uuid or name in the caller's project; also capsules | zun/db/sqlalchemy/api.py:213, zun/db/sqlalchemy/api.py:224, zun/db/sqlalchemy/api.py:238, zun/db/sqlalchemy/api.py:260 | 404 container.container-not-found; ignored on a CNI DEL (zun/cni/plugins/zun_cni_registry.py:111) |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | several containers have this name | zun/db/sqlalchemy/api.py:226 | 409 container.conflict |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | several resource providers have this name | zun/db/sqlalchemy/api.py:617 | 409 container.conflict |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | several compute nodes have this name | zun/db/sqlalchemy/api.py:904 | 409 container.conflict |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | several registries have this name | zun/db/sqlalchemy/api.py:1501 | 409 container.conflict |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | a registry still referenced by a container is deleted (DBReferenceError) | zun/db/sqlalchemy/api.py:1518 | 409 container.conflict |
VolumeMappingAlreadyExists (zun/common/exception.py:461) | 409 | A volume mapping with %(field)s %(value)s already exists. | duplicate UUID on insert | zun/db/sqlalchemy/api.py:302 | 409 container.volume-mapping-already-exists-remote, detail with traceback |
VolumeMappingNotFound (zun/common/exception.py:400) | 404 | Volume mapping %(volume_mapping)s could not be found. | unknown volume mapping uuid | zun/db/sqlalchemy/api.py:314, zun/db/sqlalchemy/api.py:343 | 404 container.volume-mapping-not-found |
VolumeMappingNotFound (zun/common/exception.py:400) | 404 | Volume mapping %(volume_mapping)s could not be found. | delete of an unknown volume mapping | zun/db/sqlalchemy/api.py:324 | the uuid is passed as the message, so the message is the bare uuid (T13) |
VolumeAlreadyExists (zun/common/exception.py:465) | 409 | A volume with %(field)s %(value)s already exists. | duplicate UUID on insert | zun/db/sqlalchemy/api.py:368 | 409 container.volume-already-exists |
VolumeNotFound (zun/common/exception.py:404) | 404 | Volume %(volume)s could not be found. | unknown Zun volume row | zun/db/sqlalchemy/api.py:380, zun/db/sqlalchemy/api.py:389, zun/db/sqlalchemy/api.py:407 | 404 container.volume-not-found |
ZunServiceAlreadyExists (zun/common/exception.py:449) | 409 | Service %(binary)s on host %(host)s already exists. | service record already present (race at registration) | zun/db/sqlalchemy/api.py:456 | internal: heartbeat registration (zun/servicegroup/zun_service_periodic.py:54) |
ImageNotFound (zun/common/exception.py:408) | 400 | Image %(image)s could not be found. | unknown image record (show, delete, by id or uuid) | zun/db/sqlalchemy/api.py:488, zun/db/sqlalchemy/api.py:521, zun/db/sqlalchemy/api.py:548, zun/db/sqlalchemy/api.py:558 | 400 container.image-not-found, not 404 (T7) |
ImageAlreadyExists (zun/common/exception.py:445) | 409 | An image with tag %(tag)s and repo %(repo)s already exists. | duplicate on insert of a pulled image | zun/db/sqlalchemy/api.py:502 | 409 container.image-already-exists |
ResourceProviderAlreadyExists (zun/common/exception.py:453) | 409 | A resource provider with %(field)s %(value)s already exists. | duplicate on insert (legacy resource provider table) | zun/db/sqlalchemy/api.py:587 | 409 container.resource-provider-already-exists |
ResourceProviderNotFound (zun/common/exception.py:799) | 404 | No such resource provider %(name_or_uuid)s. | no resource provider row (legacy table) | zun/db/sqlalchemy/api.py:604, zun/db/sqlalchemy/api.py:614, zun/db/sqlalchemy/api.py:628, zun/db/sqlalchemy/api.py:646 | 404, message left unformatted: wrong kwarg resource_provider (T10) |
ResourceClassAlreadyExists (zun/common/exception.py:457) | 409 | A resource class with %(field)s %(value)s already exists. | duplicate on insert | zun/db/sqlalchemy/api.py:668 | 409 container.resource-class-already-exists |
ResourceClassNotFound (zun/common/exception.py:420) | 404 | Resource class %(resource_class)s could not be found. | no resource class row | zun/db/sqlalchemy/api.py:685, zun/db/sqlalchemy/api.py:695, zun/db/sqlalchemy/api.py:704, zun/db/sqlalchemy/api.py:715 | 404 container.resource-class-not-found |
UniqueConstraintViolated (zun/common/exception.py:494) | 409 | A resource with %(fields)s violates unique constraint. | duplicate inventory or allocation row | zun/db/sqlalchemy/api.py:750, zun/db/sqlalchemy/api.py:814 | 409 container.unique-constraint-violated |
InventoryNotFound (zun/common/exception.py:424) | 404 | Inventory %(inventory)s could not be found. | no inventory row | zun/db/sqlalchemy/api.py:763, zun/db/sqlalchemy/api.py:772, zun/db/sqlalchemy/api.py:782 | 404 container.inventory-not-found |
AllocationNotFound (zun/common/exception.py:428) | 404 | Allocation %(allocation)s could not be found. | no allocation row | zun/db/sqlalchemy/api.py:827, zun/db/sqlalchemy/api.py:836, zun/db/sqlalchemy/api.py:846 | 404 container.allocation-not-found |
ComputeNodeAlreadyExists (zun/common/exception.py:441) | 409 | A compute node with %(field)s %(value)s already exists. | compute node record already present | zun/db/sqlalchemy/api.py:880 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
ComputeNodeNotFound (zun/common/exception.py:375) | 404 | Compute node %(compute_node)s could not be found. | host id or name has no compute node record | zun/db/sqlalchemy/api.py:891, zun/db/sqlalchemy/api.py:901, zun/db/sqlalchemy/api.py:915, zun/db/sqlalchemy/api.py:933 | 404 on /v1/hosts; converted to 400 on image pull and to RequestedHostNotFound on create (T20) |
PciDeviceNotFound (zun/common/exception.py:629) | 404 | PCI Device %(node_id)s:%(address)s not found. | no PCI row for this node and address | zun/db/sqlalchemy/api.py:946, zun/db/sqlalchemy/api.py:987 | 404 container.pci-device-not-found |
PciDeviceNotFoundById (zun/common/exception.py:625) | 404 | PCI device %(id)s not found | no PCI row for this id | zun/db/sqlalchemy/api.py:956 | 404 container.pci-device-not-found-by-id |
ContainerActionNotFound (zun/common/exception.py:701) | 500 | Action for request_id %(request_id)s on container %(container_uuid)s not fount | action finish or event start or finish, and no action row for this request id | zun/db/sqlalchemy/api.py:1020, zun/db/sqlalchemy/api.py:1076, zun/db/sqlalchemy/api.py:1107 | compute greenthread dies before or after the work; log only. Not 404 if ever reached by the API (T8) |
ContainerActionEventNotFound (zun/common/exception.py:706) | 500 | Event %(event)s not found for action id %(action_id)s | event finish with no matching event row | zun/db/sqlalchemy/api.py:1117 | same as above |
QuotaAlreadyExists (zun/common/exception.py:727) | 500 | Quota already exists for project %(project_id)s, resource %(resource)s. | project and resource already have a row | zun/db/sqlalchemy/api.py:1146 | caught: PUT /v1/quotas updates instead (zun/api/controllers/v1/quotas.py:57) |
ProjectQuotaNotFound (zun/common/exception.py:723) | 404 | Quota for project %(project_id)s could not be found. | no quota row for the project | zun/db/sqlalchemy/api.py:1157, zun/db/sqlalchemy/api.py:1180 | default quota used on read (zun/common/quota.py:366) |
QuotaClassNotFound (zun/common/exception.py:732) | 404 | Quota class %(class_name)s could not be found. | no quota class row | zun/db/sqlalchemy/api.py:1220, zun/db/sqlalchemy/api.py:1256 | default used on read (zun/common/quota.py:373); on PUT the row is created (zun/api/controllers/v1/quota_classes.py:47) |
NetworkAlreadyExists (zun/common/exception.py:387) | 409 | A network with %(field)s %(value)s already exists. | duplicate neutron_net_id or uuid in a race on network creation | zun/db/sqlalchemy/api.py:1300, zun/db/sqlalchemy/api.py:1303 | caught when the field is neutron_net_id (zun/network/kuryr_network.py:136). Over RPC cannot be rebuilt: 500 (T4) |
NetworkNotFound (zun/common/exception.py:379) | 404 | Neutron network %(network)s could not be found. | no Zun network row | zun/db/sqlalchemy/api.py:1322, zun/db/sqlalchemy/api.py:1335, zun/db/sqlalchemy/api.py:1344 | 404 container.network-not-found |
ExecInstanceAlreadyExists (zun/common/exception.py:436) | 409 | An exec instance with exec_id %(exec_id)s already exists in container. | same exec_id recorded twice in a container | zun/db/sqlalchemy/api.py:1368 | 409 container.exec-instance-already-exists-remote, detail with traceback |
RegistryAlreadyExists (zun/common/exception.py:469) | 409 | A registry with %(field)s %(value)s already exists. | duplicate UUID on insert | zun/db/sqlalchemy/api.py:1422 | 409 container.registry-already-exists |
InvalidEncryptionKey (zun/common/exception.py:744) | 500 | Can not decrypt data with the auth_encryption_key in zun config. | a stored registry password cannot be decrypted with auth_encryption_key | zun/common/crypt.py:46 | 500 container. (obfuscated) |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | no network given and neither a project nor a shared network exists | zun/network/neutron.py:280 | 409 container.conflict |
NetworkNotFound (zun/common/exception.py:379) | 404 | Neutron network %(network)s could not be found. | requested network not found in Neutron | zun/network/neutron.py:292 | API: 404. Rebuild (async): container Error, zun/compute/manager.py:693 |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | several Neutron networks have this name | zun/network/neutron.py:294 | 409 container.conflict |
PortNotFound (zun/common/exception.py:396) | 404 | Neutron port %(port)s could not be found. | requested port not found in Neutron | zun/network/neutron.py:308 | API: 404. Rebuild (async): container Error |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | several Neutron ports have this name | zun/network/neutron.py:310 | 409 container.conflict |
PortNotUsable (zun/common/exception.py:473) | 400 | Port %(port)s not usable for the container. | the port belongs to another project | zun/network/neutron.py:323 | 400 container.port-not-usable |
PortInUse (zun/common/exception.py:477) | 400 | Port %(port)s is still in use. | the port already has a device_id | zun/network/neutron.py:328 | 400 container.port-in-use |
PortNotUsable (zun/common/exception.py:473) | 400 | Port %(port)s not usable for the container. | port status is ACTIVE, BUILD or ERROR | zun/network/neutron.py:333 | 400 container.port-not-usable |
PortBindingFailed (zun/common/exception.py:489) | 400 | Binding failed for port %(port)s, please check neutron logs for more information. | port binding:vif_type is binding_failed | zun/network/neutron.py:338 | 400 container.port-binding-failed |
PciDeviceNotFound (zun/common/exception.py:629) | 404 | PCI Device %(node_id)s:%(address)s not found. | no whitelist spec matches the claimed device when binding the port | zun/network/neutron.py:233 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | a rule of the exposed-ports security group cannot be created | zun/network/neutron.py:360 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | one of the requested security groups cannot be found by name or id | zun/common/utils.py:329 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
VolumeNotFound (zun/common/exception.py:404) | 404 | Volume %(volume)s could not be found. | the Cinder volume in mounts or the capsule template does not exist | zun/volume/cinder_api.py:46, zun/volume/cinder_api.py:51 | API: 404. Caught when polling for deletion (zun/volume/driver.py:226) |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | several Cinder volumes have this name | zun/volume/cinder_api.py:53 | 409 container.conflict |
VolumeNotUsable (zun/common/exception.py:481) | 400 | Volume %(volume)s not usable for the container. | the volume belongs to another project | zun/volume/cinder_api.py:64 | 400 container.volume-not-usable |
VolumeInUse (zun/common/exception.py:485) | 400 | Volume %(volume)s is still in use. | the volume has attachments and is not multiattach | zun/volume/cinder_api.py:67 | 400 container.volume-in-use |
VolumeCreateFailed (zun/common/exception.py:685) | 400 | Volume Creation failed: %(creation_failed)s | Cinder refuses the create (any ClientException) | zun/volume/cinder_api.py:145 | 400 container.volume-create-failed, even for a Cinder 5xx (T8) |
VolumeDeleteFailed (zun/common/exception.py:689) | 400 | Volume Deletion failed: %(deletion_failed)s | Cinder refuses the delete | zun/volume/cinder_api.py:155 | never surfaces: except cinder_exception turns it into TypeError (T14) |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | Cinder refuses begin_detaching (400) | zun/volume/cinder_workflow.py:155 | never: on delete, zun/compute/manager.py:508 logs and re-raises unless force |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | volume delete failure handler | zun/volume/cinder_workflow.py:187 | unreachable (T14) |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | volumes not available before timeout_wait_volume_available, or one is in error | zun/compute/manager.py:224 | never: 202 already returned. Container Error, status_reason = the message, host unset (zun/compute/manager.py:443) |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | volumes not deleted before timeout_wait_volume_deleted | zun/compute/manager.py:250 | never: container Error, status_reason = the message, host unset |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | requested disk below the storage driver's base device size | zun/compute/manager.py:276 | never: 202 already returned. Container Error, status_reason = the message, host unset (zun/compute/manager.py:443) |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | disk requested but the host has no disk quota support | zun/compute/manager.py:283 | never: 202 already returned. Container Error, status_reason = the message, host unset (zun/compute/manager.py:443) |
ResourcesUnavailable (zun/common/exception.py:591) | 500 | Insufficient compute resources: %(reason)s. | the claim fails on create (memory, disk, CPU, PCI, cpuset) | zun/compute/claims.py:153 | create: never; container Error, host unset, allocation removed (zun/compute/manager.py:404). Update (call): 500 container., status unchanged |
NoValidHost (zun/common/exception.py:529) | 500 | No valid host was found. %(reason)s | update of a dedicated-CPU container and no NUMA node fits | zun/compute/manager.py:1195 | 500 container. on PATCH, not the 202 of create (T5) |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | an object that is neither Container nor Capsule reaches the manager | zun/compute/manager.py:66 | programming error; 500 or log |
DockerError (zun/common/exception.py:503) | 500 | Docker internal error: %(error_msg)s. | any docker.errors.APIError inside docker_client() | zun/container/docker/utils.py:48 | call: 500 container.. Create or start: container Error, status_reason = message. Other casts: log and action event |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | Docker says 404 for the container: status becomes Error (or Deleted if auto_remove) | zun/container/docker/driver.py:83 | call: 409 container.conflict-remote, "Cannot act on container in 'Error' state". Cast: log, event, status Error |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | Docker message contains not running, not paused or paused | zun/container/docker/driver.py:98 | call: 409 container.conflict-remote; cast: log and event |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | exec with run=true passes [docker]/execute_timeout | zun/container/docker/driver.py:874 | 409 container.conflict-remote |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | the exec instance disappeared (Docker 404, or "process not found for container") | zun/container/docker/driver.py:887, zun/container/docker/utils.py:100 | 400 container.invalid-remote, "no such exec instance: ..." |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | archive copy: path not found in the container (Docker 404) | zun/container/docker/driver.py:966, zun/container/docker/driver.py:977 | 400 container.invalid-remote |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | operation on a container without container_id (decorator check_container_id) | zun/common/utils.py:246 | 400 container.invalid-remote on a call; log and event on a cast |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | driver wrapper: unexpected error on committed image delete, pull, search, create or upload | zun/container/docker/driver.py:170, zun/container/docker/driver.py:192, zun/container/docker/driver.py:209, zun/container/docker/driver.py:217, zun/container/docker/driver.py:235 | 500 on search and commit; pull: container Error; upload: event Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | a runtime was requested and the Docker API version does not allow it | zun/container/docker/driver.py:284 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | attach to a network already connected (compute side re-check) | zun/container/docker/driver.py:1169 | never: raised in a compute greenthread; if under @wrap_exception it is only logged (zun/common/utils.py:662), and the action event gets Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | network attach returned no addresses | zun/container/docker/driver.py:1179 | never: raised in a compute greenthread; if under @wrap_exception it is only logged (zun/common/utils.py:662), and the action event gets Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | a capsule init container ends in an unexpected status | zun/container/docker/driver.py:1312, zun/container/cri/driver.py:223 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | CRI: the container is not found in the runtime | zun/container/cri/driver.py:243 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | the volume provider is not supported | zun/container/driver.py:134, zun/volume/driver.py:58 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | the volume driver entry point has the wrong type | zun/volume/driver.py:45 | the process does not start; no client involved |
ImageNotFound (zun/common/exception.py:408) | 400 | Image %(image)s could not be found. | Docker says the image does not exist on pull | zun/image/docker/driver.py:83 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error; on POST /v1/images, log only (T23) |
ImageNotFound (zun/common/exception.py:408) | 400 | Image %(image)s could not be found. | pull policy Never and image absent locally | zun/image/docker/driver.py:100, zun/image/glance/driver.py:86 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ImageNotFound (zun/common/exception.py:408) | 400 | Image %(image)s could not be found. | Glance has no image with this name | zun/image/glance/utils.py:41 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error; zun/image/glance/driver.py:45 turns it into "not local" |
ImageNotFound (zun/common/exception.py:408) | 400 | Image %(image)s could not be found. | image validation finds no image on create | zun/compute/api.py:79 | nothing: swallowed by except Exception at zun/compute/api.py:93 (T6) |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | image validation finds several images | zun/compute/api.py:81 | nothing: swallowed the same way (T6) |
Conflict (zun/common/exception.py:316) | 409 | Conflict. | Glance has several images with this name | zun/image/glance/utils.py:46 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error; image search (call): 409 container.conflict-remote |
OperationNotSupported (zun/common/exception.py:412) | 500 | The operation is not supported. | image search on a registry other than Docker Hub | zun/image/docker/driver.py:125 | search: 500 container.. Create validation: caught, validation skipped (zun/compute/api.py:84) |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Docker image delete fails | zun/image/docker/driver.py:46, zun/image/docker/driver.py:52 | never: image_delete is a cast; log |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Docker pull fails with an API error, or unexpected error | zun/image/docker/driver.py:88, zun/image/docker/driver.py:117 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | image search fails on Docker | zun/image/docker/driver.py:132, zun/image/docker/driver.py:135 | 500 container. |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Glance download or write to images_directory fails | zun/image/glance/driver.py:99, zun/image/glance/driver.py:109 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Glance search fails | zun/image/glance/driver.py:121 | 500 container. |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Glance image create fails on commit | zun/image/glance/driver.py:130 | 500 container. |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Glance update or upload fails on commit | zun/image/glance/driver.py:143, zun/image/glance/driver.py:159 | never: event compute__do_container_commit Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Glance committed-image delete or tar unlink fails | zun/image/glance/driver.py:171, zun/image/glance/driver.py:184 | never: log (zun/container/docker/driver.py:159) |
NameEmpty (zun/common/exception.py:757) | 500 | repository name must have at least one component | image name empty, or reference resolves to nothing | zun/common/docker_image/reference.py:71, zun/common/docker_image/reference.py:86 | pull (POST /v1/images): 500 container. (T8). Create: Error |
ReferenceInvalidFormat (zun/common/exception.py:753) | 500 | invalid reference format | image name does not match the reference grammar | zun/common/docker_image/reference.py:73 | pull: 500 (T8). Create with validation: 400 invalid-value. Create without: Error |
NameTooLong (zun/common/exception.py:761) | 500 | repository name must not be more than %(length_max)s characters | repository name exceeds 255 characters | zun/common/docker_image/reference.py:77 | schema stops it first (maxLength, zun/api/controllers/v1/schemas/parameter_types.py:276) [inferred] |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | the Neutron network has no subnet | zun/network/kuryr_network.py:72 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Docker network creation fails after all attempts | zun/network/kuryr_network.py:126 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error (message has a dict: T13) |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | several Neutron subnets for one IP version | zun/network/kuryr_network.py:192 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
SecurityGroupCannotBeApplied (zun/common/exception.py:693) | 400 | Security groups cannot apply to the container. | Neutron answers 400 when adding the security group to the port | zun/network/kuryr_network.py:345 | never: raised in a compute greenthread; if under @wrap_exception it is only logged (zun/common/utils.py:662), and the action event gets Error |
SecurityGroupCannotBeRemoved (zun/common/exception.py:697) | 400 | Security groups cannot be removed from the container. | Neutron answers 400 when removing it | zun/network/kuryr_network.py:378 | never: raised in a compute greenthread; if under @wrap_exception it is only logged (zun/common/utils.py:662), and the action event gets Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | the network-ready marker command fails inside the capsule (CNI driver) | zun/network/cni_network.py:180 | never: POST already returned 202. Container Error, status_reason = the message; event compute__do_container_create Error |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | no valid subnet for the port when building the VIF | zun/network/os_vif_util.py:132 | CNI daemon: HTTP 500, then CNI code 100 |
NoValidHost (zun/common/exception.py:529) | 500 | No valid host was found. %(reason)s | Placement gives no candidate, or cannot be reached | zun/scheduler/client/query.py:78 | 202, then Error, "There are not enough hosts available." (zun/compute/api.py:57) |
NoValidHost (zun/common/exception.py:529) | 500 | No valid host was found. %(reason)s | no host passes the filters | zun/scheduler/filter_scheduler.py:78 | same 202 then Error |
NoValidHost (zun/common/exception.py:529) | 500 | No valid host was found. %(reason)s | no host can be claimed | zun/scheduler/filter_scheduler.py:114 | same 202 then Error |
NoValidHost (zun/common/exception.py:529) | 500 | No valid host was found. %(reason)s | no destination selected | zun/scheduler/filter_scheduler.py:165, zun/scheduler/chance_scheduler.py:46 | same 202 then Error |
NoValidHost (zun/common/exception.py:529) | 500 | No valid host was found. %(reason)s | chance scheduler: no host is up | zun/scheduler/chance_scheduler.py:32 | same 202 then Error |
NoValidHost (zun/common/exception.py:529) | 500 | No valid host was found. %(reason)s | requested_host not in ComputeNode when building the request | zun/scheduler/utils.py:352 | same 202 then Error |
SchedulerHostFilterNotFound (zun/common/exception.py:562) | 404 | Scheduler Host Filter %(filter_name)s could not be found. | a name in the enabled filters list does not exist | zun/scheduler/filter_scheduler.py:192 | at scheduler load: zun-api request fails; 500 |
ClassNotFound (zun/common/exception.py:566) | 404 | Class %(class_name)s could not be found: %(exception)s | a filter class is not of the right type | zun/scheduler/loadables.py:119 | same |
ResourceProviderAggregateRetrievalFailed (zun/common/exception.py:776) | 500 | Failed to get aggregates for resource provider with UUID %(uuid)s | Placement error reading aggregates | zun/scheduler/client/report.py:334 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
ResourceProviderTraitRetrievalFailed (zun/common/exception.py:781) | 500 | Failed to get traits for resource provider with UUID %(uuid)s | Placement error reading traits | zun/scheduler/client/report.py:366 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
ResourceProviderNotFound (zun/common/exception.py:799) | 404 | No such resource provider %(name_or_uuid)s. | name or uuid unknown to Placement | zun/scheduler/client/report.py:385, zun/scheduler/client/report.py:2135 | compute: retried with other host names (zun/compute/compute_node_tracker.py:114) |
ResourceProviderRetrievalFailed (zun/common/exception.py:772) | 500 | Failed to get resource provider with UUID %(uuid)s | Placement error reading a provider or tree | zun/scheduler/client/report.py:419, zun/scheduler/client/report.py:453, zun/scheduler/client/report.py:486 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
ResourceProviderCreationFailed (zun/common/exception.py:786) | 500 | Failed to create resource provider %(name)s | Placement error or unreachable when creating the provider | zun/scheduler/client/report.py:556, zun/scheduler/client/report.py:641 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
ResourceProviderInUse (zun/common/exception.py:768) | 500 | Resource provider has allocations. | Placement 409 on provider delete | zun/scheduler/client/report.py:690 | swallowed (zun/scheduler/client/report.py:2089) |
ResourceProviderDeletionFailed (zun/common/exception.py:790) | 500 | Failed to delete resource provider %(uuid)s | other error on provider delete | zun/scheduler/client/report.py:691 | swallowed, same place |
InventoryInUse (zun/common/exception.py:843) | 400 | Inventory for '%(resource_class)s' on resource provider '%(resource_provider)s' invalid. | removing an inventory with allocations | zun/scheduler/client/report.py:928 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only; converted to ResourceProviderSyncFailed |
ResourceProviderUpdateConflict (zun/common/exception.py:820) | 500 | A conflict was encountered attempting to update resource provider %(uuid)s (generation %(generation)d): %(error)s | generation conflict (inventory, traits, aggregates) | zun/scheduler/client/report.py:930, zun/scheduler/client/report.py:1044, zun/scheduler/client/report.py:1137 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only; cache cleared |
ResourceProviderUpdateFailed (zun/common/exception.py:794) | 500 | Failed to update resource provider via URL %(url)s: %(error)s | other Placement error on update | zun/scheduler/client/report.py:934, zun/scheduler/client/report.py:1048, zun/scheduler/client/report.py:1142 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
TraitCreationFailed (zun/common/exception.py:867) | 500 | Failed to create trait %(name)s: %(error)s | PUT /traits fails | zun/scheduler/client/report.py:969 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
TraitRetrievalFailed (zun/common/exception.py:862) | 500 | Failed to get traits for resource provider with UUID %(uuid)s | GET /traits fails | zun/scheduler/client/report.py:982 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only; message unformatted (T10) |
InvalidResourceClass (zun/common/exception.py:828) | 400 | Resource class '%(resource_class)s' invalid. | a custom resource class cannot be ensured | zun/scheduler/client/report.py:1175 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
ReshapeFailed (undefined) | - | (error=) | reshape refused or failed | zun/scheduler/client/report.py:1207, zun/scheduler/client/report.py:1245 | class undefined: AttributeError (T9) |
ResourceProviderSyncFailed (zun/common/exception.py:803) | 500 | Failed to synchronize the placement service with resource provider information supplied by the compute host. | a helper of update_from_provider_tree failed | zun/scheduler/client/report.py:1321 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
ConsumerAllocationRetrievalFailed (zun/common/exception.py:857) | 500 | Failed to retrieve allocations for consumer %(consumer_uuid)s: %(error)s | Placement error reading a consumer's allocations | zun/scheduler/client/report.py:1433 | scheduler or compute; on the create path: Error "Unexpected exception occurred." and 500 [inferred] |
AllocationUpdateFailed (zun/common/exception.py:852) | 500 | Failed to update allocations for consumer %(consumer_uuid)s. Error: %(error)s | consumer generation conflict during a claim or put_allocations | zun/scheduler/client/report.py:1566, zun/scheduler/client/report.py:1885 | claim on the create path: Error "Unexpected exception occurred." and 500 [inferred] |
AllocationUpdateFailed (zun/common/exception.py:852) | 500 | Failed to update allocations for consumer %(consumer_uuid)s. Error: %(error)s | not enough allocated to remove | zun/scheduler/client/report.py:1613, zun/scheduler/client/report.py:1634, zun/scheduler/client/report.py:1652, zun/scheduler/client/report.py:1671 | no caller of remove_resources_from_container_allocation in this branch |
Retry (zun/scheduler/client/report.py:67) | - | (operation, reason) | resource provider generation conflict: retried up to the @retries limit | zun/scheduler/client/report.py:1576, zun/scheduler/client/report.py:1699, zun/scheduler/client/report.py:1851, zun/scheduler/client/report.py:1894 | internal; after the retries the function returns False (zun/scheduler/client/report.py:92) |
AllocationMoveFailed (zun/common/exception.py:871) | 500 | Failed to move allocations from consumer %(source_consumer)s to consumer %(target_consumer)s. Error: %(error)s | consumer generation conflict on a move | zun/scheduler/client/report.py:1843 | no caller of move_allocations in this branch |
AllocationDeleteFailed (undefined) | - | (consumer_uuid=, error=) | consumer allocation read or delete fails | zun/scheduler/client/report.py:1934, zun/scheduler/client/report.py:1960 | class undefined: AttributeError in _do_container_delete; the row stays Deleting (T9) |
ResourceProviderAllocationRetrievalFailed (zun/common/exception.py:877) | 500 | Failed to retrieve allocations for resource provider %(rp_uuid)s: %(error)s | Placement error reading a provider's allocations | zun/scheduler/client/report.py:1977 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
PlacementAPIConnectFailure (zun/common/exception.py:808) | 500 | Unable to communicate with the Placement API. | keystoneauth failure on get_provider_by_name | zun/scheduler/client/report.py:2114 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
UsagesRetrievalFailed (zun/common/exception.py:847) | 500 | Failed to retrieve usages for project '%(project_id)s' and user '%(user_id)s'. | Placement error reading usages | zun/scheduler/client/report.py:2238 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
ComputeHostNotFound (zun/common/exception.py:882) | 404 | Compute host %(host)s could not be found. | host shared with Nova and no provider under any likely name | zun/compute/compute_node_tracker.py:129 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
PciDevicePoolEmpty (zun/common/exception.py:633) | 500 | Attempt to consume PCI device %(compute_node_uuid)s:%(address)s from empty pool | removing a device from a pool that does not exist | zun/pci/stats.py:134 | never: raised in the inventory_host periodic task (zun/compute/manager.py:1179); log only |
PciDeviceRequestFailed (undefined) | - | (requests=) | requested PCI devices cannot be taken from the pools | zun/pci/stats.py:283 | class undefined: AttributeError (T9) |
PciDeviceWrongAddressFormat (zun/common/exception.py:615) | 500 | The PCI address %(address)s has an incorrect format. | address in the whitelist or in a system lookup is malformed | zun/pci/utils.py:71, zun/pci/devspec.py:86, zun/pci/devspec.py:118, zun/pci/devspec.py:158, zun/pci/devspec.py:208 | at Whitelist construction: compute tracker setup, and every NeutronAPI (zun/network/neutron.py:44), so 500 container. on the API [inferred] |
PciConfigInvalidWhitelist (zun/common/exception.py:611) | 500 | Invalid PCI devices Whitelist config %(reason)s | [pci]/passthrough_whitelist entry is not JSON, not a list or dict, or out of range | zun/pci/whitelist.py:41, zun/pci/whitelist.py:46, zun/pci/whitelist.py:52, zun/pci/devspec.py:38, zun/pci/devspec.py:41 | at Whitelist construction: compute tracker setup, and every NeutronAPI (zun/network/neutron.py:44), so 500 container. on the API [inferred] |
PciDeviceInvalidDeviceName (zun/common/exception.py:619) | 500 | Invalid PCI Whitelist: The PCI whitelist can specify devname or address, but not both | whitelist entry has both devname and address | zun/pci/devspec.py:257 | at Whitelist construction: compute tracker setup, and every NeutronAPI (zun/network/neutron.py:44), so 500 container. on the API [inferred] |
PciDeviceNotFoundById (zun/common/exception.py:625) | 404 | PCI device %(id)s not found | no sysfs entry for this PCI address | zun/pci/utils.py:140, zun/pci/utils.py:161, zun/pci/utils.py:182 | on MAC lookup: zun/network/neutron.py:261 logs and goes on |
PciDeviceInvalidStatus (zun/common/exception.py:660) | 400 | PCI device %(compute_node_id)s:%(address)s is %(status)s instead of %(hopestatus)s | claim, allocate, remove or free of a device in the wrong status | zun/objects/pci_device.py:218, zun/objects/pci_device.py:274, zun/objects/pci_device.py:318, zun/objects/pci_device.py:331 | compute claim; message unformatted (T10); on remove, caught at zun/pci/manager.py:166 |
PciDeviceVFInvalidStatus (zun/common/exception.py:666) | 400 | Not all Virtual Functions of PF %(compute_node_id)s:%(address)s are free. | claim or allocate of a PF whose VFs are not free | zun/objects/pci_device.py:228, zun/objects/pci_device.py:288 | compute claim; message unformatted (T10) |
PciDevicePFInvalidStatus (zun/common/exception.py:672) | 400 | Physical Function %(compute_node_id)s:%(address)s, related to VF %(compute_node_id)s:%(vf_address)s is %(status)s instead of %(hopestatus)s | claim or allocate of a VF whose PF is in the wrong status | zun/objects/pci_device.py:248, zun/objects/pci_device.py:298 | compute claim; message unformatted (T10) |
PciDeviceInvalidOwner (zun/common/exception.py:679) | 400 | PCI device %(compute_node_id)s:%(address)s is owned by %(owner)s instead of %(hopeowner)s | allocate or free by a container other than the owner | zun/objects/pci_device.py:280, zun/objects/pci_device.py:336 | compute claim; message unformatted (T10) |
CPUPinningUnknown (zun/common/exception.py:537) | 500 | CPU set to pin %(requested)s must be a subset of known CPU set %(cpuset)s | CPUs to pin are outside the node's cpuset | zun/objects/numa.py:45 | claim bookkeeping on the compute (zun/compute/compute_node_tracker.py:311); no direct path to a client [inferred] |
CPUPinningInvalid (zun/common/exception.py:547) | 400 | CPU set to pin %(requested)s must be a subset of free CPU set %(free)s | CPUs to pin are not free | zun/objects/numa.py:48 | same |
CPUUnpinningUnknown (zun/common/exception.py:542) | 400 | CPU set to unpin %(requested)s must be a subset of known CPU set %(cpuset)s | CPUs to unpin are outside the node's cpuset | zun/objects/numa.py:55 | same (zun/compute/compute_node_tracker.py:314) |
CPUUnpinningInvalid (zun/common/exception.py:552) | 400 | CPU set to unpin %(requested)s must be a subset of pinned CPU set %(pinned)s | CPUs to unpin are not pinned | zun/objects/numa.py:58 | same |
ObjectActionError (zun/common/exception.py:236) | 500 | Object action %(action)s failed because: %(reason)s | lazy-load of an attribute not allowed; create, save or destroy of a volume mapping or volume in the wrong state | zun/objects/container.py:324, zun/objects/volume_mapping.py:157, zun/objects/volume_mapping.py:161, zun/objects/volume_mapping.py:164, zun/objects/volume_mapping.py:196, zun/objects/volume_mapping.py:224, zun/objects/volume_mapping.py:227, zun/objects/volume_mapping.py:271, zun/objects/volume.py:83, zun/objects/volume.py:106 | programming error; 500 on the API, log on compute |
OrphanedObjectError (zun/common/exception.py:262) | 500 | Cannot call %(method)s on orphaned %(objtype)s object | lazy-load on an object without context | zun/objects/container.py:329, zun/objects/volume_mapping.py:275 | same |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | a DB row has an unknown container type | zun/objects/container.py:186 | never built: two positional args give TypeError (T11) |
ContainerHostNotUp (zun/common/exception.py:371) | 500 | Container %(container)s host %(host)s is not up. | the host of the container is down, on the calls and on delete | zun/compute/rpcapi.py:34 | 500 container.; swallowed on GET /v1/containers/{id} (zun/api/controllers/v1/containers.py:236, T20) |
CommandError (zun/common/exception.py:525) | 500 | The command: %(cmd)s failed on the system, due to %(error)s | a local command fails (processutils.ProcessExecutionError, includes lspci) | zun/common/utils.py:339, zun/container/os_capability/host_capability.py:93 | compute side; caught for some commands (zun/common/mount.py:46, zun/container/docker/host.py:84) |
MakeFileSystemException (zun/common/exception.py:595) | 500 | Unexpected error while make file system | mkfs fails when attaching a Cinder volume | zun/common/mount.py:47 | never: 202 already returned. Container Error, status_reason = the message, host unset (zun/compute/manager.py:443) |
MountException (zun/common/exception.py:599) | 500 | Unexpected error while mount device | mount fails | zun/common/mount.py:59 | first failure: mkfs is tried (zun/common/mount.py:153); then as above |
UnmountException (zun/common/exception.py:603) | 500 | Unexpected error while do umount | umount fails | zun/common/mount.py:70 | on detach; log, or Error |
FileNotFound (zun/common/exception.py:607) | 500 | The expected file not exist | /proc/mounts cannot be read | zun/common/mount.py:96 | never: 202 already returned. Container Error, status_reason = the message, host unset (zun/compute/manager.py:443) |
Invalid (zun/common/exception.py:266) | 400 | Unacceptable parameters. | floating_cpu_set parses to nothing, or has a bad range | zun/common/utils.py:278, zun/common/utils.py:301, zun/common/utils.py:305, zun/common/utils.py:310 | compute host capability, in the periodic resource update [inferred] |
Base64Exception (zun/common/exception.py:740) | 400 | Invalid Base 64 file data | data of put_archive, or a volume mapping's contents, is not base64 | zun/common/utils.py:702 | archive: 400 container.base-64-exception-remote. File injection: container Error |
AuthorizationFailure (zun/common/exception.py:250) | 500 | %(client)s connection failed. %(message)s | keystone context with no password, trust or token | zun/common/keystone.py:87 | 500 container. |
AuthorizationFailure (zun/common/exception.py:250) | 500 | %(client)s connection failed. %(message)s | keystoneclient error inside a client factory (wrap_keystone_exception) | zun/common/exception.py:172, zun/common/exception.py:175 | 500 container. |
ConfigInvalid (zun/common/exception.py:359) | 500 | Invalid configuration file. %(error_msg)s | public API routes do not compile, or api_workers below 1 | zun/api/middleware/auth_token.py:45, zun/common/service.py:61 | the process does not start; no client involved |
InvalidWebsocketToken (zun/common/exception.py:587) | 500 | Websocket token is invalid | token differs from the container's, or no exec instance has this token and id | zun/websocket/websocketproxy.py:211, zun/websocket/websocketproxy.py:245 | WebSocket closed, no HTTP status; log in zun-wsproxy [inferred] |
InvalidWebsocketUrl (zun/common/exception.py:583) | 500 | Websocket Url invalid | the container has no websocket_url | zun/websocket/websocketproxy.py:227 | WebSocket closed, no HTTP status; log in zun-wsproxy [inferred] |
ValidationError (zun/common/exception.py:275) | 400 | %(detail)s | Origin header empty, foreign, or wrong protocol | zun/websocket/websocketproxy.py:295, zun/websocket/websocketproxy.py:298, zun/websocket/websocketproxy.py:301 | WebSocket closed, no HTTP status; log in zun-wsproxy [inferred] |
ValidationError (zun/common/exception.py:275) | 400 | %(detail)s | no access URL to compare the protocol with | zun/websocket/websocketproxy.py:48 | WebSocket closed, no HTTP status; log in zun-wsproxy [inferred] |
SocketException (zun/common/exception.py:579) | 500 | Socket exceptions | socket error while proxying, or select reports an exceptional condition | zun/websocket/websocketproxy.py:82, zun/websocket/websocketproxy.py:170 | connection closed |
ZunException (zun/common/exception.py:182) | 500 | An unknown exception occurred. | Python below 2.7.4 | zun/websocket/websocketproxy.py:188 | unreachable |
ConnectionFailed (zun/common/exception.py:575) | 500 | Failed to connect to remote host | cannot open the WebSocket to the Docker daemon | zun/websocket/websocketclient.py:50, zun/websocket/websocketclient.py:52, zun/websocket/websocketclient.py:54 | never built: TypeError (T12); connection closed |
ResourceNotReady (zun/common/exception.py:894) | 500 | Resource not ready: %(resource)s | VIFs not active after vif_active_timeout | zun/cni/plugins/zun_cni_registry.py:89 | daemon: 504 on add; ignored, 204 on del. See T21 |
CNIError (zun/common/exception.py:890) | 500 | An unknown exception occurred. | capsule or container type is unknown | zun/cni/plugins/zun_cni_registry.py:149 | daemon: 500 |
CNIError (zun/common/exception.py:890) | 500 | An unknown exception occurred. | unknown CNI_COMMAND | zun/cni/api.py:82 | never built: TypeError (T11); CNI code 100 with that text |
CNIError (zun/common/exception.py:890) | 500 | An unknown exception occurred. | the daemon answers an unexpected status | zun/cni/api.py:168 | CNI code 100, "An unknown exception occurred." |
InvalidDigest (zun/common/docker_image/digest.py:19) | 500 | invalid digest | digest in an image reference is malformed | zun/common/docker_image/digest.py:47, zun/common/docker_image/digest.py:52 | not a ZunException: 500 on pull; Error on create (T8) |
DigestUnsupported (zun/common/docker_image/digest.py:25) | 500 | unsupported digest algorithm | digest algorithm other than sha256, sha384, sha512 | zun/common/docker_image/digest.py:56 | same |
DigestInvalidLength (zun/common/docker_image/digest.py:31) | 500 | invalid checksum digest length | digest has the wrong length | zun/common/docker_image/digest.py:59 | same |
Other raises, outside the Zun hierarchy:
| Exception | Situation | Raised at | Seen by the client as |
|---|---|---|---|
Exception | a driver entry point has the wrong type | zun/image/driver.py:51, zun/container/driver.py:77, zun/container/driver.py:93 | at load: the service does not start |
Exception | the WSGI status line cannot be parsed | zun/api/middleware/parsable_error.py:42 | should not occur |
ValueError | no such provider in the local tree, or duplicate | zun/compute/provider_tree.py:310, zun/compute/provider_tree.py:332, zun/compute/provider_tree.py:394, zun/compute/provider_tree.py:405, zun/compute/provider_tree.py:451 | internal to the periodic task; some caught (zun/scheduler/client/report.py:382) |
ValueError | report client called wrongly | zun/scheduler/client/report.py:1078, zun/scheduler/client/report.py:2168 | programming error |
ValueError | negative resource amount in extra_spec; caught at once | zun/scheduler/utils.py:94 | none: warning |
ValueError | invalid YAML document | zun/common/yamlutils.py:24, zun/common/yamlutils.py:26, zun/common/yamlutils.py:28 | 500 container. if the caller is an API method [inferred] |
ValueError | UUID version not 4; null version compared | zun/common/short_id.py:49, zun/api/controllers/versions.py:158 | 500 container. |
TypeError | decorator misuse; DB JSON column type mismatch; not a ZunService | zun/common/utils.py:742, zun/db/sqlalchemy/models.py:63, zun/api/servicegroup.py:28 | 500 container. or import failure |
RuntimeError | send returned 0 on the proxied socket | zun/websocket/websocketproxy.py:70 | WebSocket closed |
self.CClose (websockify) | client or target closed the connection | zun/websocket/websocketproxy.py:104, zun/websocket/websocketproxy.py:122 | normal end of session |
AttributeError | option listing helper | zun/conf/opts.py:69 | tooling only |
oslo_config.cfg.RequiredOptError | port has no OVS bridge and [neutron]/ovs_bridge is unset | zun/network/os_vif_util.py:192 | CNI daemon 500, CNI code 100 |
cfg.ConfigFilesNotFoundError | paste configuration file not found | zun/api/app.py:61 | zun-api does not start |
db_exc.DBMigrationError | DB schema already under version control | zun/db/sqlalchemy/migration.py:103 | zun-db-manage only |
NotImplementedError | abstract driver methods (71 sites by AST): zun/network/network.py, zun/image/driver.py, zun/container/driver.py, zun/volume/driver.py, zun/cni/api.py, zun/cni/binding/base.py, zun/scheduler/driver.py, zun/scheduler/filters/__init__.py, zun/container/os_capability/host_capability.py | see first line of each: zun/container/os_capability/host_capability.py:34, zun/scheduler/driver.py:52, zun/scheduler/filters/__init__.py:30 | 500 container. on a driver not implementing the method, for example CRI capsules [inferred] |
zun/criapi/api_pb2_grpc.py holds generated stubs raising NotImplementedError, not counted. Bare re-raises (raise, raise e) are not rows. They appear in the logs and async sections.
Classes defined but never raised
Parent classes, used only by inheritance (or by an except), are not dead code. They would never appear in a response under their own name:
| Class | Definition | Children or use |
|---|---|---|
ObjectNotFound | zun/common/exception.py:228 | parent of ResourceNotFound |
ObjectNotUnique | zun/common/exception.py:232 | parent of ResourceExists |
ResourceExists | zun/common/exception.py:245 | 409 for all *AlreadyExists except QuotaAlreadyExists |
HTTPNotFound | zun/common/exception.py:312 | 404 for ContainerNotFound, ZunServiceNotFound and others |
NotAuthorized | zun/common/exception.py:354 | caught at zun/common/context.py:153 |
NotFound | zun/common/exception.py:557 | parent of PciDeviceNotFound*, ResourceProviderNotFound, quota classes; caught at zun/compute/compute_node_tracker.py:430 (T17) |
QuotaNotFound | zun/common/exception.py:715 | parent of ProjectQuotaNotFound and others |
InvalidReference | zun/common/exception.py:749 | parent of NameEmpty and others |
PlacementAPIConflict | zun/common/exception.py:812 | parent of ResourceProviderUpdateConflict |
InvalidInventory | zun/common/exception.py:836 | parent of InventoryInUse |
Dead classes:
| Class | Definition | Note |
|---|---|---|
UnsupportedObjectError | zun/common/exception.py:254 | |
IncompatibleObjectVersion | zun/common/exception.py:258 | |
InvalidUUID | zun/common/exception.py:283 | |
InvalidName | zun/common/exception.py:287 | |
InvalidDiscoveryURL | zun/common/exception.py:291 | |
GetDiscoveryUrlFailed | zun/common/exception.py:296 | |
InvalidUuidOrName | zun/common/exception.py:300 | |
InvalidCsr | zun/common/exception.py:308 | |
ConflictOptions | zun/common/exception.py:321 | |
InvalidState | zun/common/exception.py:325 | InvalidStateException is used instead |
PatchError | zun/common/exception.py:350 | |
PollTimeOut | zun/common/exception.py:507 | |
ServerInError | zun/common/exception.py:511 | |
ServerUnknownStatus | zun/common/exception.py:516 | |
EntityNotFound | zun/common/exception.py:521 | |
CapsuleAlreadyExists | zun/common/exception.py:639 | capsules are container rows: ContainerAlreadyExists |
CapsuleNotFound | zun/common/exception.py:643 | capsules are container rows: ContainerNotFound |
QuotaUsageNotFound | zun/common/exception.py:719 | |
InvalidResourceAmount | zun/common/exception.py:832 |
Also dead: exception.wrap_exception (zun/common/exception.py:56). The manager imports the other one, from zun/common/utils.py (zun/compute/manager.py:33).
DockerError and PolicyNotAuthorized have no raise statement but are raised: through utils.reraise (zun/container/docker/utils.py:49) and through exc= of oslo.policy (zun/common/policy.py:97, zun/common/policy.py:137).
External exceptions
| Source | Where | Handling | Result |
|---|---|---|---|
docker.errors.APIError | any block in docker_client() (zun/container/docker/utils.py:33) | caught at zun/container/docker/utils.py:47, rebuilt as DockerError(error_msg=str(e)), reraised with the original traceback at zun/container/docker/utils.py:49 | see DockerError. The block must be left by the exception: an inner except errors.APIError sees the Docker class first (next rows) |
errors.APIError, 404 by substring | zun/container/docker/driver.py:95, zun/container/docker/driver.py:442, zun/container/docker/driver.py:595, zun/container/docker/driver.py:886, zun/container/docker/driver.py:965, zun/container/docker/driver.py:976, zun/container/docker/driver.py:1333, zun/container/docker/driver.py:1347 | is_not_found is '404' in str(e) (zun/container/docker/driver.py:47) | delete: treated as done. Show: status Error, no raise. Others: Conflict or Invalid. See T16 |
errors.ImageNotFound, errors.NotFound | zun/image/docker/driver.py:43, zun/image/docker/driver.py:62, zun/image/docker/driver.py:82 | ignored, or None, or ImageNotFound | see catalogue |
eventlet.Timeout | zun/container/docker/driver.py:873 | Conflict "Timeout on executing command: %s" | 409 conflict-remote |
neutronclient NeutronClientNoUniqueMatch | zun/api/controllers/v1/containers.py:621 | Conflict | 409 |
neutronclient NeutronClientException 404 | zun/api/controllers/v1/containers.py:626 | InvalidValue; other statuses re-raised, 500 container. | 400, not 404 |
neutronclient NeutronClientException 400 | zun/network/kuryr_network.py:342, zun/network/kuryr_network.py:375 | SecurityGroupCannotBeApplied or SecurityGroupCannotBeRemoved; others re-raised (zun/network/kuryr_network.py:348, zun/network/kuryr_network.py:381) | log and event, in a greenthread |
neutronclient NeutronClientException | zun/network/neutron.py:355 | deletes the security group, raises ZunException | create: Error |
neutronclient NeutronClientException | zun/container/docker/driver.py:469 | logged, ignored: security group leak possible | none |
n_exceptions.PortNotFoundClient | zun/network/neutron.py:155 | warning, ignored | none |
any other neutronclient exception in the API process | for example zun/common/utils.py:519 | not caught | 500 container., even for a Neutron 403 or 409 |
cinderclient NotFound | zun/volume/cinder_api.py:45, zun/volume/cinder_api.py:50 | VolumeNotFound | 404 |
cinderclient NoUniqueMatch | zun/volume/cinder_api.py:52 | Conflict | 409 |
cinderclient ClientException | zun/volume/cinder_api.py:143, zun/volume/cinder_api.py:152 | VolumeCreateFailed, VolumeDeleteFailed | 400 |
cinderclient ClientException | zun/volume/cinder_api.py:80 | logged, attempts terminate_connection, re-raised | container Error |
cinderclient BadRequest | zun/volume/cinder_workflow.py:154 | Invalid | see catalogue |
cinderclient module used as a class | zun/volume/cinder_workflow.py:186 | TypeError | T14 |
os_brick VolumeDeviceNotFound | zun/volume/cinder_workflow.py:126 | warning, ignored | none |
keystoneauth1 EndpointNotFound, MissingAuthPlugin, Unauthorized, DiscoveryFailure, ConnectFailure | zun/scheduler/client/query.py:64 | candidates treated as empty, so NoValidHost | **202 then Error "There are not enough hosts available."** (T22) |
| same five | zun/scheduler/client/report.py:628 | rate-limited warning, ResourceProviderCreationFailed | periodic task log |
keystoneauth1 ClientException | zun/scheduler/client/report.py:2111 | PlacementAPIConnectFailure | periodic task log |
keystoneauth1 NotFound | zun/scheduler/client/report.py:1455 | {} | none |
keystoneauth1 others in the report client | no handler, retried only for ConnectFailure (zun/scheduler/client/report.py:2243) | create: Error "Unexpected exception occurred." and 500 [inferred] | |
keystoneclient AuthorizationFailure, ClientException | zun/common/exception.py:171, zun/common/exception.py:174, on the client factories (zun/common/clients.py:61, zun/common/clients.py:81, zun/common/clients.py:99, zun/common/clients.py:124) | AuthorizationFailure. They are aliases of the keystoneauth1 classes (python-keystoneclient:keystoneclient/exceptions.py:22, python-keystoneclient:keystoneclient/exceptions.py:46) | 500 container. |
oslo_db DBDuplicateEntry | zun/db/sqlalchemy/api.py:199 (ContainerAlreadyExists), zun/db/sqlalchemy/api.py:301, zun/db/sqlalchemy/api.py:367, zun/db/sqlalchemy/api.py:455, zun/db/sqlalchemy/api.py:501, zun/db/sqlalchemy/api.py:586, zun/db/sqlalchemy/api.py:667, zun/db/sqlalchemy/api.py:748, zun/db/sqlalchemy/api.py:812, zun/db/sqlalchemy/api.py:879, zun/db/sqlalchemy/api.py:1145, zun/db/sqlalchemy/api.py:1298, zun/db/sqlalchemy/api.py:1367, zun/db/sqlalchemy/api.py:1421 | one *AlreadyExists each | 409, except QuotaAlreadyExists (500) |
oslo_db DBReferenceError | zun/db/sqlalchemy/api.py:1517 | Conflict | 409 |
oslo_db InvalidSortKey | zun/db/sqlalchemy/api.py:98 | InvalidParameterValue | 400 |
sqlalchemy NoResultFound, MultipleResultsFound | for example zun/db/sqlalchemy/api.py:212, zun/db/sqlalchemy/api.py:225 | *NotFound, Conflict | 404, 409 |
other oslo_db errors (DBConnectionError, deadlock after retries) | no handler; @oslo_db_api.retry_on_deadlock (zun/db/sqlalchemy/api.py:184) | 500 container. | |
requests.ConnectionError | zun/cni/api.py:159 | logged, re-raised | CNI code 100 |
tenacity, retrying timeouts | zun/container/docker/driver.py:1315, zun/cni/plugins/zun_cni_registry.py:80 | no handler | T21 |
websocket client errors | zun/websocket/websocketclient.py:49, zun/websocket/websocketclient.py:51, zun/websocket/websocketclient.py:53 | ConnectionFailed, which fails to build | T12 |
Asynchronous errors
Status transitions
The API answers 202 (or 204 for delete) and returns before the work. utils.spawn_n (zun/common/utils.py:213) starts a greenthread with eventlet.spawn_n. An exception that leaves it reaches no one but the eventlet hub's printed traceback [inferred].
| Writer | Effect | Source |
|---|---|---|
_fail_container(context, container, error, unset_host=False) | tries _detach_volumes (failure only logged), sets status Error, status_reason = error, optionally host=None, saves | zun/compute/manager.py:183 |
handle_not_found | if status is Deleting: nothing. If auto_remove: status Deleted. Else status Error, status_reason = Docker's text. Then raises Conflict unless do_not_raise | zun/container/docker/driver.py:70 |
wrap_docker_error | DockerError: 404 goes to handle_not_found; not running, not paused, paused go to Conflict; else re-raised. 35 decorator uses including check_container_id | zun/container/docker/driver.py:87 |
zun/compute/api.py container_create | see next section | zun/compute/api.py:57, zun/compute/api.py:63 |
_init_container | at compute start: row Creating or with a creating task state becomes Error, "Container failed to create correctly". Others are retried | zun/compute/manager.py:109, zun/compute/manager.py:110 |
_remount_volume | at compute start: "Internal error on recovering container volume" | zun/compute/manager.py:180, zun/compute/manager.py:181 |
Which step writes status_reason:
| Step | Trigger | status_reason | host unset | Source |
|---|---|---|---|---|
| volume wait | not available in time | Volumes did not reach available status after %d seconds | yes | zun/compute/manager.py:221, zun/compute/manager.py:223 |
| volume attach | any exception | str(e) | yes | zun/compute/manager.py:441 |
| disk quota | size too small, or not supported | Disk size cannot be smaller than %(base_device_size)s. / Your host does not support disk quota feature. | yes | zun/compute/manager.py:270, zun/compute/manager.py:281 |
| image pull | ImageNotFound, DockerError, other | str(e) | no | zun/compute/manager.py:346, zun/compute/manager.py:350, zun/compute/manager.py:355 |
| Docker create | DockerError, other | str(e) | yes | zun/compute/manager.py:378, zun/compute/manager.py:384 |
| claim | ResourcesUnavailable | Insufficient compute resources: ... | yes, and the allocation is deleted | zun/compute/manager.py:404 |
| start | DockerError, other | str(e) | no | zun/compute/manager.py:526, zun/compute/manager.py:531 |
| delete | DockerError, other | str(e); with force the row is still destroyed | no | zun/compute/manager.py:556, zun/compute/manager.py:561 |
| rebuild | network info, Docker delete, create | str(e) | no | zun/compute/manager.py:693, zun/compute/manager.py:709, zun/compute/manager.py:722 |
| periodic state sync | Docker no longer has the container | via handle_not_found with do_not_raise=True | no | zun/container/docker/driver.py:596 [inferred for the periodic path] |
NoValidHost on create
container_create in the API process runs the scheduler before the cast. The row already exists (zun/api/controllers/v1/containers.py:436), so:
NoValidHost: statusError,status_reason"There are not enough hosts available." (fixed text; the exception's reason is lost), save,returnwith no raise (zun/compute/api.py:57). The client receives 202 with a body, and seesErroronly on the next GET. No action row is written, as_record_action_startcomes later (zun/compute/api.py:97).- Any other scheduler exception: status
Error, "Unexpected exception occurred.", re-raised: 500 (zun/compute/api.py:63). RequestedHostNotFoundis checked before and returns 404 after destroying the row (zun/compute/api.py:120).
@wrap_exception in the manager
utils.wrap_exception (zun/common/utils.py:662, reraise=False) logs and swallows. It wraps _add_security_group, _remove_security_group, _do_container_reboot, _do_container_stop, _do_container_pause, _do_container_unpause, _do_container_kill, _do_network_detach, _do_network_attach (zun/compute/manager.py:585, zun/compute/manager.py:603, zun/compute/manager.py:634, zun/compute/manager.py:652, zun/compute/manager.py:771, zun/compute/manager.py:789, zun/compute/manager.py:872, zun/compute/manager.py:1253, zun/compute/manager.py:1271). Inside it, @wrap_container_event has already recorded the failure.
Effect: the client got 202, the status does not change (except a Docker 404, via handle_not_found), and only the action event shows the failure. Create, rebuild, start and commit are not under wrap_exception: they re-raise into the greenthread, after writing the status when the table above says so. _do_image_pull raises nothing the client can see; image_delete likewise (zun/compute/manager.py:1105, zun/compute/manager.py:1116).
Container action events
| Element | Behaviour | Source |
|---|---|---|
| action row | started in the API (_record_action_start), one per request id | zun/compute/api.py:42 |
FinishAction | on exit sets finish_time, and message Error if an exception passed | zun/common/utils.py:590, zun/objects/container_action.py:76 |
EventReporter | event <prefix>_<function>, for example compute__do_container_create, result Success or Error, stored message = str(exc), traceback = formatted traceback | zun/common/utils.py:567, zun/common/utils.py:646, zun/objects/container_action.py:158, zun/objects/container_action.py:183 |
wrap_container_event | wraps both | zun/common/utils.py:632 |
| API view of an action | GET /v1/containers/{id}/container_actions/{req}; event message is not in _action_event_keys, so it is never shown | zun/api/controllers/v1/views/actions_view.py:32 |
| traceback | null unless policy container:action:events (default RULE_ADMIN_API) passes | zun/api/controllers/v1/containers.py:119, zun/api/controllers/v1/views/actions_view.py:63, zun/common/policies/container_action.py:18 |
| not covered | _do_container_delete has no event and no FinishAction, though DELETE starts an action (T18) | zun/compute/manager.py:545, zun/compute/api.py:138 |
So a non-admin user learns the reason of a failed stop from nothing but "result: Error".
CNI
zun-cni is a CNI plugin on stdin and stdout talking to zun-cni-daemon over HTTP. Neither is seen by the API client. A failure reaches Docker, then zun-compute, as a create failure and so container Error [inferred].
| Layer | Situation | Output | Source |
|---|---|---|---|
daemon POST /addNetwork | body unreadable | 400, empty | zun/cni/daemon/service.py:62 |
ResourceNotReady | 504 | zun/cni/daemon/service.py:69 | |
| other | 500 | zun/cni/daemon/service.py:73 | |
| success | 202, VIF primitive | zun/cni/daemon/service.py:75 | |
daemon POST /delNetwork | body unreadable | 400 | zun/cni/daemon/service.py:82 |
ResourceNotReady | 204, warning | zun/cni/daemon/service.py:95 | |
| other | 500 | zun/cni/daemon/service.py:99 | |
| success | 204 | zun/cni/daemon/service.py:100 | |
| plugin | status differs from 202 or 204 | CNIError, then code 100 | zun/cni/api.py:165 |
| plugin | any exception | stdout {"cniVersion", "msg", "code": 100, "details": <traceback>}, exit 1 | zun/cni/api.py:52, zun/cni/api.py:85, zun/common/consts.py:83 |
| plugin | SIGALRM | stdout {"msg": "timeout", "code": 200}, exit 1 | zun/cni/cmd/cni.py:53, zun/common/consts.py:84 |
DEL with a different CNI_CONTAINERID than registered is ignored with a warning (zun/cni/plugins/zun_cni_registry.py:99). A ContainerNotFound on DEL is ignored (zun/cni/plugins/zun_cni_registry.py:111).
WebSocket proxy
zun-wsproxy (zun/websocket/websocketproxy.py) has no HTTP error formatting of its own: it raises inside new_websocket_client (zun/websocket/websocketproxy.py:174), after the WebSocket handshake. The client sees the connection close, and the error is logged by websockify [inferred; websockify source not in the workspace].
| Check, in order | Failure | Source |
|---|---|---|
| container lookup, as admin, by uuid or name | ContainerNotFound, or Conflict for a duplicate name | zun/websocket/websocketproxy.py:199 |
token equals container.websocket_token | InvalidWebsocketToken | zun/websocket/websocketproxy.py:210 |
exec: an instance matches token and exec_id | InvalidWebsocketToken | zun/websocket/websocketproxy.py:244 |
Origin (absent is accepted) | ValidationError x3 | zun/websocket/websocketproxy.py:282 |
websocket_url present | InvalidWebsocketUrl | zun/websocket/websocketproxy.py:227 |
| connection to Docker | TypeError (T12) | zun/websocket/websocketclient.py:50 |
| proxy loop | SocketException, RuntimeError, CClose | zun/websocket/websocketproxy.py:82, zun/websocket/websocketproxy.py:70, zun/websocket/websocketproxy.py:104 |
The attach URL itself comes from GET /v1/containers/{id}/attach, which can fail with the normal HTTP errors, with NoInteractiveFlag 400 at zun/api/controllers/v1/containers.py:1059.
Key log messages
| Level | Message | Situation | Source |
|---|---|---|---|
| ERROR with traceback | %(correlation_id)s:%(excp)s | any 5xx. The correlation id ties a client report to the log | zun/common/exception.py:120 |
| DEBUG | the exception | any 4xx | zun/common/exception.py:127 |
| ERROR with traceback | Exception in string format operation, kwargs: %s | an exception built with kwargs not matching its template (T10) | zun/common/exception.py:207 |
| ERROR with traceback | Unexpected error: %s | non-Zun exception on a synchronous compute method | zun/common/utils.py:229 |
| ERROR | Error occurred while calling Docker API: %s | DockerError swallowed by wrap_exception | zun/common/utils.py:671 |
| ERROR with traceback | Unexpected exception: %s | other exception swallowed by wrap_exception | zun/common/utils.py:675 |
| ERROR | Error occurred while calling Docker image API: %s | pull on create | zun/compute/manager.py:352 |
| ERROR | Error occurred while calling Docker create API: %s | Docker create | zun/compute/manager.py:380 |
| ERROR with traceback | Container resource claim failed: %s | claim on create | zun/compute/manager.py:406 |
| ERROR | Failed to attach volume %(volume_id)s to container %(container_id)s | attach | zun/compute/manager.py:456 |
| ERROR | Failed to detach volume %(volume_id)s from container %(container_id)s | detach | zun/compute/manager.py:509 |
| ERROR with traceback | Failed to detach volumes: %s | inside _fail_container | zun/compute/manager.py:187 |
| ERROR | Error occurred while calling Docker start API: %s | start | zun/compute/manager.py:528 |
| ERROR | Error occurred while calling Docker delete API: %s (two spaces in the source) | delete | zun/compute/manager.py:558 |
| ERROR | Rebuild container: %s failed, reason of failure is: %s | rebuild | zun/compute/manager.py:705 |
| ERROR | Error occurred while calling Docker exec API: %s | exec | zun/compute/manager.py:851 |
| ERROR with traceback | Update container resource claim failed: %s | update | zun/compute/manager.py:920 |
| ERROR | Error occurred while calling glance create_image API: %s | commit | zun/compute/manager.py:1034 |
| ERROR with traceback | Unexpected exception while uploading image: %s | commit upload | zun/compute/manager.py:1053 |
| ERROR | Failed to get container details: %s | ContainerHostNotUp on show | zun/api/controllers/v1/containers.py:237 |
| INFO | No compute node record found for host %(host)s. | requested_host unknown | zun/compute/api.py:121 |
| WARNING | Skip validation since image search failed with unexpected exception: %s | any image validation error (T6) | zun/compute/api.py:94 |
| INFO | Skip validation since search is not supported for image '%(image)s' and image driver '%(driver)s'. | search not supported | zun/compute/api.py:85 |
| INFO | Got no allocation candidates from the Placement API. This could be due to insufficient resources or a temporary occurrence as compute nodes start up. | NoValidHost, including Placement unreachable | zun/scheduler/client/query.py:74 |
| WARNING | No compute node record for: %(host)s | first run of the tracker | zun/compute/compute_node_tracker.py:103 |
| ERROR | Unable to find services table record for zun-compute host %s | handler not reachable (T17) | zun/compute/compute_node_tracker.py:433 |
| ERROR | Failed scheduler client operation %s: out of retries | @retries exhausted | zun/scheduler/client/report.py:90 |
| ERROR | Failed to get resource provider by name: %s. Error: %s | keystoneauth failure | zun/scheduler/client/report.py:2112 |
| WARNING | Unable to delete allocation for %(consumer_type)s %(uuid)s: (%(code)i %(text)s) | just before the AttributeError of T9 | zun/scheduler/client/report.py:1928, zun/scheduler/client/report.py:1954 |
| ERROR | Volume creation failed: %(ex)s | Cinder | zun/volume/cinder_api.py:144 |
| ERROR with traceback | Failed to attach volume %(volume_id)s | attach workflow | zun/volume/cinder_workflow.py:81 |
| ERROR | Image %s was not found in docker repo | pull | zun/image/docker/driver.py:110 |
| ERROR with traceback | Error on pulling image | pull | zun/image/docker/driver.py:85 |
| ERROR | Timed out waiting for vifs to become active | CNI, branch of T21 | zun/cni/plugins/zun_cni_registry.py:88 |
| ERROR with traceback | Error when processing addNetwork request. CNI Params: %s | CNI daemon | zun/cni/daemon/service.py:71 |
| ERROR | CNI daemon returned error "%(status)d %(reason)s". | CNI plugin | zun/cni/api.py:166 |
| ERROR with traceback | Looks like %s:%s cannot be reached. Is zun-cni-daemon running? | CNI plugin. The tuple is one argument for two %s: logging format error [inferred] | zun/cni/api.py:160 |
Traps
Verified by reading unless marked. Items depending on a Python semantic were checked in an isolated interpreter.
T1. Unsupported microversion is not a 406. HTTPNotAcceptableAPIVersion.__call__ does json.dump_as_bytes(err).encode("latin-1") (zun/api/http_error.py:65). dump_as_bytes returns bytes (oslo.serialization:oslo_serialization/jsonutils.py:235), and bytes has no encode: AttributeError. It happens when Pecan calls the response, and the exception leaves the application and ParsableErrorMiddleware: observed in the probes for 1.0, 1.41 and 2.1. The client then gets the WSGI server's 500 [inferred]. No test in zun/tests covers it. Even once fixed, the middleware would replace code zun.microversion-unsupported by container., and drop max_version, min_version, links (zun/api/middleware/parsable_error.py:82). The version headers set on pecan.response are passed along (zun/api/controllers/v1/__init__.py:188). A rewrite must decide: 406 with what body. The intended body is {code: "zun.microversion-unsupported", title: "Requested microversion is unsupported", max_version, min_version, links}.
T2. Wrong content type is not a 415. _do_enforce_content_types builds its message with pecan_req.content_type.decode('utf-8') (zun/api/utils.py:89). A str has no decode in Python 3: AttributeError before pecan.abort(415), observed in the probe "errors: content type". The decorator is outside wrap_pecan_controller_exception (zun/api/controllers/v1/containers.py:250, zun/api/controllers/v1/containers.py:251), so this also escapes the obfuscated-500 path: a raw 500 from the server. Includes POST with no Content-Type. Sites: zun/api/controllers/v1/containers.py:250, zun/api/controllers/v1/containers.py:268, zun/api/controllers/v1/containers.py:280, zun/api/controllers/v1/containers.py:289, zun/api/controllers/v1/containers.py:298, zun/api/controllers/v1/capsules.py:160, zun/api/controllers/v1/capsules.py:172, zun/api/controllers/v1/networks.py:66, zun/api/controllers/v1/images.py:131, zun/api/controllers/v1/registries.py:161.
T3. Compute tracebacks reach the client. Any 4xx from an RPC call has the remote traceback in detail: hook only cuts title (zun/api/hooks.py:112, zun/common/exception.py:157, oslo.messaging:oslo_messaging/_drivers/common.py:205). The class comment says the hook exists to prevent this (zun/api/hooks.py:87). Example path: GET /v1/containers/{id}/get_archive with a path absent from the container, Invalid at zun/container/docker/driver.py:966. It discloses file paths and source lines.
T4. Two codes for one error. container.conflict and container.conflict-remote are the same class. The suffix depends only on which process raised it. Conversely, NetworkAlreadyExists cannot be rebuilt over RPC: its constructor takes (field, value) only (zun/common/exception.py:390), while the rebuild passes the message plus field, value, code: TypeError, RemoteError, 500 instead of 409. Any remote message containing % fails the same way: klass(message, **kwargs) formats again (zun/common/exception.py:203) [inferred for a real message].
**T5. NoValidHost has two faces.** POST /v1/containers answers 202 then status Error (zun/compute/api.py:57). PATCH of a dedicated-CPU container answers 500 with an obfuscated body (zun/compute/manager.py:1195). NoValidHost has no code, and the reason is lost in both.
T6. Image validation never rejects. raise ImageNotFound and raise Conflict (zun/compute/api.py:79, zun/compute/api.py:81) are inside the try whose last clause is except Exception (zun/compute/api.py:93). They are logged as "Skip validation" and create continues. The comment "container create will fail with 400 status" (zun/compute/api.py:70) is wrong: the failure appears later as status Error. Only ReferenceInvalidFormat gives a 400. The existing unit test test_searching_image_exception (zun/tests/unit/compute/test_compute_api.py) confirms a search failure lets create proceed.
**T7. ImageNotFound is 400.** Parent is Invalid (zun/common/exception.py:408), so GET /v1/images/{unknown} gives 400 (zun/db/sqlalchemy/api.py:558), unlike all other lookups (404). And GET /v1/images/{not-a-uuid} is a 500: get_resource calls Image.get_by_name (zun/api/utils.py:75), which zun/objects/image.py does not define, so AttributeError. Observed: probe "errors: image name instead of a UUID".
T8. 500 where a client expects 4xx. No code, so default 500, and an obfuscated message hiding the reason:
| Exception or case | Client error | Source |
|---|---|---|
InvalidCapsuleTemplate | bad capsule template | zun/common/exception.py:647 |
FailedParseStringToJson | template not JSON | zun/common/exception.py:651 |
NameEmpty, ReferenceInvalidFormat, NameTooLong | bad image name on POST /v1/images. The schema pattern is unanchored (zun/api/controllers/v1/schemas/parameter_types.py:277), so it passes | zun/common/exception.py:749, zun/api/controllers/v1/images.py:147 |
InvalidDigest and children | bad digest in the image name (not even a ZunException) | zun/common/docker_image/digest.py:19 |
OperationNotSupported | image search on a private registry | zun/common/exception.py:412 |
ContainerHostNotUp | operation while the host is down (arguably a 409 or 503) | zun/common/exception.py:371 |
ResourcesUnavailable | PATCH beyond host capacity | zun/common/exception.py:591 |
ZunException "Any of the security group in %s is not found " | wrong security group, seen late | zun/common/utils.py:329 |
ContainerActionNotFound | a 404-shaped name, 500 if it reached the API; not reached by GET, which tests for None at zun/api/controllers/v1/containers.py:113 [inferred] | zun/common/exception.py:701 |
Conversely, the reverse mistake: VolumeCreateFailed and VolumeDeleteFailed are 400 even for a Cinder 5xx (zun/common/exception.py:685, zun/common/exception.py:689).
T9. Three raised classes do not exist. exception.PciDeviceRequestFailed (zun/pci/stats.py:283), exception.ReshapeFailed (zun/scheduler/client/report.py:1207, zun/scheduler/client/report.py:1240, zun/scheduler/client/report.py:1245), exception.AllocationDeleteFailed (zun/scheduler/client/report.py:1934, zun/scheduler/client/report.py:1960). Each gives AttributeError when reached. The last matters most: a Placement failure in delete_allocation_for_container (zun/compute/manager.py:571) leaves the greenthread before container.destroy (zun/compute/manager.py:576), with the container stuck. Its status was set to Deleting by the API (zun/api/controllers/v1/containers.py:814) and is not corrected [inferred: the status reaches the DB through the compute's first save, zun/compute/manager.py:320].
T10. Wrong kwargs leave the template raw. A KeyError during formatting is caught and logged (zun/common/exception.py:204), the message stays with its %(...)s unless fatal_exception_format_errors is on:
| Exception | Given | Expected | Source |
|---|---|---|---|
PciDeviceInvalidStatus, PciDeviceVFInvalidStatus, PciDevicePFInvalidStatus, PciDeviceInvalidOwner | compute_node_uuid | compute_node_id | zun/objects/pci_device.py:218, zun/objects/pci_device.py:228, zun/objects/pci_device.py:248, zun/objects/pci_device.py:274, zun/objects/pci_device.py:280, zun/objects/pci_device.py:288, zun/objects/pci_device.py:298, zun/objects/pci_device.py:318, zun/objects/pci_device.py:331, zun/objects/pci_device.py:336 |
ResourceProviderNotFound | resource_provider | name_or_uuid | zun/db/sqlalchemy/api.py:604, zun/db/sqlalchemy/api.py:614, zun/db/sqlalchemy/api.py:628, zun/db/sqlalchemy/api.py:646 |
TraitRetrievalFailed | error | uuid | zun/scheduler/client/report.py:982 |
T11. Two positional arguments. ZunException.__init__(self, message=None, **kwargs) accepts one: TypeError at zun/objects/container.py:186 (an unknown type in a DB row) and zun/cni/api.py:82 (the plugin then reports the TypeError text as its CNI error).
T12. An exception object as the message. self.message % kwargs with an exception raises TypeError (zun/common/exception.py:203; only KeyError is caught). So ConnectionFailed(e) (zun/websocket/websocketclient.py:50, zun/websocket/websocketclient.py:52, zun/websocket/websocketclient.py:54) and FailedParseStringToJson(e) (zun/api/controllers/v1/capsules.py:55) are never built.
T13. Every pre-formatted message is formatted again. Because message % kwargs runs on anything (zun/common/exception.py:203, and kwargs always has code):
| Case | Effect | Source |
|---|---|---|
GET /v1/containers?a%25d=1 (Unknown parameters: a%d) | TypeError: 500 instead of 400, observed in the probe "errors: percent sign in an unknown parameter" | zun/api/controllers/v1/containers.py:204, zun/api/controllers/v1/registries.py:132 |
user value ending in % in a message | ValueError: 500 instead of 400 | same, zun/api/controllers/v1/containers.py:630, zun/api/controllers/v1/images.py:45 |
Docker or Neutron text with % | TypeError during error handling | zun/container/docker/driver.py:98, zun/network/kuryr_network.py:345 |
"...attempts %s" never filled by the caller | message ends {'code': 500} | zun/network/kuryr_network.py:126 |
VolumeMappingNotFound(volume_mapping_uuid) | message is the bare uuid | zun/db/sqlalchemy/api.py:324 |
InvalidWebsocketToken(token) | message and logs hold the token, not "Websocket token is invalid"; a %d in it is a TypeError | zun/websocket/websocketproxy.py:211, zun/websocket/websocketproxy.py:245 |
**T14. except cinder_exception as e.** cinder_exception is the module cinderclient.exceptions (zun/volume/cinder_workflow.py:13). The clause is evaluated only when an exception is raised: TypeError: catching classes that do not inherit from BaseException is not allowed (zun/volume/cinder_workflow.py:186). What arrives there is VolumeDeleteFailed from zun/volume/cinder_api.py:155. So every failed delete of an auto_remove volume is a TypeError, logged at zun/compute/manager.py:220 or zun/compute/manager.py:464, or uncaught in _detach_volumes (zun/compute/manager.py:497). The intended Invalid "Delete Volume failed: %s" is unreachable.
T15. Failed commit. After a DockerError from create_image, snapshot_image stays None, the greenthread is still spawned, and snapshot_image.id raises AttributeError (zun/compute/manager.py:1033, zun/compute/manager.py:1040, zun/compute/manager.py:1044). translate_exception makes it a 500. Other failures of create_image are not DockerError: ZunException (zun/container/docker/driver.py:217), a clean 500.
T16. Detection by substring. is_not_found is '404' in str(e) (zun/container/docker/driver.py:48): a Docker 500 whose text has 404 anywhere, such as a hexadecimal container id, sets the container to Error. is_conflict matches paused in any text (zun/container/docker/driver.py:63).
T17. A handler that cannot fire. except exception.NotFound at zun/compute/compute_node_tracker.py:430 protects get_by_host_and_binary, which returns None (zun/objects/zun_service.py:67), and ZunServiceNotFound is not under NotFound anyway (zun/common/exception.py:416, zun/common/exception.py:312). If the record is absent: AttributeError on service.disabled (zun/compute/compute_node_tracker.py:424), not the graceful path of the comment.
T18. Delete action never finishes. DELETE starts an action (zun/compute/api.py:138) but _do_container_delete has no FinishAction or event (zun/compute/manager.py:545). finish_time stays null, and the same applies on failure. force also removes the row after an error: with reraise=False, _fail_container writes Error and flow continues to container.destroy (zun/compute/manager.py:549, zun/compute/manager.py:576).
T19. Silent cast failures. Stop, kill, pause, unpause, reboot, network and security group operations can fail with 202 and an unchanged status, as described under @wrap_exception (zun/common/utils.py:662). The only client-visible protection is validate_container_state (zun/common/utils.py:118), which reads the DB status, possibly stale.
T20. Same exception, different status by endpoint.
| Exception | Statuses | Source |
|---|---|---|
ComputeNodeNotFound | 404 on /v1/hosts; 400 invalid-value on image pull; RequestedHostNotFound 404 on create | zun/db/sqlalchemy/api.py:891, zun/api/controllers/v1/images.py:43, zun/compute/api.py:120 |
ContainerHostNotUp | 500 on a call or delete; ignored on GET show (returns DB data); not checked at all on start, stop, reboot, pause, unpause, kill, rebuild: the cast goes to a dead queue, 202 | zun/compute/rpcapi.py:34, zun/api/controllers/v1/containers.py:236, zun/compute/rpcapi.py:82 |
ImageNotFound | 400 on show; swallowed on create validation; Error on create; nothing on pull | zun/db/sqlalchemy/api.py:558, zun/compute/api.py:93, zun/compute/manager.py:346, zun/compute/manager.py:1152 |
| Neutron 404 on a security group | 400 on create, and add or remove; other paths 404 (NetworkNotFound, PortNotFound) | zun/api/controllers/v1/containers.py:630, zun/network/neutron.py:292 |
NoValidHost | 202 + Error; 500 | T5 |
Conflict from Docker | 409 on a call; log only on a cast | zun/container/docker/driver.py:98 |
T21. CNI timeout does not give 504. With retry_on_result and stop_max_delay, the retrying library raises RetryError when time runs out (retrying installed in the venv, Retrying.call), rather than returning the last result (zun/cni/plugins/zun_cni_registry.py:80). So the ResourceNotReady branch after it (zun/cni/plugins/zun_cni_registry.py:89) is not reached on a timeout, and the daemon answers 500 through except Exception, not 504 (zun/cni/daemon/service.py:69). This was read, not run.
T22. Placement outage looks like lack of capacity. Connection or auth errors to Placement become empty candidates (zun/scheduler/client/query.py:64), then NoValidHost, then 202 and "There are not enough hosts available.". The only clue is an INFO line (zun/scheduler/client/query.py:74).
T23. Image pull reports nothing. POST /v1/images returns 202. If the image is not found, the compute logs and returns (zun/compute/manager.py:1152), and the image row stays without image_id. The Image object has no status field for a client to poll [inferred from zun/compute/manager.py:1149].
Source: reverse-spec-zun/02-errors_stable-2026.2.md. The _rewrite/ and _inventory/ files are not published on the site.