Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Mar 2016 12:08:54 +0100
From:      =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@citrix.com>
To:        =?UTF-8?Q?Gustau_P=C3=A9rez?= <gustau.perez@gmail.com>
Cc:        FreeBSD XEN <freebsd-xen@freebsd.org>, =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= <roger.pau@citrix.com>
Subject:   Re: Porting the block-iscsi hotplug script
Message-ID:  <alpine.OSX.2.20.1603221208230.24317@macbook-air-de-roger.local>
In-Reply-To: <56EAA788.3020404@gmail.com>
References:  <553DEB97.5000300@entel.upc.edu> <56C6FA2F.8040900@gmail.com> <56CAC8CB.8030107@gmail.com> <56CADEDA.4050007@citrix.com> <56CB0057.1060509@gmail.com> <56CB041E.1020009@citrix.com> <56CB2D90.5080809@gmail.com> <56CB34BA.6060809@citrix.com> <56CC24BD.6050609@gmail.com> <56CC32E5.5010101@citrix.com> <56CC7637.3080408@gmail.com> <56CF5668.6090605@citrix.com> <56D0091F.80408@gmail.com> <56D02863.7040100@citrix.com> <56D03D95.9090509@gmail.com> <56D04E5F.8070901@citrix.com> <56D42A28.8050701@gmail.com> <56D434FC.8030905@citrix.com> <56D57110.2060406@gmail.com> <56D587D8.6030702@citrix.com> <56D590EA.609@gmail.com> <56D591BA.4020303@gmail.com> <56D5929F.7040001@citrix.com> <56D5C722.3080205@gmail.com> <56D6B68D.8080809@citrix.com> <56D7FEFE.9050000@gmail.com> <alpine.OSX.2.20.1603041055250.20397@mac> <56D97762.7000908@gmail.com> <alpine.OSX.2.20.1603041647160.22025@mac> <56E84043.4060602@gmail.com> <56EAA788.3020404@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 17 Mar 2016, Gustau Pérez wrote: 
> >   finally $WORK gave me a few time to spend and I managed to have
> > something that works with 'sh' (ash). It'd need some comments here and
> > there, but it works. I'll post the scripts somewhere when I got time, or
> > would you prefer diff?
> >
> 
>    HI Roger,
> 
>    here [1], [2] there are the first versions of the block and locking
> scripts. Perhaps those scripts need more comments, I don't know. I did
> not have much time these days, that's why it took me a bit.
> 
>    OTOH I'm not sure if there is any xen programming style I needed to
> follow. If so let me know.

Hello,

I've been on vacations last week and I'm trying to catch up with my email 
backlog, sorry for the delay in the reply.

OTOH, George Dunlap from Citrix has posted the series that should enable 
hotplug scripts to work with HVM domains. I need to rebase my FreeBSD 
hotplug script support on top of it, so you can try it. George's series 
can be found at:

http://lists.xenproject.org/archives/html/xen-devel/2016-03/msg02739.html

I will try to rebase my work on top of this and provide you with a git 
branch so you can easily test it.

Regarding your questions about the locking mechanism, I'm not that 
familiar with it, but I'm not sure why a lock array is need. AFAICT only 
one lock should be needed, that prevents multiple hotplug scripts from 
travessing the xenstore disk information at the same time. Please bring 
this question to xen-devel.

> [1] http://pastebin.com/FhaQeuG1
> [2] http://pastebin.com/ZHWKRg5f

LGTM :). You will have to formally submit this as patches when the hotplug 
work is committed to upstream Xen.

Roger.
From owner-freebsd-xen@freebsd.org  Wed Mar 23 09:27:38 2016
Return-Path: <owner-freebsd-xen@freebsd.org>
Delivered-To: freebsd-xen@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF15B99A501
 for <freebsd-xen@mailman.ysv.freebsd.org>;
 Wed, 23 Mar 2016 09:27:38 +0000 (UTC)
 (envelope-from gustau.perez@gmail.com)
Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com
 [IPv6:2a00:1450:400c:c09::22c])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 5F2651047
 for <freebsd-xen@freebsd.org>; Wed, 23 Mar 2016 09:27:38 +0000 (UTC)
 (envelope-from gustau.perez@gmail.com)
Received: by mail-wm0-x22c.google.com with SMTP id l68so15139469wml.1
 for <freebsd-xen@freebsd.org>; Wed, 23 Mar 2016 02:27:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding;
 bh=JUeoZRjPxbd1dQ36W+ZqyNndQ8Zy3aDXuh6OuRpv2TM=;
 b=lgBszufEZGnjqM+drsKGWpYG/FQ3HRirg6Vx56aK53I8PVDqVzVdPEqKNKdnOvHS/q
 7rzapwxdzqdlu5nyDPUBk/KMyVeeUO+jWgCvQn+LKux8iLGZ6h/MCH0shhXasasqiXQC
 1pt2ynaYVbd6XgamAuCkBQs2DvgTpElroeENh0DR05VyhTap1htPWorhsIHvF2tR9VZt
 G++XVwIX4T+XOTrqqpdeQvVErej+VxxDa8Iw7kRQMWpIhu2+E9OtXue0BVhoqQDYnZaI
 VnYOwQY+3qSWn7MDypHgkPqa9okFoIagUYglWltjVxeqVT4dfCE8BO+9p6KTLvZZX8g4
 eUsw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:subject:to:references:cc:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-transfer-encoding;
 bh=JUeoZRjPxbd1dQ36W+ZqyNndQ8Zy3aDXuh6OuRpv2TM=;
 b=AXaMUpii6RnuK0LBiG8biax0ESqiUZsGlJt61jLf2B3qXKUGj2qXI3j99TgWYHRpHi
 eTrTPqQYnmL74xu5WKV/ahKRmRNh0xl7FaH34+P13VSsAf31QgIlDiQJfyDYLCQ5BotJ
 q81mOuyZGYOooBW4VEnHmmmYjZcNV4pQiyoRx2uA2YgCTm5OlxonkCbgz+DEoF3Z8zhY
 xElQHTNMS6rRGoIhoteTuNRXIPye7zyilkTp4iNk+pfZpBReO7h9F8l/ldia896q7BW8
 frkbNpyGo4ah92y3Hk2xOVjD7iRLRiML0dzKwa2eV9q8ybCEEkgqnaKsv/u6CFBfSeqZ
 NSrw==
X-Gm-Message-State: AD7BkJL4q1IYuJSwsX4EUTk3RGWIz4okrNXQ8vDxSQlfDfsJULwmBGrQN/yHDi+rLp9+RQ==
X-Received: by 10.194.82.66 with SMTP id g2mr2130054wjy.161.1458725256865;
 Wed, 23 Mar 2016 02:27:36 -0700 (PDT)
Received: from [192.168.44.88] (p5DDB5CF7.dip0.t-ipconnect.de. [93.219.92.247])
 by smtp.googlemail.com with ESMTPSA id lz5sm1612204wjb.5.2016.03.23.02.27.35
 (version=TLSv1/SSLv3 cipher=OTHER);
 Wed, 23 Mar 2016 02:27:36 -0700 (PDT)
Subject: Re: Porting the block-iscsi hotplug script
To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <roger.pau@citrix.com>
References: <553DEB97.5000300@entel.upc.edu> <56CAC8CB.8030107@gmail.com>
 <56CADEDA.4050007@citrix.com> <56CB0057.1060509@gmail.com>
 <56CB041E.1020009@citrix.com> <56CB2D90.5080809@gmail.com>
 <56CB34BA.6060809@citrix.com> <56CC24BD.6050609@gmail.com>
 <56CC32E5.5010101@citrix.com> <56CC7637.3080408@gmail.com>
 <56CF5668.6090605@citrix.com> <56D0091F.80408@gmail.com>
 <56D02863.7040100@citrix.com> <56D03D95.9090509@gmail.com>
 <56D04E5F.8070901@citrix.com> <56D42A28.8050701@gmail.com>
 <56D434FC.8030905@citrix.com> <56D57110.2060406@gmail.com>
 <56D587D8.6030702@citrix.com> <56D590EA.609@gmail.com>
 <56D591BA.4020303@gmail.com> <56D5929F.7040001@citrix.com>
 <56D5C722.3080205@gmail.com> <56D6B68D.8080809@citrix.com>
 <56D7FEFE.9050000@gmail.com> <alpine.OSX.2.20.1603041055250.20397@mac>
 <56D97762.7000908@gmail.com> <alpine.OSX.2.20.1603041647160.22025@mac>
 <56E84043.4060602@gmail.com> <56EAA788.3020404@gmail.com>
 <alpine.OSX.2.20.1603221208230.24317@macbook-air-de-roger.local>
Cc: FreeBSD XEN <freebsd-xen@freebsd.org>
From: =?UTF-8?Q?Gustau_P=c3=a9rez?= <gustau.perez@gmail.com>
Message-ID: <56F26186.7070400@gmail.com>
Date: Wed, 23 Mar 2016 10:27:34 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.7.0
MIME-Version: 1.0
In-Reply-To: <alpine.OSX.2.20.1603221208230.24317@macbook-air-de-roger.local>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-BeenThere: freebsd-xen@freebsd.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion of the freebsd port to xen - implementation and usage
 <freebsd-xen.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-xen>,
 <mailto:freebsd-xen-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-xen/>;
List-Post: <mailto:freebsd-xen@freebsd.org>
List-Help: <mailto:freebsd-xen-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-xen>,
 <mailto:freebsd-xen-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Mar 2016 09:27:38 -0000



El 22/03/16 a les 12:08, Roger Pau Monné ha escrit:
> Hello, I've been on vacations last week and I'm trying to catch up
> with my email backlog, sorry for the delay in the reply. OTOH, George
> Dunlap from Citrix has posted the series that should enable hotplug
> scripts to work with HVM domains. I need to rebase my FreeBSD hotplug
> script support on top of it, so you can try it. George's series can be
> found at:
> http://lists.xenproject.org/archives/html/xen-devel/2016-03/msg02739.html
> I will try to rebase my work on top of this and provide you with a git
> branch so you can easily test it. Regarding your questions about the
> locking mechanism, I'm not that familiar with it, but I'm not sure why
> a lock array is need. AFAICT only one lock should be needed, that
> prevents multiple hotplug scripts from travessing the xenstore disk
> information at the same time. Please bring this question to xen-devel. 

   Hi Roger,

   great someone is working on HVM hotplug script support (even though I
would have loved to deal with that by myself). So to recap, the plan
would something like:

  * wait for you to rebase the George's hotplug script support for HVM
    and create an specific branch for me
  * test the hotplug scripts over that work to check if the scripts work
    for both HVM and PV domains
  * in the meantime, if the script looks good, perhaps it could be added
    to the xen-tools port while it's been accepted upstream. I'd do git
    patches, anything special I'd need to know when doing the patches
    with git (formating, etc?) Do the message need to state any kind of
    license?

  About the locking mechanism, I'll ask at xen-devel. The Linux script
says the locking mechanism works not among processes but among fds,
which seemed bit strange to me. Instead I decided to lock between
processes, implementing reentrant mutexes (the release function checks
if the lock is being help multiple times, if released lock is being held
one time, the file is removed).

   I'll ask next week in xen-devel. Anything else I can do?

   Best,

   Gustau

>> [1] http://pastebin.com/FhaQeuG1
>> [2] http://pastebin.com/ZHWKRg5f
> LGTM :). You will have to formally submit this as patches when the hotplug 
> work is committed to upstream Xen.
>
> Roger.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.OSX.2.20.1603221208230.24317>