1.10.2. Asynchronous faults

An error may occur in the background while a server or image is being built or while a server is executing an action. In these cases, the server or image is placed in an ERROR state and the fault is embedded in the offending server or image. Note that these asynchronous faults follow the same format as the synchronous ones. The fault contains an error code, a human readable message, and optional details about the error. Additionally, asynchronous faults may also contain a created timestamp that specify when the fault occurred.

 

Example 1.48. Server in error state: XML response

<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
        xmlns:atom="http://www.w3.org/2005/Atom"
        id="52415800-8b69-11e0-9b19-734f0000ffff"
        tenant_id="1234" user_id="5678"
        name="sample-server" status="ERROR"
        created="2010-08-10T12:00:00Z"
        progress="66" hostId="e4d909c290d0fb1ca068ffafff22cbd0">
    <image id="52415800-8b69-11e0-9b19-734f6f007777" />
    <flavor id="52415800-8b69-11e0-9b19-734f216543fd" />
    <fault code="404" created="2010-08-10T11:59:59Z">
        <message>Could not find image 52415800-8b69-11e0-9b19-734f6f007777</message>
        <details>Fault details</details>
    </fault>
    <atom:link
        rel="self"
        href="http://servers.api.openstack.org/v2/1234/servers/52415800-8b69-11e0-9b19-734f000004d2"/>
    <atom:link
        rel="bookmark"
        href="http://servers.api.openstack.org/1234/servers/52415800-8b69-11e0-9b19-734f000004d2"/>
</server>

 

Example 1.49. Server in error state: JSON response

{
    "server": {
        "id": "52415800-8b69-11e0-9b19-734f0000ffff",
        "tenant_id": "1234",
        "user_id": "5678",
        "name": "sample-server",
        "created": "2010-08-10T12:00:00Z",
        "hostId": "e4d909c290d0fb1ca068ffafff22cbd0",
        "status": "ERROR",
        "progress": 66,
        "image" : {
            "id": "52415800-8b69-11e0-9b19-734f6f007777"
        },
        "flavor" : {
            "id": "52415800-8b69-11e0-9b19-734f216543fd"
        },
        "fault" : {
            "code" : 404,
            "created": "2010-08-10T11:59:59Z",
            "message" : "Could not find image 52415800-8b69-11e0-9b19-734f6f007777",
            "details" : "Fault details"
        },
        "links": [
            {
                "rel": "self",
                "href": "http://servers.api.openstack.org/v2/1234/servers/52415800-8b69-11e0-9b19-734f000004d2"
            },
            {
                "rel": "bookmark",
                "href": "http://servers.api.openstack.org/1234/servers/52415800-8b69-11e0-9b19-734f000004d2"
            }
        ]
    }
}

 

Example 1.50. Image in error state: XML response

<?xml version="1.0" encoding="UTF-8"?>
<image
    xmlns="http://docs.openstack.org/compute/api/v1.1"
    xmlns:atom="http://www.w3.org/2005/Atom"
    id="52415800-8b69-11e0-9b19-734f5736d2a2"
    name="My Server Backup"
    created="2010-08-10T12:00:00Z"
    status="ERROR" progress="89">
    <server id="52415800-8b69-11e0-9b19-734f335aa7b3" />
    <fault code="500">
        <message>An internal error occurred</message>
        <details>Error details</details>
    </fault>
    <atom:link
        rel="self"
        href="http://servers.api.openstack.org/v2/1234/images/52415800-8b69-11e0-9b19-734f5736d2a2"/>
    <atom:link
        rel="bookmark"
        href="http://servers.api.openstack.org/1234/images/52415800-8b69-11e0-9b19-734f5736d2a2"/>
</image>

 

Example 1.51. Image in error state: JSON response

{
    "image" : {
        "id" : "52415800-8b69-11e0-9b19-734f5736d2a2",
        "name" : "My Server Backup",
        "created" : "2010-08-10T12:00:00Z",
        "status" : "SAVING",
        "progress" : 89,
        "server" : {
            "id": "52415800-8b69-11e0-9b19-734f335aa7b3"
        },
        "fault" : {
            "code" : 500,
            "message" : "An internal error occurred",
            "details" : "Error details"
        },
        "links": [
            {
                "rel" : "self",
                "href" : "http://servers.api.openstack.org/v2/1234/images/52415800-8b69-11e0-9b19-734f5736d2a2"
            },
            {
                "rel" : "bookmark",
                "href" : "http://servers.api.openstack.org/1234/images/52415800-8b69-11e0-9b19-734f5736d2a2"
            }
        ]
    }
}

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page


loading table of contents...