fsfreeze-hook script should also ignored dpkg generated files

Bug #1484990 reported by Laurent Bigonville
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned
qemu (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hello,

In the fsfreeze-hook script, the following code check if some of the files should be ignored:

# Check whether file $1 is a backup or rpm-generated file and should be ignored
is_ignored_file() {
    case "$1" in
        *~ | *.bak | *.orig | *.rpmnew | *.rpmorig | *.rpmsave | *.sample)
            return 0 ;;
    esac
    return 1
}

The functions should probably also skip dpkg generated files.

I've found a list of the different extensions in the systemd source tree: https://github.com/systemd/systemd/blob/master/src/basic/util.c#L1871

Tags: qemu-18.04
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

(late) Hi,
You are right Laurent, IMHO they should be added.
Not very critical since as of today there are no conffiles in there yet, but still right to do so.

Adding an Ubutu task to include the fix and actually also the script to better support the freeze/thaw operations.

tags: added: qemu-18.04
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The link you added has changed a lot, but due to the feats of git the following will do for what you initially suggested.

https://github.com/systemd/systemd/blob/61ee6939819963b7845c101485e188ca2a8119c6/src/basic/util.c#L1871

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I submitted a change based on the suggestion upstream:
http://lists.nongnu.org/archive/html/qemu-devel/2017-12/msg02142.html

Grml, due to LP posts being mirrored on the ML this is kind of redundant when viewed from the ML.
But I want to leave that info for LP-only-readers as well :-/

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

qemu 2.11 is in proposed

Changed in qemu (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.9 KiB)

This bug was fixed in the package qemu - 1:2.11+dfsg-1ubuntu1

---------------
qemu (1:2.11+dfsg-1ubuntu1) bionic; urgency=medium

  * Merge with Debian testing, among other fixes this includes
    - fix fatal error on negative maxcpus (LP: #1722495)
    - fix segfault on dump-guest-memory on guests without memory (LP: #1723381)
    - linux user threading issues (LP: #1350435)
    - TOD-Clock Epoch Extension Support on s390x (LP: #1732691)
    Remaining changes:
    - qemu-kvm to systemd unit
      - d/qemu-kvm-init: script for QEMU KVM preparation modules, ksm,
        hugepages and architecture specifics
      - d/qemu-kvm.service: systemd unit to call qemu-kvm-init
      - d/qemu-system-common.install: install systemd unit and helper script
      - d/qemu-system-common.maintscript: clean old sysv and upstart scripts
      - d/qemu-system-common.qemu-kvm.default: defaults for
        /etc/default/qemu-kvm
      - d/rules: install /etc/default/qemu-kvm
    - Enable nesting by default
      - set nested=1 module option on intel. (is default on amd)
      - re-load kvm_intel.ko if it was loaded without nested=1
      - d/p/ubuntu/expose-vmx_qemu64cpu.patch: expose nested kvm by default
        in qemu64 cpu type.
      - d/p/ubuntu/enable-svm-by-default.patch: Enable nested svm by default
        in qemu64 on amd
    - libvirt/qemu user/group support
      - qemu-system-common.postinst: remove acl placed by udev, and add udevadm
        trigger.
      - qemu-system-common.preinst: add kvm group if needed
    - Distribution specific machine type
      - d/p/ubuntu/define-ubuntu-machine-types.patch: define distro machine
        types to ease future live vm migration.
      - d/qemu-system-x86.NEWS Info on fixed machine type defintions
    - improved dependencies
      - Make qemu-system-common depend on qemu-block-extra
      - Make qemu-utils depend on qemu-block-extra
      - let qemu-utils recommend sharutils
    - s390x support
      - Create qemu-system-s390x package
      - Include s390-ccw.img firmware
      - Enable numa support for s390x
    - ppc64[le] support
      - d/qemu-system-ppc.links provide usr/bin/qemu-system-ppc64le symlink
    - arch aware kvm wrappers
  * Added Changes
    - update VCS-git to match the bionic branch
    - sdl2 is yet too unstable for the LTS Ubuntu release given the reports
      we still see upstream and in Debian - furthermore sdl2 isn't in main yet,
      so we revert related changes to stick with the proven for now:
      - 0fd25810 - do not build-depend on libx11-dev (libsdl2-dev already
                   depends on it)
      - 9594f820 - switch from sdl1.2 to sdl2 (#870025)
    - d/qemu-system-x86.README.Debian: document intention of nested being
      default is comfort, not full support
    - update Ubuntu machine types for qemu 2.11
    - qemu-guest-agent: freeze-hook fixes (LP: #1484990)
      - d/p/guest-agent-freeze-hook-skip-dpkg-artifacts.patch
      - d/qemu-guest-agent.install: provide /etc/qemu/fsfreeze-hook
      - d/qemu-guest-agent.dirs: provide /etc/qemu/fsfreeze-hook.d
    - Create and install pxe netboot images for KVM s390x (LP: #1732094)
      - d/rules enable install s390x-netbo...

Read more...

Changed in qemu (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Thomas Huth (th-huth) wrote :

Christian, what happened to the upstream patch? Looks like it never got included? Could you please poke the maintainer, so we could finally close this bug for upstream, too?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Yeah I even got help back then to make sure CCs are better but nothing happened.
Old thread: http://lists.nongnu.org/archive/html/qemu-devel/2017-12/msg02142.html

I re-pinged on the old thread to be reconsidered.
New Ping: http://lists.nongnu.org/archive/html/qemu-devel/2018-08/msg03892.html

Thanks Thomas for making me aware this was still lingering unresolved.

Revision history for this message
Thomas Huth (th-huth) wrote :

Fix had been included here (in QEMU v3.1 already):
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=7294e600eb814fd2

Changed in qemu:
status: New → Fix Released
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.