From owner-freebsd-xen@freebsd.org Mon Feb 29 11:23:25 2016 Return-Path: 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 4E79BAB8448 for ; Mon, 29 Feb 2016 11:23:25 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (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 D2BF7E9C for ; Mon, 29 Feb 2016 11:23:24 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x229.google.com with SMTP id l68so53917693wml.1 for ; Mon, 29 Feb 2016 03:23:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to; bh=v8XfBrhwcqvDSK5/emvnnFXWkT7QXYOI+gpkueMUsSI=; b=cCSswsLJBWDzUKYGazud1UuuYCkUTsF3BMGwDcZFI5XQAGrvRGHX5totzFjhf+Cd2l BYIDRVETO9c2Yk9drfAbZuqgzYW32LfSm6lgudo2yNb+jPTgui0RbFEFbQettix8qMAa QCDBt1caW3NcclQJP5jUKynv9srd6Fzwj5B8WJX6ttpuQD7jOuEfyJHAOeuTegxNGUxM aMbrIhSNbJxeT73lh7exugYpXO/ZblIEHzXdVRQga1FZcXnPe30zA8JBO8769TRE9liV j8FOvHfefj7pt74perEl2mZn+szUCPm5WdyyHUJYwwDunwvzxeszFZn+Q0JxVclcKPv2 e0YQ== 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:from:cc:message-id:date :user-agent:mime-version:in-reply-to; bh=v8XfBrhwcqvDSK5/emvnnFXWkT7QXYOI+gpkueMUsSI=; b=Py9xBenZ6M8u977bzOJk20KI7pstVumL7jdl+nm4aopsNZTu36ArUR94+ErwVajhYF LR1x2xeka/yelZFTd2j2XkYMjjUdI218h0Xml4CsujpiH6qpwA6fxFrfXfAkfLZA1xNu ejppS/9oDebk5wXS9n61wGm78vu9EuTVd7SzDX0zViIWapZe36Z2ErULV2kg+zavMC6g hN2zOAZTrZpTb4JZU29FPgusqGrWuJ7qXoZQtIocjeiGL8BdDFYaieoRTtTiUFY/1gQQ pls7DorjbyIs7E2clZoWkaTILl554fPazpjjAD5myJuFlT/Rf89CBP7sr+q+2u9gSJid oecA== X-Gm-Message-State: AD7BkJJLCdsIDTg1iJOjBDk/an7ZmBLFe8pbQYvajrK/ReNJUH88Lr8hbpfMDzuyJwcjmQ== X-Received: by 10.28.127.150 with SMTP id a144mr10291083wmd.25.1456745002086; Mon, 29 Feb 2016 03:23:22 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id l7sm25498349wjx.14.2016.02.29.03.23.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Feb 2016 03:23:21 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= X-Enigmail-Draft-Status: N1110 Message-ID: <56D42A28.8050701@gmail.com> Date: Mon, 29 Feb 2016 12:23:20 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D04E5F.8070901@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 11:23:25 -0000 El 26/02/16 a les 14:08, Roger Pau Monné ha escrit: > It shouldn't be too hard, as I said the code is already there. The > only issue I foresee is that you will have to find somewhere to store > the information about the disk you have locally-attached, so you can > remove it when the guest is destroyed. Hi Roger, I applied the hotplug patches to xen-[kernel|tools] and the machine is stable. However, when I try to create a HVM domU domain with a simple block script it fails (. I have some questions: * The arguments of the block script are path and action, am I right? * Do the block scripts for Linux and NetBSD receive the same arguments as the FreeBSD script? * I see the device has a type (phy, file, iscsi) in the definition of the domain, but I'm not sure how to check its type in the block script (I can check if the file is a block device or a regular file, but what about iscsi?, check if the target param is set?) * Also. I have a domain defined with two disks. In the block script I try to execute xenstore-ls and I'd expect to see two disks there, but there's only the first one. I assume this is because the block script is called for each disk in the domain definition Finally, I ended having a disk defined in the xenstore (/var/db/xenstore) which I can't remove. I removed xen-tools and removed /var/db/xen{store} but it keeps complaining. I'd have expected that the store was under /var/db/ but perhaps I'm missing something. Thank you, Gustau From owner-freebsd-xen@freebsd.org Mon Feb 29 12:09:43 2016 Return-Path: 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 318F2AB6900 for ; Mon, 29 Feb 2016 12:09:43 +0000 (UTC) (envelope-from prvs=8606a7394=roger.pau@citrix.com) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9B4A677 for ; Mon, 29 Feb 2016 12:09:42 +0000 (UTC) (envelope-from prvs=8606a7394=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.22,520,1449532800"; d="scan'208";a="335259277" Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Gustau_P=c3=a9rez?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <56D434FC.8030905@citrix.com> Date: Mon, 29 Feb 2016 13:09:32 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D42A28.8050701@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 12:09:43 -0000 El 29/2/16 a les 12:23, Gustau Pérez ha escrit: > > > El 26/02/16 a les 14:08, Roger Pau Monné ha escrit: >> It shouldn't be too hard, as I said the code is already there. The >> only issue I foresee is that you will have to find somewhere to store >> the information about the disk you have locally-attached, so you can >> remove it when the guest is destroyed. > > Hi Roger, > > I applied the hotplug patches to xen-[kernel|tools] and the machine > is stable. However, when I try to create a HVM domU domain with a simple > block script it fails (. As we spoke previously, HVM domains don't support hotplug scripts. Or are you trying to get them to work? (ie: you have performed other changes in order to enable this?) > I have some questions: > > * The arguments of the block script are path and action, am I right? Yes, but keep in mind that 'path' is the xenstore backend path of the device, something like: /local/domain/0/backend/vbd/7/768 > * Do the block scripts for Linux and NetBSD receive the same arguments > as the FreeBSD script? No, sadly each OS has their own way of doing this. For example Linux passes a bunch of extra information using ENV variables, which I would like to avoid since all this information that Linux passes around in the environment can be fetched from xenstore without issues. > * I see the device has a type (phy, file, iscsi) in the definition of > the domain, but I'm not sure how to check its type in the block > script (I can check if the file is a block device or a regular file, > but what about iscsi?, check if the target param is set?) This is confusing, and refers to the backend that's used to handle the disk. In your case backend in always 'phy', which means blkback. The 'phy' backend is the only one that supports hotplug scripts. In the past, some prefixes (like iscsi) where shortcuts for block scripts, so the line: iscsi: Was equivalent to: script=block-iscsi,target= This is not recommended anymore, so just forget about the prefixes. > * Also. I have a domain defined with two disks. In the block script I > try to execute xenstore-ls and I'd expect to see two disks there, > but there's only the first one. I assume this is because the block > script is called for each disk in the domain definition Yes, the block script is called for each disk, the first argument (the xenstore backend path) is going to be different for each invocation. > Finally, I ended having a disk defined in the xenstore > (/var/db/xenstore) which I can't remove. I removed xen-tools and removed > /var/db/xen{store} but it keeps complaining. I'd have expected that the > store was under /var/db/ but perhaps I'm missing something. Weird, you should be able to remove the disk entries in xenstore by using xenstore-rm . Rebooting the host will also completely clear the xenstore database. Can you paste the error message that you are seeing? Roger. From owner-freebsd-xen@freebsd.org Tue Mar 1 10:38:13 2016 Return-Path: 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 2591FABEECE for ; Tue, 1 Mar 2016 10:38:13 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 BB96D1A04 for ; Tue, 1 Mar 2016 10:38:12 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id l68so27049371wml.1 for ; Tue, 01 Mar 2016 02:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=ZgAe9iXn95GoG3DsLxHgg7hptbQnCXxwHKMNGru4Sv0=; b=IERSUo5JzZdGV3Ox8/walzeCQyvJfebgUcUVlxXV3u+m1zSjyZFMNniEepPA1NpKwF GpWeIWZYtkRC9CPGPuELNt8e2P1w9BCCjHHcbirxG1jDdEpAnfAGHhfSXPM6RzpUFHy3 TR75WXo+m70bStDtdUXe6SbDHHXdRJIvKtKkTzJirBqgfMqpn6VDD3I56xz0KvV26I/q Beee/M51QVn/lAAQ8N4LqmjG/8QgcYSszOKk54neS/C+MCj+E3+J7g5WTLUgxW7JKs97 sJ/eaxXGUSD+gNzzUucWG9UnQjZM1XVlODnQPe4UMZm2jbC50r94HaM7fhBzPQCL+T6K tjbw== 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:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ZgAe9iXn95GoG3DsLxHgg7hptbQnCXxwHKMNGru4Sv0=; b=EkBHVs9hZp9VunZh8r5R2hRnD6fbMGmO4/S62ZLpF3njP+hfLVfJTWfV53ql8sBjoQ Uwx6PZ6oAVc8uRyYmRuTq+aFcUKCR/fCHAZ8rQCYWHwUiE/i2VCc5F/u1N2fD+diYSi/ XGP10NMLqQ7zLjUog9BuzUgo8Y7oFaGxt4SViI2exR5o7P/gEtybfFkQZYeQeE+RHPMh wpY3NGLXKZ27YbHM193OmdQzlKNWnNFA20t76cWdpaw7fsELlc9R93LwpiJlDSr7lSHM fEcH3galqpwLaA2dd0pRssP4lZHPBG29YqO/2qTRBqvk38fJnUf1p8mjnuk8CmrzSIyl 07Nw== X-Gm-Message-State: AD7BkJIrUS8su/19m0mZGnrr75cz9v6EqFJmwUm3memOdREUMnYgKNT+BN85TQ/Ai7uyQA== X-Received: by 10.28.130.6 with SMTP id e6mr2948865wmd.71.1456828691140; Tue, 01 Mar 2016 02:38:11 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id n131sm20671901wmf.9.2016.03.01.02.38.09 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Mar 2016 02:38:10 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= X-Enigmail-Draft-Status: N1110 Message-ID: <56D57110.2060406@gmail.com> Date: Tue, 1 Mar 2016 11:38:09 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D434FC.8030905@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 10:38:13 -0000 El 29/02/16 a les 13:09, Roger Pau Monné ha escrit: > As we spoke previously, HVM domains don't support hotplug scripts. Or > are you trying to get them to work? (ie: you have performed other > changes in order to enable this?) You're completely right about the HVM domain support for hotpluging. The thing, when I first tried xen to see if it was stable, I did the test with an HVM domain and xen complained about the block script not being available. So I assumed that even the domain was an HVM, the hotplug was being called. >> * I see the device has a type (phy, file, iscsi) in the definition of >> the domain, but I'm not sure how to check its type in the block >> script (I can check if the file is a block device or a regular file, >> but what about iscsi?, check if the target param is set?) > This is confusing, and refers to the backend that's used to handle the > disk. In your case backend in always 'phy', which means blkback. The > 'phy' backend is the only one that supports hotplug scripts. > > In the past, some prefixes (like iscsi) where shortcuts for block > scripts, so the line: > > iscsi: > > Was equivalent to: > > script=block-iscsi,target= > > This is not recommended anymore, so just forget about the prefixes. Thank you for the explanation. I would said to me this may some some love, but perhaps I'm wrong. >> * Also. I have a domain defined with two disks. In the block script I >> try to execute xenstore-ls and I'd expect to see two disks there, >> but there's only the first one. I assume this is because the block >> script is called for each disk in the domain definition > Yes, the block script is called for each disk, the first argument (the > xenstore backend path) is going to be different for each invocation. I'd assume this would lead to two different branches (or paths) in the xenstore tree. > >> Finally, I ended having a disk defined in the xenstore >> (/var/db/xenstore) which I can't remove. I removed xen-tools and removed >> /var/db/xen{store} but it keeps complaining. I'd have expected that the >> store was under /var/db/ but perhaps I'm missing something. > Weird, you should be able to remove the disk entries in xenstore by > using xenstore-rm . Rebooting the host will also > completely clear the xenstore database. Can you paste the error message > that you are seeing? > I tried deleting the xen-tools package and then deleting /var/db/xen*. After that I rebooted (there was two xenstore processes, I'd say one is the kernel side process and the other the user space process, whose binary is installed by the xen-tools port). Finally I installed the xen-tools. But the error remains. The error can be found at [1]. I know this is an HVM domain, but I would say those are two completely unrelated problems. Thanks for your support, Gustau [1] http://pastebin.com/2xa2g0wx From owner-freebsd-xen@freebsd.org Tue Mar 1 12:15:57 2016 Return-Path: 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 AB427AB64C2 for ; Tue, 1 Mar 2016 12:15:57 +0000 (UTC) (envelope-from prvs=8619cf47e=roger.pau@citrix.com) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 574151759 for ; Tue, 1 Mar 2016 12:15:56 +0000 (UTC) (envelope-from prvs=8619cf47e=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.22,523,1449532800"; d="scan'208";a="342173222" Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Gustau_P=c3=a9rez?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <56D587D8.6030702@citrix.com> Date: Tue, 1 Mar 2016 13:15:20 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D57110.2060406@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 12:15:57 -0000 El 1/3/16 a les 11:38, Gustau Pérez ha escrit: > > > El 29/02/16 a les 13:09, Roger Pau Monné ha escrit: >> As we spoke previously, HVM domains don't support hotplug scripts. Or >> are you trying to get them to work? (ie: you have performed other >> changes in order to enable this?) > > You're completely right about the HVM domain support for hotpluging. > The thing, when I first tried xen to see if it was stable, I did the > test with an HVM domain and xen complained about the block script not > being available. So I assumed that even the domain was an HVM, the > hotplug was being called. Yes, hotplug scripts are also being called for HVM domains, it's just that the disk command line passed to QEMU when using hotplug scripts is wrong and QEMU fails to starts, and the domain creation of course fails. >>> * I see the device has a type (phy, file, iscsi) in the definition of >>> the domain, but I'm not sure how to check its type in the block >>> script (I can check if the file is a block device or a regular file, >>> but what about iscsi?, check if the target param is set?) >> This is confusing, and refers to the backend that's used to handle the >> disk. In your case backend in always 'phy', which means blkback. The >> 'phy' backend is the only one that supports hotplug scripts. >> >> In the past, some prefixes (like iscsi) where shortcuts for block >> scripts, so the line: >> >> iscsi: >> >> Was equivalent to: >> >> script=block-iscsi,target= >> >> This is not recommended anymore, so just forget about the prefixes. > > Thank you for the explanation. I would said to me this may some some > love, but perhaps I'm wrong. We have deprecated the usage of all those prefixes, so I would just ignore them completely and only use the default syntax. >>> * Also. I have a domain defined with two disks. In the block script I >>> try to execute xenstore-ls and I'd expect to see two disks there, >>> but there's only the first one. I assume this is because the block >>> script is called for each disk in the domain definition >> Yes, the block script is called for each disk, the first argument (the >> xenstore backend path) is going to be different for each invocation. > > I'd assume this would lead to two different branches (or paths) in > the xenstore tree. Yes, if you have two different disks in your configuration file you will have two different paths in xenstore in order to describe them. >> >>> Finally, I ended having a disk defined in the xenstore >>> (/var/db/xenstore) which I can't remove. I removed xen-tools and removed >>> /var/db/xen{store} but it keeps complaining. I'd have expected that the >>> store was under /var/db/ but perhaps I'm missing something. >> Weird, you should be able to remove the disk entries in xenstore by >> using xenstore-rm . Rebooting the host will also >> completely clear the xenstore database. Can you paste the error message >> that you are seeing? >> > I tried deleting the xen-tools package and then deleting > /var/db/xen*. After that I rebooted (there was two xenstore processes, > I'd say one is the kernel side process and the other the user space > process, whose binary is installed by the xen-tools port). Finally I > installed the xen-tools. But the error remains. The error can be found > at [1]. Hm, this is weird. First things first, you should only have one xenstored process running in Dom0, so when doing a ps aux you should see: root 675 0.0 0.1 23100 2548 - I 12:21 0:00.69 /usr/local/sbin/xenstored --pid-file... But only one of those lines, if you have more than one, something is clearly wrong. Can you check if you maybe have duplicated init scripts in /etc/rc.d and /usr/local/etc/rc.d? Then, can you paste the output of `xenstore-ls -fp` before creating the domain that's giving you the error? If you can paste the config file of the domain that might also help tracking this down. Roger. From owner-freebsd-xen@freebsd.org Tue Mar 1 12:54:05 2016 Return-Path: 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 C9143ABD669 for ; Tue, 1 Mar 2016 12:54:05 +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 57B621A81 for ; Tue, 1 Mar 2016 12:54:05 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x22c.google.com with SMTP id l68so35239973wml.0 for ; Tue, 01 Mar 2016 04:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=VDU65XI27TumprDo/60B8w0f4twlmLW6mQxoRkly/ws=; b=jCtx5dJFc0dDlIRXSh0w9a4h37FzDB3XtgaGlRFk5BZofpz6ZGf7P3fz8XMpRk5x+Q RRdRoou4v4Mo9y3n/N4N2MVRD9Z/T6JtuOm3VPnpQ5n4D5yfptddogPEJi2rO34cAxCJ N4CQ74xD5d/TLaWE5wKG9qCbMVcIHJxPUtAb0qr4cLGE4mqbost/OgVyBeXfBKKR8S8Y N+nWXbOxChv7s/3K+XcrSMs96V9xi9WlCDL2Bd4j3wSXBvTG+PvDyb4Qyf9E8/vxStmj jBstsLKQkgQNk+0tHgCVDb9VrEOxbEsnrTbz/Bo+XAFYtUAJEEDUbpLoRPYDa9myyOKh GGPQ== 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:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=VDU65XI27TumprDo/60B8w0f4twlmLW6mQxoRkly/ws=; b=J54pJhFQe7ywKxiUd8wKSQxJOhHPB1LeT8XkNHh7twSedxoueS7XfGb4bF8U824UwV rUI4cDzzMY6HT98iQiB3oC6Vs87I7iik5HnbgRpr8Ww/badfI+JMXvhnHXum9a34FUnM 5U1T4Fd3KJ+Q6S37bxeBh8NnnYfIWvGtuKFHP2oOHm7KGolYXW3KcjMsWnmd6xgBU9WG IHVdVzpxHsWS4GbTeD80un+ZSCT5En0RtywUC+/OPA7B199mFQONqc2eMy+wgcIhHy4u vtMtCA4Km4NYTIbt9s13GtY1DrwWey8NgoJQWh4SCvggMt/NgGfu8kc365wkWQn0MCVv IMsg== X-Gm-Message-State: AD7BkJKFOx/gHjSnStIgp9S/DaUKSVysvH+L/bpwrdEFmmLeeTuyCAVxJYP3BQhPyAxsWw== X-Received: by 10.28.91.142 with SMTP id p136mr3708321wmb.76.1456836843798; Tue, 01 Mar 2016 04:54:03 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id ei9sm30925531wjd.40.2016.03.01.04.54.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Mar 2016 04:54:02 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= X-Enigmail-Draft-Status: N1110 Message-ID: <56D590EA.609@gmail.com> Date: Tue, 1 Mar 2016 13:54:02 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D587D8.6030702@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 12:54:06 -0000 El 1/03/16 a les 13:15, Roger Pau Monné ha escrit: >> I tried deleting the xen-tools package and then deleting >> /var/db/xen*. After that I rebooted (there was two xenstore processes, >> I'd say one is the kernel side process and the other the user space >> process, whose binary is installed by the xen-tools port). Finally I >> installed the xen-tools. But the error remains. The error can be found >> at [1]. > Hm, this is weird. First things first, you should only have one > xenstored process running in Dom0, so when doing a ps aux you should see: > > root 675 0.0 0.1 23100 2548 - I 12:21 0:00.69 > /usr/local/sbin/xenstored --pid-file... This is the output of `ps axuw|grep xenstored|grep -v grep`: root 4549 0,0 0,1 12772 3124 - I 10:53 0:00,20 /usr/local/sbin/xenstored --pid-file /var/run/xenstored.pid > > But only one of those lines, if you have more than one, something is > clearly wrong. Can you check if you maybe have duplicated init scripts > in /etc/rc.d and /usr/local/etc/rc.d? > > Then, can you paste the output of `xenstore-ls -fp` before creating the > domain that's giving you the error? If you can paste the config file of > the domain that might also help tracking this down. Sure, [1] is the output of the xenstore-ls -fp and [2] is the config of the domain. Also, the block script [3] is so simple that it does nothing. Thank you for your help, Gustau [1] http://pastebin.com/g4W8wTPW [2] http://pastebin.com/Zb1gUjF1 [3] http://pastebin.com/NHqCcCN7 From owner-freebsd-xen@freebsd.org Tue Mar 1 12:57:33 2016 Return-Path: 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 A854DABD740 for ; Tue, 1 Mar 2016 12:57:33 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 373C81B17 for ; Tue, 1 Mar 2016 12:57:33 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id l68so34205133wml.0 for ; Tue, 01 Mar 2016 04:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=ZuicdK44ab+ncl40Rd/mW7ydGTbf6WMDZt1TWko3rzc=; b=UsN+2BWSRePawEbzYRVPgzVhHj0SYzG8B3Mea0shp4pjaaXSME/ZkR5SiczGBtAQ4T vdX7z499hPC8G3UC8/5a/91aAOuD7xGFbrFqdL3US+gLuZ/9tJS9hMX5kuvd0OAAjEJ+ wDZvjItz3LkgbT9K0O323AhQlExL7m6IxuAfEoDqDZnQkId9O4EUQD99ZyoQDV2wful/ tqE1yNWJ+VSeKstOOXvH4PI79StrHMR8Nr5y4fbXUsWQDpw/JXhzmoTtLJNHtFvudU5s n9bS4xrerqLQema4rFo2Q3Hk0aNUs3hJbCsdozPzX7fgY/mKqLriajhlb935LjxsbQQK JrhQ== 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:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ZuicdK44ab+ncl40Rd/mW7ydGTbf6WMDZt1TWko3rzc=; b=f0y3RewB/XTGW9vKINuXlAwSPamYFYIUZ3R3hKOoonEXUF7wVAEv+s+ZfCVJEwFsnp 3qleatTaqDaXPo1aHprP/z6/u3YDm+D9W0gGyNei/osgJh/0uMOWpHQUM84RgNsOrNzw yz00eiTsecmLh2HDudYFmQZblu1ZDRZT+FGIE4Qjiwfm9zLpDfETV22WuQEY2SYlEQ9P 9Dmyf0SQOxJQpBbIJU1e3q7T2AnckzKByuNl2zdgycsHCvH9jfX0nqcWkAT4vts7Z/g8 GLMszSq97HXZu8srFi3lv0fXIEHn1VAM0/PA87FAtHWvYVmbeTBHmMzCxEKVrmLpsp8g MSCA== X-Gm-Message-State: AD7BkJLhKSt+7E9afZmBlMt+UYSnbKtATbFvzlBlfXglBCRc5/iBp1cU/CKzTypnJeegNw== X-Received: by 10.28.2.68 with SMTP id 65mr3433990wmc.85.1456837051771; Tue, 01 Mar 2016 04:57:31 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id m6sm30731492wje.21.2016.03.01.04.57.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Mar 2016 04:57:31 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= Message-ID: <56D591BA.4020303@gmail.com> Date: Tue, 1 Mar 2016 13:57:30 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D590EA.609@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 12:57:33 -0000 El 1/03/16 a les 13:54, Gustau Pérez ha escrit: > > El 1/03/16 a les 13:15, Roger Pau Monné ha escrit: >>> I tried deleting the xen-tools package and then deleting >>> /var/db/xen*. After that I rebooted (there was two xenstore processes, >>> I'd say one is the kernel side process and the other the user space >>> process, whose binary is installed by the xen-tools port). Finally I >>> installed the xen-tools. But the error remains. The error can be found >>> at [1]. >> Hm, this is weird. First things first, you should only have one >> xenstored process running in Dom0, so when doing a ps aux you should see: >> >> root 675 0.0 0.1 23100 2548 - I 12:21 0:00.69 >> /usr/local/sbin/xenstored --pid-file... > This is the output of `ps axuw|grep xenstored|grep -v grep`: > > root 4549 0,0 0,1 12772 3124 - I 10:53 0:00,20 > /usr/local/sbin/xenstored --pid-file /var/run/xenstored.pid > >> But only one of those lines, if you have more than one, something is >> clearly wrong. Can you check if you maybe have duplicated init scripts >> in /etc/rc.d and /usr/local/etc/rc.d? >> >> Then, can you paste the output of `xenstore-ls -fp` before creating the >> domain that's giving you the error? If you can paste the config file of >> the domain that might also help tracking this down. > Sure, [1] is the output of the xenstore-ls -fp and [2] is the config > of the domain. Also, the block script [3] is so simple that it does nothing. Hi Roger, strike my last, don't know why but now it does not complain. I can't explain why. Thank you and sorry for the noise, Gustau From owner-freebsd-xen@freebsd.org Tue Mar 1 13:02:05 2016 Return-Path: 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 3F182ABDA27 for ; Tue, 1 Mar 2016 13:02:05 +0000 (UTC) (envelope-from prvs=8619cf47e=roger.pau@citrix.com) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEB101D0C for ; Tue, 1 Mar 2016 13:02:04 +0000 (UTC) (envelope-from prvs=8619cf47e=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.22,523,1449532800"; d="scan'208";a="335566690" Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Gustau_P=c3=a9rez?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <56D5929F.7040001@citrix.com> Date: Tue, 1 Mar 2016 14:01:19 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D591BA.4020303@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 13:02:05 -0000 El 1/3/16 a les 13:57, Gustau Pérez ha escrit: > > > El 1/03/16 a les 13:54, Gustau Pérez ha escrit: >> >> El 1/03/16 a les 13:15, Roger Pau Monné ha escrit: >>>> I tried deleting the xen-tools package and then deleting >>>> /var/db/xen*. After that I rebooted (there was two xenstore processes, >>>> I'd say one is the kernel side process and the other the user space >>>> process, whose binary is installed by the xen-tools port). Finally I >>>> installed the xen-tools. But the error remains. The error can be found >>>> at [1]. >>> Hm, this is weird. First things first, you should only have one >>> xenstored process running in Dom0, so when doing a ps aux you should see: >>> >>> root 675 0.0 0.1 23100 2548 - I 12:21 0:00.69 >>> /usr/local/sbin/xenstored --pid-file... >> This is the output of `ps axuw|grep xenstored|grep -v grep`: >> >> root 4549 0,0 0,1 12772 3124 - I 10:53 0:00,20 >> /usr/local/sbin/xenstored --pid-file /var/run/xenstored.pid >> >>> But only one of those lines, if you have more than one, something is >>> clearly wrong. Can you check if you maybe have duplicated init scripts >>> in /etc/rc.d and /usr/local/etc/rc.d? >>> >>> Then, can you paste the output of `xenstore-ls -fp` before creating the >>> domain that's giving you the error? If you can paste the config file of >>> the domain that might also help tracking this down. >> Sure, [1] is the output of the xenstore-ls -fp and [2] is the config >> of the domain. Also, the block script [3] is so simple that it does nothing. > Hi Roger, > > strike my last, don't know why but now it does not complain. I can't > explain why. > > Thank you and sorry for the noise, OK, no problem. I wouldn't be surprised if there are certain sequences of events that can leave blkback in a deadlocked state. I've tried fixing them, but the disconnection and error paths should be simplified, now it's too messy to understand. Also, make sure your hotplug script writes the "physical-device" node, or else blkback is not going to attach the disk. Roger. From owner-freebsd-xen@freebsd.org Tue Mar 1 16:45:26 2016 Return-Path: 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 AB98CAC0D22 for ; Tue, 1 Mar 2016 16:45:26 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 3C533134A for ; Tue, 1 Mar 2016 16:45:26 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x236.google.com with SMTP id p65so43776503wmp.1 for ; Tue, 01 Mar 2016 08:45:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=dya4zJs77+GVswgUImZDI69yXeN+nX5Skv507RDCeqE=; b=i1FXgoaP9B5LKewYCyo1gTDdnIG2+3Mi4o5xq9lfXK2S9PL5tmRjTRvcIyiuBIASWY k6ZVZMhMbtGDAWGxnDBtijWT9EqN9+b5eW42ORA9nW1IUTkJ/ddFxfsIrzOy0xMJ7oBZ amZ5IhxhBQtYH4nGboAAQBoO48iP4h/cjL+vvcU0hpgMKtmQ+Xt5hpSDVpS6YnT7tOyT 9AnUSuWzblMd8dusW6dBjnRl35dKv5eREmjcIA/Dv0BqgcvLRXU8I5kIZ9ZUJnjKbYW8 ARtUyOum3mwaH5+0/DDVAQUBg4/JBv+3jjzTCKBO7DzYIFr9iAOCD01E/jY38/R/7bcx 0Xhg== 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:from:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=dya4zJs77+GVswgUImZDI69yXeN+nX5Skv507RDCeqE=; b=MqVnk2XjqovxEp+7Lb+xUNQ5CEbjYkPBqG1Y9ig+CAH0Z4fRffJnHeXKLmeG5aDeUy Z1AxeNDyQxcpvKipqeI0wgn+fcB9WpVsAgVfyuxdRuekFsH/ZoCQ5cYqynAIUuvQ2N60 b9u7Er6SwZfzPpQ4fyWFGS8vTlpd7hKvtOv6UT6SsMUxQ+2rz0mh7p7a/fFeUWlyBg9E uK+jFBkY6reRz8qMVWBHIG+gR3/vIT93kszxqpWuKuKDXdJYOoNt8K/3nIVZYhcjI3/8 NftlaGL/UcdOQ9JdsygA60LcwAQ5wXBbh0LjOPkkG9je72nRbAqJHCEprSyWM2MxW2UL SQwg== X-Gm-Message-State: AD7BkJLnlCqaHKlfG8k48GUHokIT2pvkCA0qxpOGb3uJUcFmXBnWlY3z2tsVtFT7C19+IQ== X-Received: by 10.194.86.68 with SMTP id n4mr25303702wjz.150.1456850724627; Tue, 01 Mar 2016 08:45:24 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id i2sm31691407wje.22.2016.03.01.08.45.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Mar 2016 08:45:23 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= X-Enigmail-Draft-Status: N1110 Message-ID: <56D5C722.3080205@gmail.com> Date: Tue, 1 Mar 2016 17:45:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D5929F.7040001@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 16:45:26 -0000 El 1/03/16 a les 14:01, Roger Pau Monné ha escrit: > now it's too messy to understand. Also, make sure your hotplug script > writes the "physical-device" node, or else blkback is not going to > attach the disk. Hello Roger, I tried a PV domain and I can see the physical device in the xenstore even if the block script does nothing. I wouldn't expect that. Am I missing anything? On the other hand, if I attach two disks[2], the xenstored again complains about one of the disks already declared in the xenstore. However the store seem to be fine [3]. If I remove that disk from the definition the domain boots just fine. Finally, out of curiosity, I'd like to ask, do you know why there are two /local/domain/ branches for a single domain? When I create a domain I can see there's a /local/domain/0/../../X/ and /local/domain/X/ (which X seems to be the number of domains executed in the box). I see the domain information splitted in those two branches. I understand the X makes it easy to join the information in both branches and allows the system to identify the domain. Is it to easily list all the domains and the most important information of them easily without walking the whole tree? Thank you, Gustau [1] http://pastebin.com/trPaGWXK [2] http://pastebin.com/u8312VtW [3] http://pastebin.com/DXLbD673 From owner-freebsd-xen@freebsd.org Wed Mar 2 09:46:58 2016 Return-Path: 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 727F9AC1EC8 for ; Wed, 2 Mar 2016 09:46:58 +0000 (UTC) (envelope-from prvs=8628b2c55=roger.pau@citrix.com) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 361BC15FF for ; Wed, 2 Mar 2016 09:46:57 +0000 (UTC) (envelope-from prvs=8628b2c55=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.22,528,1449532800"; d="scan'208";a="335866652" Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Gustau_P=c3=a9rez?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <56D6B68D.8080809@citrix.com> Date: Wed, 2 Mar 2016 10:46:53 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D5C722.3080205@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 09:46:58 -0000 El 1/3/16 a les 17:45, Gustau Pérez ha escrit: > > > El 1/03/16 a les 14:01, Roger Pau Monné ha escrit: >> now it's too messy to understand. Also, make sure your hotplug script >> writes the "physical-device" node, or else blkback is not going to >> attach the disk. > > Hello Roger, > > I tried a PV domain and I can see the physical device in the xenstore > even if the block script does nothing. I wouldn't expect that. Am I > missing anything? There's a little shortcut in libxl to deal with disks that are using the default hotplug script, see: http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libxl/libxl.c;h=4cdc1690c4d5e5d5b66c896e4c11e813be92b468;hb=HEAD#l2451 libxl does the hotplug script job and already writes the xenstore "physical-device" node on behalf of the hotplug script. This is done to speed up domain creation. You can disable this shortcut by spelling out the hotplug script on each disks configuration line. Using the configuration file you posted in [2] as an example, you will need to change your disk configuration lines so they look like: disk = [ 'vdev=xvda,access=rw,script=block,target=/dev/zvol/dades/debian', 'vdev=xvdb,access=rw,script=block,target=/dev/zvol/dades/debian_1', ] This will prevent libxl from writing the "physical-device" node. > On the other hand, if I attach two disks[2], the xenstored again > complains about one of the disks already declared in the xenstore. > However the store seem to be fine [3]. If I remove that disk from the > definition the domain boots just fine. According to [2], you are assigning the same vdev to both disks (xvda). This is not possible, you should change the second disk definition to: 'phy:/dev/zvol/dades/debian_1,xvdb,rw' Or any other xvd* value that's not xvda. > Finally, out of curiosity, I'd like to ask, do you know why there > are two /local/domain/ branches for a single domain? When I create a > domain I can see there's a /local/domain/0/../../X/ and > /local/domain/X/ (which X seems to be the number of domains executed in > the box). I see the domain information splitted in those two branches. I > understand the X makes it easy to join the information in both branches > and allows the system to identify the domain. Is it to easily list all > the domains and the most important information of them easily without > walking the whole tree? Yes, the hierarchy under /local/domain/X/ is what the guest has write access to, we call this the "frontend". This contains all the information shared by the guest in order to stablish a connection with the backend (that usually runs in Dom0). The other entries inside of /local/domain/0/backend/... are used by the toolstack and the backends (blkback, netback,...) in order to setup the backend. hotplug scripts should only require access to the backend xenstore entries (those under /local/domain/0/backend/...) in order to setup blkback. This article by David Chisnall contains a good high-level description of the architecture if you want to know more: http://www.informit.com/articles/article.aspx?p=1160234 Roger. From owner-freebsd-xen@freebsd.org Thu Mar 3 09:08:18 2016 Return-Path: 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 8B61EA936A1 for ; Thu, 3 Mar 2016 09:08:18 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 1CF97EF1 for ; Thu, 3 Mar 2016 09:08:18 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id l68so24914053wml.0 for ; Thu, 03 Mar 2016 01:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=mXgXujwHkHXDuFiM9SZt/OnfBcw1G+Ydwvi4uIkM2jA=; b=wHuRL/fgZp9cMdGLus1yum5TZEeYkI/Z21N/Jrtg7Kl5lOK1NAtww+QsqbmHO/MVgz 1TDttTmXSrO4DTwmSR3To5oeCr2Es0UU/NIPLhAYj9UL+wDefUuU+UMj7A1JBl4w4DlE iyJMHYB6UYKM8hbhfRiUOjBCEjC7utxdmGMxspUkvvu7FgsEw1yBhL9pULRh7feDDbj4 BvZhyN8LZVqqDW2q4NmtK9+mWEveIcrxKcUTwJ7lHV/18Sit3tbqkIiCIbP9nOjVKZvQ AVO+77S5uByk2q32XE17ak7S98HdGPQWsndfGXyAx+44NRFQ9R95Pb1EPN9xOtWjTbNV 9f8g== 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:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=mXgXujwHkHXDuFiM9SZt/OnfBcw1G+Ydwvi4uIkM2jA=; b=D7fgrnBxS6sJVHs1s55gZx3mPqlshIpnvydB2O0JtVE9+tF+CUbuxJiE08Y31WteB2 AQBxZjyXKxVEacnRvXmrEaJeBr7CJR+4o/p7XbGc2BSgVjzEBGwcuHviBcMbHPr3mLbf pGC0Ch+qVDgl+xXIHUa07E6pmqF4K2EUN9lndocys4C6MICTXd15bWYQFTZBd7OthEQM Z0eHR1QnLp2d+EQkrs1dykYOtliXXOvcJ3CG1xbQ7ZlbUQawV2ARibJtrB6yi7VNZwi8 brGyCLjFle8gsU6yFGZ58MpQdJ22a6KeoorA24KhTDgNJ/zCnPso22vTrf7VElePVWR8 OmtA== X-Gm-Message-State: AD7BkJIdJQ89wBDeIdDkN71mc5/9l8QJwqBHJABdKu6/p2gbWab/N9T2yAPiIuo+fla9Tg== X-Received: by 10.194.58.47 with SMTP id n15mr1686774wjq.155.1456996096606; Thu, 03 Mar 2016 01:08:16 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id cb2sm39867281wjc.16.2016.03.03.01.08.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Mar 2016 01:08:15 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= X-Enigmail-Draft-Status: N1110 Message-ID: <56D7FEFE.9050000@gmail.com> Date: Thu, 3 Mar 2016 10:08:14 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D6B68D.8080809@citrix.com> 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2016 09:08:18 -0000 El 2/03/16 a les 10:46, Roger Pau Monné ha escrit: > > There's a little shortcut in libxl to deal with disks that are using the > default hotplug script, see: > > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libxl/libxl.c;h=4cdc1690c4d5e5d5b66c896e4c11e813be92b468;hb=HEAD#l2451 > > libxl does the hotplug script job and already writes the xenstore > "physical-device" node on behalf of the hotplug script. This is done to > speed up domain creation. > > You can disable this shortcut by spelling out the hotplug script on each > disks configuration line. Using the configuration file you posted in [2] > as an example, you will need to change your disk configuration lines so > they look like: > > disk = [ > 'vdev=xvda,access=rw,script=block,target=/dev/zvol/dades/debian', > 'vdev=xvdb,access=rw,script=block,target=/dev/zvol/dades/debian_1', > ] > > This will prevent libxl from writing the "physical-device" node. Thank you. That makes it. I'm using a simpler form like: phy:/dev/zvol/dades/debian,xvda,rw,script=block', which behaves in the same way. > >> On the other hand, if I attach two disks[2], the xenstored again >> complains about one of the disks already declared in the xenstore. >> However the store seem to be fine [3]. If I remove that disk from the >> definition the domain boots just fine. > According to [2], you are assigning the same vdev to both disks (xvda). > This is not possible, you should change the second disk definition to: > > 'phy:/dev/zvol/dades/debian_1,xvdb,rw' > > Or any other xvd* value that's not xvda. Ah, you're right. Cut and paste betrayed me :) However perhaps the error message may be misleading (it made me think the error was the volume, no the given virtual disk). > http://www.informit.com/articles/article.aspx?p=1160234 Very interesting. I'd need some time to read it through. I'm checking the libxl code and I'd like to pass more arguments to the script. I'll modify libxl/libxl_freebsd.c to do so. I'll let you know my experiments. Thank you, Gustau From owner-freebsd-xen@freebsd.org Fri Mar 4 10:00:24 2016 Return-Path: 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 E073B9DA53C for ; Fri, 4 Mar 2016 10:00:24 +0000 (UTC) (envelope-from prvs=864cd69c8=roger.pau@citrix.com) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78A3BD90 for ; Fri, 4 Mar 2016 10:00:24 +0000 (UTC) (envelope-from prvs=864cd69c8=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.22,535,1449532800"; d="scan'208";a="343164187" Date: Fri, 4 Mar 2016 11:00:09 +0100 From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= X-X-Sender: royger@mac To: =?UTF-8?Q?Gustau_P=C3=A9rez?= CC: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , FreeBSD XEN Subject: Re: Porting the block-iscsi hotplug script In-Reply-To: <56D7FEFE.9050000@gmail.com> Message-ID: References: <553DEB97.5000300@entel.upc.edu> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> User-Agent: Alpine 2.20 (OSX 67 2015-01-07) MIME-Version: 1.0 X-DLP: MIA2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2016 10:00:25 -0000 On Thu, 3 Mar 2016, Gustau Pérez wrote: > El 2/03/16 a les 10:46, Roger Pau Monné ha escrit: > >> complains about one of the disks already declared in the xenstore. > >> However the store seem to be fine [3]. If I remove that disk from the > >> definition the domain boots just fine. > > According to [2], you are assigning the same vdev to both disks (xvda). > > This is not possible, you should change the second disk definition to: > > > > 'phy:/dev/zvol/dades/debian_1,xvdb,rw' > > > > Or any other xvd* value that's not xvda. > > Ah, you're right. Cut and paste betrayed me :) However perhaps the > error message may be misleading (it made me think the error was the > volume, no the given virtual disk). Patches are welcome :). > http://www.informit.com/articles/article.aspx?p=1160234 > > Very interesting. I'd need some time to read it through. > > I'm checking the libxl code and I'd like to pass more arguments to > the script. I'll modify libxl/libxl_freebsd.c to do so. I'll let you > know my experiments. What other parameters do you want to pass to your script that cannot be fetched from xenstore? IMHO I was planning to only pass the xenstore backend node and the action. Roger. From owner-freebsd-xen@freebsd.org Fri Mar 4 10:57:38 2016 Return-Path: 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 9012A9DA99B for ; Fri, 4 Mar 2016 10:57:38 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 294E08D6 for ; Fri, 4 Mar 2016 10:57:38 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id l68so29292591wml.0 for ; Fri, 04 Mar 2016 02:57:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=NpG6wbs8iLRINWzfwjpCLWUCkbh9MghXnPzhpYmU1m0=; b=HtY/AEzfZjc17XyuRq/ACPtjTXaCZ+X35oJ5ZpksOyhgQnJe7Q7bv1Olfcz9+IWI0A +rzSpl7sQaPVmb1PBB44bmuj33S3f/orR5adEGoijxfUW0AcyJGD2nCkEzq3Ocl66oDv pNB2M4wJxZot1XPl00tbujVDz3JJcn+q/rasENqI2sd39RmMBI+DWV2T0MnGBYDAxxke NkkYOQH1VRVaCBd82kNPMZgDU8zDvhD63NZHBxL4NxaT9pK6DTqo6sHOOty1mR9aolEH YCUWhMtUf+Pm4mbLVZ55+wBKaIxeJQ96ZnIDYpRvckrnWF+wrOg1ka3TA1/k4FLtiBkj 78zg== 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:from:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=NpG6wbs8iLRINWzfwjpCLWUCkbh9MghXnPzhpYmU1m0=; b=JHGSdeJcmr8u6MZIQ64OEEI+FgDH9EiRtMfOQNz91KgsQvtL//xBmFKhTIp6jCGWIP XoWvGfuX2279UNx43gRmOenOE78d3DpfrKx8DFf3LWB4l0seJ67A7PcLXIV0R88lPMuR KlFmbJMFF71HxXjkw0vJ/iOjX9sFBIYAZs3SD3N2ISvNbuyJYGwUWKRVavAIw77sy2EA prVLm2MareO68TuUtcaP+Ntp8njg3WdhtqWNxh6lfe/VqiEyvHQb2K+BcmU1MiFuLqzW UCxeAUIpLTY9MnMnKKlId6aiH1JcAB1PTe/jmaJPzRRkxjwphIDxwG3JUHjvr9Vi+i8d rw/w== X-Gm-Message-State: AD7BkJLWqnYYNUSxHV27PUQbPO0WSMn/S6nxMy210he1W8SgieGSLy38szDSYO6wtYANCg== X-Received: by 10.28.85.137 with SMTP id j131mr4205782wmb.15.1457089056604; Fri, 04 Mar 2016 02:57:36 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id et11sm2748645wjc.30.2016.03.04.02.57.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2016 02:57:35 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= X-Enigmail-Draft-Status: N1110 Message-ID: <56D96A1E.8020900@gmail.com> Date: Fri, 4 Mar 2016 11:57:34 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2016 10:57:38 -0000 El 4/03/16 a les 11:00, Roger Pau Monné ha escrit: >> >> Ah, you're right. Cut and paste betrayed me :) However perhaps the >> error message may be misleading (it made me think the error was the >> volume, no the given virtual disk). > Patches are welcome :). > > What other parameters do you want to pass to your script that cannot be > fetched from xenstore? IMHO I was planning to only pass the xenstore > backend node and the action. > Hi Roger, I'm planning more or less the same, and I'll be happy to see my name there :) I did a simple patch [1] that passes that as arguments, but I'd like to do that via the environment, but that would mean mixing *args and env (I don't know if that's acceptable). If it is, please let me know and I'll rework (so to say) it. Thank you, Gustau [1] http://pastebin.com/AnXFkJzd From owner-freebsd-xen@freebsd.org Fri Mar 4 11:54:14 2016 Return-Path: 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 BE67D9DA3BC for ; Fri, 4 Mar 2016 11:54:14 +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 4F2128F4 for ; Fri, 4 Mar 2016 11:54:14 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x22c.google.com with SMTP id l68so17079108wml.0 for ; Fri, 04 Mar 2016 03:54:14 -0800 (PST) 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=Knki5JOAEGi13kxheKcnDFvV5Qdzi0OWLNwqXZR3RZw=; b=HUF1bKeAwRofGE/DsPjnVMvJhl3IP5Ezm8x4FhVlX2MmH1ODsQPPT6v8/t9D3h92w5 PI7aR6eme0XTrMC52NapDjBWAywrzRDiJ7hIS7ipfjB63l7s1JPynlBBOhu3B7jQuaE0 ete0siSJxw1H1cdS2dYxOQ60+ZGtSnRKtTAduuXH2eZjdpdl+YbbNl+a75aJJCNmJzf8 Pb66CTnjYYQcPJgoF1AVyiDr/+pMGZoLzYMzBa5K20GVq4StcWt3NVGOlmFU5HS67A7+ KRHQMN+CSRWzhFFi+ZMObPPWg8qd7MnkiPsvjnTxWLW83d//UokUX6qpDwVSM8TF/EjG YRBg== 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=Knki5JOAEGi13kxheKcnDFvV5Qdzi0OWLNwqXZR3RZw=; b=VD7rwrdMLCTRYtLkD8emT269fUGuHtzrH8ogfIMBguZ7enA9uW3Q2sU5liiggxhtIF mtm+ev55RwGlUlcsvhs7DwT9SGbCn4P5wb8dfTtIMRXvkioiGZ1sKfYVYn+V+KFcVr0x mmwVCcE7OSG2BJVWBiH7m0yUv+cjlGd81qBebJeLYRGr8mX0/Bgo6AGCg9gGcF2N33xr JUnrgG59Mh4rkjhOzHxiC2/+d7i5Ypl7BpSNeUCnCZGE6ktHPW7hjPq6pDbyOFH4gnrZ PRdzZjts5JrAgk+KKedpAiQs8Tw57HHITINzahmhNO8PaBP24rRqqgkXeBG9BPBIUmc7 TmJw== X-Gm-Message-State: AD7BkJLKWZpJ0iDmJ5e+VLtE2igoNkrHtO1T0dPl1Cun0pKgR613vw0ihamndtVG2ZzUIg== X-Received: by 10.194.63.144 with SMTP id g16mr10088228wjs.149.1457092452829; Fri, 04 Mar 2016 03:54:12 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id t8sm2958679wjy.41.2016.03.04.03.54.11 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2016 03:54:11 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <553DEB97.5000300@entel.upc.edu> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> Cc: FreeBSD XEN From: =?UTF-8?Q?Gustau_P=c3=a9rez?= Message-ID: <56D97762.7000908@gmail.com> Date: Fri, 4 Mar 2016 12:54:10 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2016 11:54:14 -0000 El 4/03/16 a les 11:00, Roger Pau Monné ha escrit: > > What other parameters do you want to pass to your script that cannot be > fetched from xenstore? IMHO I was planning to only pass the xenstore > backend node and the action. The action (if I understand it correctly) is already there. OTOH, I'd like to check if the disks are already in use, and so I'd need to walk the /local/domain/0/backend/vbd/$domin/$devid/ looking if the disks are already there. This arises two questions: * can I assume the domain0 store would always be /local/domain/0/? * would I need to walk for each $domid checking for each $devid and getting the physical device? Thank you, G. > Roger. From owner-freebsd-xen@freebsd.org Fri Mar 4 15:54:14 2016 Return-Path: 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 DBE869DA329 for ; Fri, 4 Mar 2016 15:54:14 +0000 (UTC) (envelope-from prvs=864cd69c8=roger.pau@citrix.com) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FF6FDD6 for ; Fri, 4 Mar 2016 15:54:14 +0000 (UTC) (envelope-from prvs=864cd69c8=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.22,536,1449532800"; d="scan'208";a="343237847" Date: Fri, 4 Mar 2016 16:54:10 +0100 From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= X-X-Sender: royger@mac To: =?UTF-8?Q?Gustau_P=C3=A9rez?= CC: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , FreeBSD XEN Subject: Re: Porting the block-iscsi hotplug script In-Reply-To: <56D97762.7000908@gmail.com> Message-ID: References: <553DEB97.5000300@entel.upc.edu> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <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> <56D97762.7000908@gmail.com> User-Agent: Alpine 2.20 (OSX 67 2015-01-07) MIME-Version: 1.0 X-DLP: MIA1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2016 15:54:15 -0000 On Fri, 4 Mar 2016, Gustau Pérez wrote: > El 4/03/16 a les 11:00, Roger Pau Monné ha escrit: > > > > What other parameters do you want to pass to your script that cannot be > > fetched from xenstore? IMHO I was planning to only pass the xenstore > > backend node and the action. > > The action (if I understand it correctly) is already there. Yes, the xenstore backend path is $1 and the action $2. > > OTOH, I'd like to check if the disks are already in use, and so I'd > need to walk the /local/domain/0/backend/vbd/$domin/$devid/ looking if > the disks are already there. This arises two questions: > > * can I assume the domain0 store would always be /local/domain/0/? Hm, I wouldn't be on it. This is true in the most common scenario, where Dom0 (domain with id 0) runs all the backends. But if you are using a driver domain or a radically disagregated system (where control domain != hardware domain) this is no longer true. So in general you shouldn't make this assumption. > * would I need to walk for each $domid checking for each $devid and > getting the physical device? Linux already has some code to do this checking, but this also involves taking a lock in order to make sure there's only one hotplug script performing this check at the same time. The Linux function that performs this checking is in: http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/hotplug/Linux/block;h=2691b56951c9b82094471a141b9e0bed04abb929;hb=HEAD#l40 And the caller is: http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/hotplug/Linux/block;h=2691b56951c9b82094471a141b9e0bed04abb929;hb=HEAD#l275 If you take a look, the call to check_device_sharing is protected with the "block" lock. Roger.