-1

I am trying to delete bosh images using glace image-delete command.

| b0e05888-9179-491c-b6c8-b8dde4d59d78 | BOSH-5b01cc67-c45d-498f-892f-965e3a003906 |
| b1a57b88-6487-4b31-afac-7b4e9cac40cb | BOSH-704b5bdc-cffa-4420-8a93-8489e7c5d1c7 |
| c99b9f15-7515-42ea-944d-76654dcdf319 | BOSH-a7f99575-96d1-4c0b-b385-3e48ce6debd1 |

I am able to delete first image but last two are throwing error httpinternalservererror (http 500) unable to delete image I am using command glance image-delete imageid

All these images are from same owener 19070bc010034455ac2d8c52f1ba0f36. glance version is 1.1.0

Please help me on this.

I again ran this command in debug mode.I am posting portion of the log

root@vms-inception-2:/opt/cisco/vms-installer/scripts# glance --debug image-delete 897bbe11-0d25-4509-9e01-ef2402c7b1a7

 curl -g -i -X DELETE -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}985eb4e6477f217212bb66a91ea5d9979996cdac' -H 'Content-Type: application/octet-stream'  --cert None --key None https://us-virginia-1.cloud.cisco.com:9292/v2/images/897bbe11-0d25-4509-9e01-ef2402c7b1a7
Request returned failure status 500.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 700, in main
    args.func(client, args)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/shell.py", line 321, in do_image_delete
    gc.images.delete(args.id)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 222, in delete
    self.http_client.delete(url)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 292, in delete
    return self._request('DELETE', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 272, in _request
    resp, body_iter = self._handle_response(resp)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 93, in _handle_response
    raise exc.from_response(resp, resp.content)
HTTPInternalServerError: HTTPInternalServerError (HTTP 500)
HTTPInternalServerError (HTTP 500)
Vikram Ranabhatt
  • 7,268
  • 15
  • 70
  • 133
  • What do the server error logs say about the 500? – Pekka Nov 24 '15 at 18:02
  • @Pekka웃 which log where to get it – Vikram Ranabhatt Nov 24 '15 at 18:03
  • The web server or whatever is serving the resource you are trying to delete. – Pekka Nov 24 '15 at 18:04
  • well when i run this command glance image-delete imageid..it say failed delete image httpinternalservererror 500 – Vikram Ranabhatt Nov 24 '15 at 18:07
  • Yes. You need to look in the server's error logs what the exact problem is. The "500" code is an indication that something went wrong; the logs will tell you what it was – Pekka Nov 24 '15 at 18:11
  • @Pekka웃 can you tell me what are different reason this error comes.I will try update more data later as i don't have system access right now – Vikram Ranabhatt Nov 24 '15 at 18:11
  • There is a million possible reasons, the error logs will know why. (I don't know this stack so I can't tell you where to find the logs, but it should be easy to find out by Googling ` error logs` – Pekka Nov 24 '15 at 18:12

1 Answers1

0

I was using delete script which will basically delete Cf and bosh installation.There was flaw in the script which deleted keypair first before deleting bosh images,bosh director.This could have caused this issue.

Moreover I deleted .bosh_config and .bosh_deploy_config file from /root and /home/ubuntu folder.This helped me deleting third bosh images.

..second one still couldn't be deleted. I am using 1.1.0 version of glance for compatibility reason.seems this release has some bug for image create/deletion...hope this is rectified in 1.2.0 release...not sure on this ..:)

Vikram Ranabhatt
  • 7,268
  • 15
  • 70
  • 133