OSTF Launch instance, create snapshot, launch instance from snapshot failed

Bug #1638269 reported by Oleksiy Butenko
22
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Critical
MOS Linux

Bug Description

Test OSTF Launch instance, create snapshot, launch instance from snapshot failed

Steps:
1. Deploy env 9.2 SNAPSHOT#458
    - Controller, Telemetry - MongoDB (3)
    - Compute, Cinder (2)
    - Ironic (1)
    - Neutron with VLAN
2. Run OSTF

Expected result: all ostf tests - pass

Actual result:
Test OSTF Launch instance, create snapshot, launch instance from snapshot failed
_______________

Revision history for this message
Oleksiy Butenko (obutenko) wrote :

Reproduced on all tempest ci env, so it's blocker for tempest-ci

Revision history for this message
Oleksiy Butenko (obutenko) wrote :

if you need real env with bug feel free to contact me, I can provide access for you.

Revision history for this message
Oleksiy Butenko (obutenko) wrote :

https://goo.gl/b9JMjl - Diagnostic Snapshot

Changed in fuel:
milestone: none → 9.2
Changed in fuel:
status: New → Confirmed
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
tags: added: area-nova
Revision history for this message
Anna Babich (ababich) wrote :

Traceback from nova-compute for failed test: http://paste.openstack.org/show/587562/

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

I believe, the error above is caused by the fact that qemu / libvirt versions were updated, but the corresponding apparmor profiles have been not:

[ 4205.932731] type=1400 audit(1478015150.867:91): apparmor="DENIED" operation="mknod" profile="libvirt-29799294-e48d-46d4-b69e-2523bc334c66" name="/tmp/memfd-K1MPBa" pid=134065 comm="qemu-system-x86" requested_mask="c" denied_mask="c" fsuid=109 ouid=109
[ 4238.772782] type=1400 audit(1478015183.707:96): apparmor="DENIED" operation="mknod" profile="libvirt-f510c840-2788-420d-b3e5-c587a52f2242" name="/tmp/memfd-i7BQBm" pid=136798 comm="qemu-system-x86" requested_mask="c" denied_mask="c" fsuid=109 ouid=109

apparently, libvirt now *defaults* to vhost networking and this part was not properly added to the apparmor profiles we ship:

./hw/virtio/vhost.c- if (!(hdev->features & (0x1ULL << VHOST_F_LOG_ALL))) {
./hw/virtio/vhost.c- error_setg(&hdev->migration_blocker,
./hw/virtio/vhost.c- "Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.");
./hw/virtio/vhost.c- } else if (!qemu_memfd_check()) {
./hw/virtio/vhost.c- error_setg(&hdev->migration_blocker,
./hw/virtio/vhost.c: "Migration disabled: failed to allocate shared memory");
./hw/virtio/vhost.c- }
./hw/virtio/vhost.c- }

Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → MOS Linux (mos-linux)
tags: added: area-linux
removed: area-nova
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

MOS Linux, please take a look at this.

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to packages/trusty/libvirt (9.0)

Fix proposed to branch: 9.0
Change author: Ivan Suzdal <email address hidden>
Review: https://review.fuel-infra.org/28086

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to packages/trusty/libvirt (9.0)

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

Commit: aebfeb916151ce13ea9af5bcbae261e471db0713
Author: Ivan Suzdal <email address hidden>
Date: Wed Nov 2 10:32:41 2016

Temporary change apparmor rules

Qemu should be able to write into /tmp
during live vm migration.

TODO: Remove this changes after closing LP#1626972.

Change-Id: I6086e22aee0d32b6c28dc89bc408e6f99fd96248
Closes-Bug: #1638269

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Anna Babich (ababich) wrote :
Changed in fuel:
status: Fix Committed → New
Revision history for this message
Ivan Suzdal (isuzdal) wrote :

Anna, it seems like you use too old libvirt version. Fix was implemented in 1.3.1-1ubuntu6~u1404+mos6 version, in your snapshot I can see 1.3.1-1ubuntu6~u1404+mos4 version. Please, try with newer version.

Changed in fuel:
status: New → Fix Committed
Changed in fuel:
status: Fix Committed → Fix Released
Revision history for this message
Sergii Turivnyi (sturivnyi) wrote :

It reproduced on 9.2 snapshot #465

Changed in fuel:
status: Fix Released → Confirmed
Revision history for this message
Anna Babich (ababich) wrote :

We can see that 1.3.1-1ubuntu6~u1404+mos6 version for libvirt was proposed starting from http://mirror.seed-cz1.fuel-infra.org/mos-repos/ubuntu/snapshots/9.0-2016-11-02-134322, but it looks like snapshot #465 was deployed with older snapshot repos:
ababich@srv138-bud:~$ cat /home/jenkins/env_inject.properties
SNAPSHOT_ID=#465
UPDATE_MASTER='true'
EXTRA_RPM_REPOS='mos-os,http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/os-2016-06-23-135731/x86_64|mos-proposed,http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/proposed-2016-11-02-092322/x86_64|mos-updates,http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/updates-2016-10-12-105639/x86_64|mos-security,http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/security-2016-06-23-140002/x86_64|mos-holdback,http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/holdback-2016-06-23-140047/x86_64'
UPDATE_FUEL_MIRROR='http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/os-2016-06-23-135731/x86_64 http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/proposed-2016-11-02-092322/x86_64 http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/updates-2016-10-12-105639/x86_64 http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/security-2016-06-23-140002/x86_64 http://mirror.seed-cz1.fuel-infra.org/mos-repos/centos/mos9.0-centos7/snapshots/holdback-2016-06-23-140047/x86_64'
EXTRA_DEB_REPOS='mos-proposed,deb http://mirror.seed-cz1.fuel-infra.org/mos-repos/ubuntu/snapshots/9.0-2016-11-02-104321 mos9.0-proposed main restricted|mos-updates,deb http://mirror.seed-cz1.fuel-infra.org/mos-repos/ubuntu/snapshots/9.0-2016-11-02-104321 mos9.0-updates main restricted|mos-security,deb http://mirror.seed-cz1.fuel-infra.org/mos-repos/ubuntu/snapshots/9.0-2016-11-02-104321 mos9.0-security main restricted|mos-holdback,deb http://mirror.seed-cz1.fuel-infra.org/mos-repos/ubuntu/snapshots/9.0-2016-11-02-104321 mos9.0-holdback main restricted'
ababich@srv138-bud:~$

So, we need to fix the gap in EnvInject variables and check that the next run of Tempest job will use actual ones.

Changed in fuel:
assignee: MOS Linux (mos-linux) → Yury Tregubov (ytregubov)
Revision history for this message
Oleksiy Butenko (obutenko) wrote :

we need wait for new snapshot and check it.
now job 9.x.snapshot broken https://product-ci.infra.mirantis.net/job/9.x.snapshot/ - it's root cause, why we don't have new snapshot on labs

Changed in fuel:
status: Confirmed → Fix Committed
assignee: Yury Tregubov (ytregubov) → MOS Linux (mos-linux)
Dmitry (dtsapikov)
tags: added: on-verification
Dmitry (dtsapikov)
tags: removed: on-verification
Revision history for this message
Yury Tregubov (ytregubov) wrote :

The problem is not seen after 9.2 mos snapshot #498

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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