xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@darnok.org>
To: Wei Liu <wei.liu2@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Ian Jackson <ian.jackson@citrix.com>,
	xen-devel@lists.xen.org, Ian Campbell <ian.campbell@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 2/6] libxl: Remove linux udev rules
Date: Tue, 14 Jul 2015 12:13:20 -0400	[thread overview]
Message-ID: <20150714161320.GA21149@andromeda.dapyr.net> (raw)
In-Reply-To: <20150707113952.GT1134@zion.uk.xensource.com>

On Tue, Jul 07, 2015 at 12:39:52PM +0100, Wei Liu wrote:
> 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.

This introduces an regression. The 'daemon for driverdomains'
is xenbackendd - which only gets built for NetBSD.

That means we can't do Linux driver domains anymore with this patch.


> > 
> > 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 <george.dunlap@eu.citrix.com>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>
> 
> > ---
> > CC: Ian Campbell <ian.campbell@citrix.com>
> > CC: Ian Jackson <ian.jackson@citrix.com>
> > CC: Wei Liu <wei.liu2@citrix.com>
> > CC: Roger Pau Monne <roger.pau@citrix.com>
> > 
> > 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.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2015-07-14 16:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 10:51 [PATCH 0/6] Use system blktap George Dunlap
2015-07-06 10:51 ` [PATCH 1/6] libxl: Make local_initiate_attach more rational George Dunlap
2015-07-06 10:51 ` [PATCH 2/6] libxl: Remove linux udev rules George Dunlap
2015-07-07 11:39   ` Wei Liu
2015-07-14 16:13     ` Konrad Rzeszutek Wilk [this message]
2015-07-14 16:21       ` Ian Campbell
2015-07-14 16:35         ` George Dunlap
2015-07-14 16:40           ` Wei Liu
2015-07-14 16:48             ` Ian Campbell
2015-07-23 11:55               ` Roger Pau Monné
2015-07-23 12:30                 ` Ian Campbell
2015-07-15 11:07         ` [PATCH for-4.6] tools/hotplug: Add an initscript to start "xl devd" in a driver domain Ian Campbell
2015-07-15 13:26           ` Wei Liu
2015-07-15 13:40             ` Ian Campbell
2015-07-15 15:25           ` George Dunlap
2015-07-15 15:32           ` Ian Jackson
2015-07-15 15:35             ` George Dunlap
2015-07-15 15:37               ` Ian Campbell
2015-07-16 16:58         ` [PATCH for-4.6 v2] " Ian Campbell
2015-07-16 17:09           ` Ian Jackson
2015-07-16 17:48           ` Wei Liu
2015-07-17  9:05           ` Wei Liu
2015-07-17 11:36             ` Ian Campbell
2015-07-20 14:16           ` Roger Pau Monné
2015-07-20 14:28             ` Ian Campbell
2015-07-06 10:51 ` [PATCH 3/6] tools: Add a block-tap script for setting up tapdisks via tap-ctl George Dunlap
2015-07-07 12:03   ` Wei Liu
2015-07-07 12:35     ` Wei Liu
2015-07-06 10:51 ` [PATCH 4/6] libxl: Use the block-tap script for LIBXL_DISK_BACKEND_TAP George Dunlap
2015-07-06 11:01   ` Andrew Cooper
2015-07-06 12:39     ` George Dunlap
2015-07-07 12:29   ` Wei Liu
2015-07-07 13:41     ` George Dunlap
2015-07-07 14:20       ` Ian Campbell
2015-07-07 14:27         ` George Dunlap
2015-07-06 10:51 ` [PATCH 5/6] tools: Remove in-tree blktap2 George Dunlap
2015-07-07 11:55   ` Wei Liu
2015-07-06 10:51 ` [PATCH 6/6] libxl: Add more logging to hotplug script path George Dunlap
2015-07-07 11:55   ` Wei Liu
2015-07-07 14:21 ` [PATCH 0/6] Use system blktap Ian Campbell
2015-07-07 14:24   ` George Dunlap
2015-07-07 14:52     ` Ian Campbell
2015-07-07 14:59       ` George Dunlap
2015-07-07 15:04         ` Ian Campbell
2015-07-07 15:20 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150714161320.GA21149@andromeda.dapyr.net \
    --to=konrad@darnok.org \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).