Boot From Volume Instance Fails to Spawn: "Block Device Mapping is Invalid"

Boot From Volume Instance Fails to Spawn: “Block Device Mapping is Invalid”

  • 3 months ago
  • Updated

Problem

  • A volume-backed instance creation fails with the following error: " Block Device Mapping is Invalid ".
  • The same error is observed in /var/log/pf9/ostackhost.log on the destination host.

ERROR nova.compute.manager Attaching block device to instance failed.
Error: Volume did not finish being created even after we waited 193 seconds or 61 attempts. And its status is creating.

Environment

  • Platform9 Managed OpenStack - v3.6.0 and Higher
  • Glance
  • Nova

Cause

The image specified for the volume is taking too long to be downloaded from the Image Library (Glance) host(s) to the destination hypervisor and subsequently uploaded to the Block Storage (Cinder) backend. The time it takes for the image to be downloaded depends on many factors including the raw image size and network latency amongst the hosts.

Resolution

  1. SSH to the host.

  2. Edit the nova_override.conf file. (Create the file if it does not already exist.)

    $ vi /opt/pf9/etc/nova/conf.d/nova_override.conf

  3. Identify the following parameters:

    [DEFAULT]
    block_device_allocate_retries
    block_device_allocate_retries_interval
    
  • If the above options are not present, the default values would be used which are:

    block_device_allocate_retries = 60
    block_device_allocate_retries_interval = 3

  1. You can double the values to ensure that Nova makes 120 attempts and waits for 6 seconds between each attempt.

  2. Restart the pf9-ostackhost service

    #service pf9-ostackhost.service restart

Nova will now use the new timeout value.