Error Status of the Server created with OpenStack Compute Api

4.5k views Asked by At

POST request for creating the OpenStack instance

curl -g -i -X POST http://Controller_ip:8774/v2/tenant_id/servers -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: token_id" -d '{"server": {"name": "viki_test_instance", "imageRef": "image_id", "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid": "public interface"}], "security_groups": [{"name": "default"}]}}'

Response to the Request

HTTP/1.1 202 Accepted

Content-Length: 438

Location: http://Controlle-ip:8774/v2/tenant-id/servers/image-id

Content-Type: application/json X-Compute-Request-Id: req-92a46827-1200-4084-bc4e-7c74a9d6f671 Date: Tue, 27 Dec 2016 06:19:10 GMT

{"server": {"security_groups": [{"name": "default"}], "OS-DCF:diskConfig": "MANUAL", "id": "image-id", "links": [{"href": "http://controller-ip:8774/v2/tenant-id/servers/image-id", "rel": "self"}, {"href": "http://Controller-ip:8774/tenant-id/servers/image-id", "rel": "bookmark"}], "adminPass": "8vCSQzmf6uwu"}}

Results:

  • The instance got created with the particular name of the OpenStack tenant and also was listed in the openstack server list command

Problem:

  • The status of the instance is showing ERROR

server listing

I am able to create the instance via openstack server create command and horizon dashboard.

openstack server create --image Ubuntu-14.04-Trusty --flavor m1.small --nic net-id=214a5016-c2e1-47e2-aec3-fcdcdec9e939 viki_test_instance1

nova-api.log shows,

nova-api.log

The first log shows to upgrade the glance version but I doubt that is a solution as my other services such the openstack cli and horizon dashboard are able to create the instance.

Need help in debugging this issue.

1

There are 1 answers

2
user624441 On

@dvigneshwer: Thanks for the hint. It did work for me. In my case I am not sure how but the image created with cirros was wrong. I downloaded a new image and then added this image to glance, then created my server and it did work.

+--------------------------------------+--------------------------+--------+
| ID                                   | Name                     | Status |
+--------------------------------------+--------------------------+--------+
| af6bf068-0997-4711-bf49-5ba44e986d9d | cirros                   | active |
| dcad76ef-210e-4cee-b4f0-139c0f1cd1f7 | cirros-0.3.5-x86_64-disk | active |<-- Some issue with this Image. So deleted this.
+--------------------------------------+--------------------------+--------+