libvirt save directory saves to the rootfs

Bug #1585325 reported by Matthew Thode
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Medium
Jesse Pretorius
Liberty
Fix Released
Medium
Matthew Thode
Mitaka
Fix Released
Medium
Matthew Thode
Trunk
Fix Released
Medium
Jesse Pretorius

Bug Description

More info: https://github.com/rcbops/rpc-openstack/issues/1097

Nova image-create calls libvirt with managedsave. This causes libvirt to create a save file in /var/lib/libvirt/qemu/save (unconfigurable save location). Many deployments have a partition set aside for nova to do this type of operation, mainly because of space considerations. the /var/lib/libvirt/qemu/save is cleaned up after every image-create, so we can manage the location libvirt saves to via symlinks. I'll be submitting a patch to do so soon.

no longer affects: openstack-ansible/liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (master)

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

Changed in openstack-ansible:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (master)

Reviewed: https://review.openstack.org/320624
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=2599006a81eeb2632a87f5b00d27d5f061f7d14e
Submitter: Jenkins
Branch: master

commit 2599006a81eeb2632a87f5b00d27d5f061f7d14e
Author: Matthew Thode <email address hidden>
Date: Tue May 24 13:58:18 2016 -0500

    Create symlink for libvirt save directory

    Nova can fill up the partition that /var/lib/libvirt/qemu/save is on
    when nova calls `image-create` on an instance. This occurs because
    nova calls libvirt with managedsave which creates a temporary file in
    the /var/lib/libvirt/qemu/save location. Libvirt does not allow the
    location of /var/lib/libvirt/qemu/save to be configurable so we have
    to manage it ourselves via bindmounts or symlinks.

    In this commit we remove the /var/lib/libvirt/qemu/save directory and
    create a symlink in it's place, pointing to
    `{{ nova_system_home_folder }}/save` instead (which we also create).
    This location was chosen as deployers often have more space here for
    nova instances.

    Change-Id: I5c96f70aa355cc02379fe7e0681416eca53447eb
    Partial-Bug: #1585325

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/323654

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (stable/mitaka)

Reviewed: https://review.openstack.org/323654
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=066012914eb9c41d8f43600198704007d5c04fd6
Submitter: Jenkins
Branch: stable/mitaka

commit 066012914eb9c41d8f43600198704007d5c04fd6
Author: Matthew Thode <email address hidden>
Date: Tue May 24 13:58:18 2016 -0500

    Create symlink for libvirt save directory

    Nova can fill up the partition that /var/lib/libvirt/qemu/save is on
    when nova calls `image-create` on an instance. This occurs because
    nova calls libvirt with managedsave which creates a temporary file in
    the /var/lib/libvirt/qemu/save location. Libvirt does not allow the
    location of /var/lib/libvirt/qemu/save to be configurable so we have
    to manage it ourselves via bindmounts or symlinks.

    In this commit we remove the /var/lib/libvirt/qemu/save directory and
    create a symlink in it's place, pointing to
    `{{ nova_system_home_folder }}/save` instead (which we also create).
    This location was chosen as deployers often have more space here for
    nova instances.

    Change-Id: I5c96f70aa355cc02379fe7e0681416eca53447eb
    Partial-Bug: #1585325
    (cherry picked from commit 2599006a81eeb2632a87f5b00d27d5f061f7d14e)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (liberty)

Fix proposed to branch: liberty
Review: https://review.openstack.org/324198

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: liberty
Review: https://review.openstack.org/324721

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible (liberty)

Change abandoned by Matthew Thode (<email address hidden>) on branch: liberty
Review: https://review.openstack.org/324198
Reason: see review #324721

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (liberty)

Reviewed: https://review.openstack.org/324721
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=a2adac22216686c38a2dca6992d41cea9090f992
Submitter: Jenkins
Branch: liberty

commit a2adac22216686c38a2dca6992d41cea9090f992
Author: Matthew Thode <email address hidden>
Date: Wed Jun 1 23:14:36 2016 -0500

    Create symlink for libvirt save directory

    Nova can fill up the partition that /var/lib/libvirt/qemu/save is on
    when nova calls `image-create` on an instance. This occurs because nova
    calls libvirt with managedsave which creates a temporary file in the
    /var/lib/libvirt/qemu/save location. Libvirt does not allow the location
    of /var/lib/libvirt/qemu/save to be configurable so we have to manage it
    ourselves via bindmounts or symlinks. In this commit we remove the
    /var/lib/libvirt/qemu/save directory and create a symlink in it's place,
    pointing to `{{ nova_system_home_folder }}/save` instead (which we also
    create). This location was chosen as deployers often have more space
    here for nova instances.

    Change-Id: I5c96f70aa355cc02379fe7e0681416eca53447eb
    Partial-Bug: #1585325

tags: added: in-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (master)

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

Changed in openstack-ansible:
assignee: Matthew Thode (prometheanfire) → Jesse Pretorius (jesse-pretorius)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (master)

Reviewed: https://review.openstack.org/346924
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=7598609e5b6092117deb80ba2cd6396215c90651
Submitter: Jenkins
Branch: master

commit 7598609e5b6092117deb80ba2cd6396215c90651
Author: Jesse Pretorius <email address hidden>
Date: Mon Jul 25 17:41:33 2016 +0100

    If /var/lib/libvirt/qemu/save exists, move it to nova_libvirt_save_path

    In https://review.openstack.org/320624 the qemu save directory was set
    to be a link into the same directory where nova instances are kept in
    order to ensure that temporary files created in snapshots are stored
    in a location which is likely on shared storage or has plenty of space.

    The patch did not actually create the link if a folder existed there
    already, so this patch implements a move of the folder and a link to
    replace it.

    Closes-Bug: #1585325
    Change-Id: I5224ac72b14ad027410f5d5c14d20870dd37b5cb

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible-os_nova 14.0.0.0b3

This issue was fixed in the openstack/openstack-ansible-os_nova 14.0.0.0b3 development milestone.

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.