From: Wei Liu Subject: Re: [PATCH 2/6] libxl: Remove linux udev rules Date: Tue, 7 Jul 2015 12:39:52 +0100 Message-ID: <20150707113952.GT1134@zion.uk.xensource.com> References: <1436179903-449-1-git-send-email-george.dunlap@eu.citrix.com> <1436179903-449-3-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1436179903-449-3-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Ian Jackson , Roger Pau Monne , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Jul 06, 2015 at 11:51:39AM +0100, George Dunlap wrote: > They are no longer needed, having been replaced by a daemon for > driverdomains which will run scripts as necessary. > > Worse yet, they seem to be broken for script-based block devices, such > as block-iscsi. This wouldn't matter so much if they were never run > by default; but if you run block-attach without having created a > domain, then the appropriate node to disable running udev scripts will > not have been written yet, and the attach will silently fail. > > Rather than try to sort out that issue, just remove them entirely. > > Note: This changes tools/configure.ac, so autogen.sh may need to be > re-run. > > Signed-off-by: George Dunlap Acked-by: Wei Liu > --- > CC: Ian Campbell > CC: Ian Jackson > CC: Wei Liu > CC: Roger Pau Monne > > There was some concern that old udev scripts may end up lying around > in /etc which will still trigger and run unless libxl/disable_udev > exists. > It's certainly not making things worse, right? I think it's user's responsibility to make sure the installation is clean. It's the same as he / she should avoid having stale libraries around. > If that's a concern, then for one release we might consider writing > libxl/disable_udev manually in xencommons or something to make sure > that they don't trigger. > --- > tools/configure | 13 ++++++------- [...] > } > libxl_vminfo_list_free(vm_list, nb_vm); > - int hotplug_setting = libxl__hotplug_settings(gc, t); > - if (hotplug_setting < 0) { > - LOG(ERROR, "unable to get current hotplug scripts execution setting"); > - rc = ERROR_FAIL; > - goto out; > - } > - if (libxl_defbool_val(info->run_hotplug_scripts) != hotplug_setting && > - (nb_vm - 1)) { > - LOG(ERROR, "cannot change hotplug execution option once set, " > - "please shutdown all guests before changing it"); > - rc = ERROR_FAIL; > - goto out; > - } > - > - if (libxl_defbool_val(info->run_hotplug_scripts)) { > - rc = libxl__xs_write_checked(gc, t, DISABLE_UDEV_PATH, "1"); > - if (rc) { > - LOGE(ERROR, "unable to write %s = 1", DISABLE_UDEV_PATH); > - goto out; > - } > - } else { > - rc = libxl__xs_rm_checked(gc, t, DISABLE_UDEV_PATH); > - if (rc) { > - LOGE(ERROR, "unable to delete %s", DISABLE_UDEV_PATH); > - goto out; > - } Heh, looks like this is buggy as it is -- every guest shares the same node. I.e. if a guest has run_hotplug_script in xl config file it can overwrite that node easily. Wei.