Failure when creating a volume from an existing image and using it to boot an instance.

Bug #1337769 reported by Liyi Meng
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Unassigned

Bug Description

Running CLI as below to create a volume from an existing image and using it to boot an instance.

nova --debug boot --flavor m1.medium --block-device source=image,id=8c7ae799-a61c-4015-86af-ca8544691399,dest=volume,size=40,shutdown=remove,bootindex=0 --nic net-id=861b4e6b-126d-4302-a2b2-58fd0bb72f03 my-testvm

This will fail now and then depends on the images size.

API trace from operation:

REQ: curl -i http://cic-pub-api:38774/v2/ae132c7a5c0f49efa126c133039b28ab/os-volumes_boot -X POST -H "X-Auth-Project-Id: ericsson" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: bcce2c7f828743859d9cf1134085a422" -d '{"server": {"name": "for-anton", "imageRef": "", "block_device_mapping_v2": [{"boot_index": "0", "uuid": "8c7ae799-a61c-4015-86af-ca8544691399", "volume_size": "40", "source_type": "image", "destination_type": "volume", "delete_on_termination": true}], "flavorRef": "3", "max_count": 1, "min_count": 1, "networks": [{"uuid": "861b4e6b-126d-4302-a2b2-58fd0bb72f03"}]}}'

Liyi Meng (liyi-meng)
Changed in nova:
importance: Undecided → High
assignee: nobody → Liyi Meng (liyi-meng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/104876

Changed in nova:
status: New → In Progress
Liyi Meng (liyi-meng)
Changed in nova:
milestone: none → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/104876
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Removing "In Progress" status and assignee as change is abandoned.

Changed in nova:
status: In Progress → Confirmed
assignee: Liyi Meng (liyi-meng) → nobody
Revision history for this message
lvmxh (shaohef) wrote :

If no one take, let me try?

Hi Liyi Meng, are you still working on this?

Revision history for this message
Liyi Meng (liyi-meng) wrote : RE: [Bug 1337769] Re: Failure when creating a volume from an existing image and using it to boot an instance.

Please take it over.
Thanks a lot!

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of lvmxh
Sent: den 10 april 2015 08:22
To: Liyi Meng
Subject: [Bug 1337769] Re: Failure when creating a volume from an existing image and using it to boot an instance.

If no one take, let me try?

Hi Liyi Meng, are you still working on this?

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1337769

Title:
  Failure when creating a volume from an existing image and using it to
  boot an instance.

Status in OpenStack Compute (Nova):
  Confirmed

Bug description:
  Running CLI as below to create a volume from an existing image and
  using it to boot an instance.

  nova --debug boot --flavor m1.medium --block-device
  source=image,id=8c7ae799-a61c-4015-86af-
  ca8544691399,dest=volume,size=40,shutdown=remove,bootindex=0 --nic
  net-id=861b4e6b-126d-4302-a2b2-58fd0bb72f03 my-testvm

  This will fail now and then depends on the images size.

  API trace from operation:

  REQ: curl -i http://cic-pub-
  api:38774/v2/ae132c7a5c0f49efa126c133039b28ab/os-volumes_boot -X POST
  -H "X-Auth-Project-Id: ericsson" -H "User-Agent: python-novaclient" -H
  "Content-Type: application/json" -H "Accept: application/json" -H "X
  -Auth-Token: bcce2c7f828743859d9cf1134085a422" -d '{"server": {"name":
  "for-anton", "imageRef": "", "block_device_mapping_v2":
  [{"boot_index": "0", "uuid": "8c7ae799-a61c-4015-86af-ca8544691399",
  "volume_size": "40", "source_type": "image", "destination_type":
  "volume", "delete_on_termination": true}], "flavorRef": "3",
  "max_count": 1, "min_count": 1, "networks": [{"uuid": "861b4e6b-
  126d-4302-a2b2-58fd0bb72f03"}]}}'

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1337769/+subscriptions

Revision history for this message
zhangjialong (zhangjl) wrote :

It seams that the error above not reproduce in master

Revision history for this message
wanghao (wanghao749) wrote :

Not reproduce in my devstack environment too.

information about my devstack:

commit 9e4bb495e8f89296e3b5181fa7348b529fbb7ec2
Merge: 883a16d ba521fa
Author: Jenkins <email address hidden>
Date: Fri Apr 10 20:01:19 2015 +0000

Revision history for this message
Dane Fichter (dane-fichter) wrote :

I've seen this as well, and I think it relates to the flavor of the instance you attempt to boot from the volume. In my experience, when you make a bootable volume and try to boot one of the smaller flavors (smaller than m1.tiny), it fails.

Revision history for this message
Bernd Bausch (berndbausch) wrote :

It seems to me this problem is solved with the new (as of Juno) config parameters "block_device_allocate_retries" and "block_device_allocate_retries_interval". See http://docs.openstack.org/juno/config-reference/content/nova-conf-changes-juno.html.

The code in nova/compute/manager.py (_await_block_device_mape_created()) still contains a small mistake - it outputs a warning about "block_device_retries" instead of "block_device_allocate_retries".

---------------

If anybody still wants to reproduce the situation, use a large image in an http store: "glance image-create --location <somewhere on the internet> ....". This ensures a long load time.
You should then find a message like this in the nova compute log:
"VolumeNotCreated: Volume 1cf1c991-6f61-4072-9e80-0161d6ee0574 did not finish being created even after we waited 193 seconds or 61 attempts. And its status is downloading."

Changed in nova:
status: Confirmed → Fix Released
Revision history for this message
Bernd Bausch (berndbausch) wrote :

Setting the status to "fix released", so that the bug disappears from the list. I hope that is OK.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.