/etc/init.d/xendomains does not filter out backups of domU's configuration files

Bug #1572446 reported by Sébastien Chaumat
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xen (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu releases : from 14.04 to 16.04 at least
Latest package version with the bug : 4.5.1-0ubuntu1.3

Use case :

 After changing the domU name in /etc/xen/auto/mydomU.cfg my editor creates a backup file /etc/xen/auto/mydomU.cfg~

 Then, when rebooting, xendomains starts the domU twice : once with the old name and once with the new name but using the same virtual block devices then corrupting the filesystem on them (btrfs in my case).

 Expected behavior :

 Only the domU configured in /etc/xen/auto/mydomU.cfg should start.

 Proposed solution :

 /etc/init.d/xendomains should enforce not only domU names but extensions of files in $XENDOMAINS_AUTO

in
 do_start_auto()

I suggest changing :

  for file in $XENDOMAINS_AUTO/*; do

to

 for file in $XENDOMAINS_AUTO/*.cfg; do

And document the change (display a message when upgrading xen-utils-common).

Other consistency checks may be useful like refusing to start a domU using a VBD already in use (but this may be a needed feature of xen-hotplug).

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.