Cold migration fails for instances with ephemeral disk

Bug #1686944 reported by Alexander Rubtsov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Committed
High
MOS Nova
9.x
Fix Released
High
Sergey Nikitin

Bug Description

Please backport the fix for the following upstream bug to Mitaka series:
https://bugs.launchpad.net/nova/+bug/1605720

--- Environment ---
* Mirantis OpenStack 9.2
* Qcow format for images
* Backend for ephemeral disks: file

--- Steps to reproduce ---
1) Build a new environment with at least 2 compute nodes

2) Create a new flavor with ephemeral disk
[root@node-2 ~]$ nova flavor-create --ephemeral 2 MigrationTest 10 512 0 1
+----+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| 10 | MigrationTest | 512 | 0 | 2 | | 1 | 1.0 | True |
+----+---------------+-----------+------+-----------+------+-------+-------------+-----------+

3) Boot an instance based on this flavor
[root@node-2 ~]$ nova boot --image TestVM --flavor MigrationTest --nic net-id=d6bd7512-4f7e-46e1-8209-1dcc2f6ad44e MyVM-1 |

4) Migrate the instance
nova migrate --poll MyVM-1

--- Actual result ---
Server migrating... 0% complete
Error migrating server
ERROR (ResourceInErrorState):

In the nova-compute.log on target Compute node:
libvirtError: Cannot access backing file '/var/lib/nova/instances/_base/ephemeral_2_0706d66' of storage file '/var/lib/nova/instances/a1cbe06d-15f6-45b2-b17e-42bf250093ee/disk.eph0' (as uid:108, gid:117): No such file or directory

--- Expected result ---
The migration has successfully performed

Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

sla1 for 9.0-updates

tags: added: customer-found sla1
Changed in mos:
importance: Undecided → High
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/nova (9.0/mitaka)

Fix proposed to branch: 9.0/mitaka
Change author: Chris Friesen <email address hidden>
Review: https://review.fuel-infra.org/35173

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

The fix is already merged to 10.0: https://review.fuel-infra.org/#/c/30763/

Changed in mos:
milestone: none → 10.0
assignee: nobody → MOS Nova (mos-nova)
status: New → Confirmed
status: Confirmed → Fix Committed
tags: added: area-nova
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/35173
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: 019f3f79ebaaea5feafc70ac81c3c5846314ec36
Author: Chris Friesen <email address hidden>
Date: Thu May 4 10:00:52 2017

Fix cold migration with qcow2 ephemeral disks

If we have qcow2 ephemeral disks we need to ensure that the
backing file gets created on a cold migration.

This requires passing in the block_device_info when calling
_create_image() so that we can loop over the ephemeral disks.

Closes-Bug: #1686944
Co-Authored-By: Feodor Tersin <email address hidden>
Change-Id: Ie278bb10e1675ba1d903aaa3c0249be0d1cf147b
(cherry picked from commit d7b831e38cbc029b7975d1059ed212762a5f6a5e)

tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.2 + mu2 updates.

The migration is finished successfully.
root@node-6:~# nova migrate --poll VM1
Server migrating... 100% complete
Finished

There is no errors in nova-compute.log on target compute node.

tags: removed: on-verification
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/nova (mcp/1.0/mitaka)

Fix proposed to branch: mcp/1.0/mitaka
Change author: Chris Friesen <email address hidden>
Review: https://review.fuel-infra.org/36364

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/nova (mcp/1.0/mitaka)

Change abandoned by Vladyslav Drok <email address hidden> on branch: mcp/1.0/mitaka
Review: https://review.fuel-infra.org/36364

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change restored on openstack/nova (mcp/1.0/mitaka)

Change restored by Vladyslav Drok <email address hidden> on branch: mcp/1.0/mitaka
Review: https://review.fuel-infra.org/36364

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (mcp/1.0/mitaka)

Reviewed: https://review.fuel-infra.org/36364
Submitter: Pkgs Jenkins <email address hidden>
Branch: mcp/1.0/mitaka

Commit: ad686ec0dc8d72569b9470e5bfce88638aeac6af
Author: Chris Friesen <email address hidden>
Date: Wed Aug 30 18:45:15 2017

Fix cold migration with qcow2 ephemeral disks

If we have qcow2 ephemeral disks we need to ensure that the
backing file gets created on a cold migration.

This requires passing in the block_device_info when calling
_create_image() so that we can loop over the ephemeral disks.

Closes-Bug: #1686944
Co-Authored-By: Feodor Tersin <email address hidden>
(cherry picked from commit d7b831e38cbc029b7975d1059ed212762a5f6a5e)
(cherry picked from commit f1e07e8e5e34375d616e05b4b067930cdc48c664)
Change-Id: Ie278bb10e1675ba1d903aaa3c0249be0d1cf147b

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.