From xen-api-bounces@lists.xensource.com Tue Jun 01 02:50:40 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 02:50:40 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJO7L-0000AS-8X; Tue, 01 Jun 2010 02:50:39 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJO79-000084-MH for xen-api@lists.xensource.com; Tue, 01 Jun 2010 02:50:27 -0700 X-ASG-Debug-ID: 1275385826-646300300000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from aa012msr.fastwebnet.it (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 29112290AEA for ; Tue, 1 Jun 2010 02:50:26 -0700 (PDT) Received: from aa012msr.fastwebnet.it (aa012msr.fastwebnet.it [85.18.95.72]) by spam.xensource.com with ESMTP id fS5XKlr9BVpDfQx4 for ; Tue, 01 Jun 2010 02:50:26 -0700 (PDT) X-Barracuda-Envelope-From: cluster@xinet.it Received: from fgmobile (37.4.86.66) by aa012msr.fastwebnet.it (8.5.016.6) id 4BF551DA0142D228 for xen-api@lists.xensource.com; Tue, 1 Jun 2010 11:50:25 +0200 From: To: X-ASG-Orig-Subj: XCP - problem Date: Tue, 1 Jun 2010 11:50:21 +0200 Message-ID: <000001cb016f$db1c8c70$9155a550$@it> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsBb9lJZsD9H9knQkiiPmJh0bBefQ== Content-Language: it X-Barracuda-Connect: aa012msr.fastwebnet.it[85.18.95.72] X-Barracuda-Start-Time: 1275385827 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE, NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31315 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.00 HTML_MESSAGE BODY: HTML included in message Subject: [Xen-API] XCP - problem X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1338955973==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com This is a multi-part message in MIME format. --===============1338955973== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01CB0180.9EA55C70" Content-Language: it This is a multi-part message in MIME format. ------=_NextPart_000_0001_01CB0180.9EA55C70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi all, after an accidental poweroff of pool-master the startup & poweroff of all VMS in the pool has become terribly slow! I need of more then 1 hour to reboot a VM. Looking into the logs there is always the same error: > Jun 1 11:36:23 xcp1 xapi: [error|xcp1|503495 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56, "write", "") ] > Jun 1 11:44:53 xcp1 xapi: [error|xcp1|503720 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56, "write", "") ] Any idea? Thanks a lot and regards, FG ------=_NextPart_000_0001_01CB0180.9EA55C70 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi all,

 

after an accidental poweroff of = pool-master the startup & poweroff of all VMS in the pool has become terribly = slow! I need of more then 1 hour to reboot a VM.

 

Looking into the logs there is = always the same error:

 

> Jun  1 11:36:23 xcp1 = xapi: [error|xcp1|503495 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ = Unix.Unix_error(56, "write", "") ]

> Jun  1 11:44:53 xcp1 = xapi: [error|xcp1|503720 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ = Unix.Unix_error(56, "write", "") ]

 

Any idea?

 

Thanks a lot and = regards,

FG

------=_NextPart_000_0001_01CB0180.9EA55C70-- --===============1338955973== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1338955973==-- From xen-api-bounces@lists.xensource.com Tue Jun 01 03:02:52 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 03:02:52 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJOJ9-0001CV-M7; Tue, 01 Jun 2010 03:02:51 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJOIs-0001AO-FX for xen-api@lists.xensource.com; Tue, 01 Jun 2010 03:02:35 -0700 X-ASG-Debug-ID: 1275386552-616b00450000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id F0E7521705D for ; Tue, 1 Jun 2010 03:02:33 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 1d0nOD0T7n4HU8PQ (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 01 Jun 2010 03:02:33 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,339,1272844800"; d="scan'208,217";a="181716" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 01 Jun 2010 10:02:31 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX01.citrite.net ([10.30.224.162]) with mapi; Tue, 1 Jun 2010 11:02:30 +0100 From: Jonathan Ludlam To: " " Date: Tue, 1 Jun 2010 11:02:28 +0100 X-ASG-Orig-Subj: Re: [Xen-API] XCP - problem Subject: Re: [Xen-API] XCP - problem Thread-Topic: [Xen-API] XCP - problem Thread-Index: AcsBcYtx3MF8lLtHQBWl/3bHAclNWQ== Message-ID: <73F58E88-3499-4ADE-98A0-09979CB96721@eu.citrix.com> References: <000001cb016f$db1c8c70$9155a550$@it> In-Reply-To: <000001cb016f$db1c8c70$9155a550$@it> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275386553 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31315 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0707866682==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0707866682== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_73F58E8834994ADE98A009979CB96721eucitrixcom_" --_000_73F58E8834994ADE98A009979CB96721eucitrixcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi there, Try executing this on the pool master: service xapi restart This restarts the xapi process, which could well help. Assuming you've got = a pool, you might try running that command on them too (probably best to wa= it a minute or so between running it on each host). There have been many changes since 0.1.1, many many bugfixes, and the new s= table release (0.5) should be out in the next couple of weeks or so. If the problem persists, let us know! Jon On 1 Jun 2010, at 10:50, > > wrote: Hi all, after an accidental poweroff of pool-master the startup & poweroff of all V= MS in the pool has become terribly slow! I need of more then 1 hour to rebo= ot a VM. Looking into the logs there is always the same error: > Jun 1 11:36:23 xcp1 xapi: [error|xcp1|503495 inet_rpc||xapi] RBAC: INTER= NAL_ERROR: [ Unix.Unix_error(56, "write", "") ] > Jun 1 11:44:53 xcp1 xapi: [error|xcp1|503720 inet_rpc||xapi] RBAC: INTER= NAL_ERROR: [ Unix.Unix_error(56, "write", "") ] Any idea? Thanks a lot and regards, FG --_000_73F58E8834994ADE98A009979CB96721eucitrixcom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable cluster@xinet.it> <cluster@xinet.it> wrote:
Hi all,
 
after an accidental poweroff of pool-master the startup = & poweroff of all VMS in the pool has become terribly slow! I need of m= ore then 1 hour to reboot a VM.
 
Looking into the logs there is = always the same error:
 <= /o:p>
> Jun  1 11:36:23 xcp1 xapi: [er= ror|xcp1|503495 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56,= "write", "") ]
> Jun  1 11= :44:53 xcp1 xapi: [error|xcp1|503720 inet_rpc||xapi] RBAC: INTERNAL_ERROR: = [ Unix.Unix_error(56, "write", "") ]
 
Any idea?
 
Than= ks a lot and regards,
FG=
<ATT00001..txt>

= --_000_73F58E8834994ADE98A009979CB96721eucitrixcom_-- --===============0707866682== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0707866682==-- From xen-api-bounces@lists.xensource.com Tue Jun 01 05:09:49 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 05:09:49 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJQI0-0006KO-R0; Tue, 01 Jun 2010 05:09:48 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJQFZ-0005co-Mn for xen-api@lists.xensource.com; Tue, 01 Jun 2010 05:07:18 -0700 X-ASG-Debug-ID: 1275394035-359900330000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from aa013msr.fastwebnet.it (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id DE2EA290D93 for ; Tue, 1 Jun 2010 05:07:16 -0700 (PDT) Received: from aa013msr.fastwebnet.it (aa013msr.fastwebnet.it [85.18.95.73]) by spam.xensource.com with ESMTP id i9MPji6F4rFeUjnW for ; Tue, 01 Jun 2010 05:07:16 -0700 (PDT) X-Barracuda-Envelope-From: cluster@xinet.it Received: from fgmobile (37.4.86.66) by aa013msr.fastwebnet.it (8.5.016.6) id 4B71F7870F492898; Tue, 1 Jun 2010 14:07:12 +0200 From: To: "'Jonathan Ludlam'" References: <000001cb016f$db1c8c70$9155a550$@it> <73F58E88-3499-4ADE-98A0-09979CB96721@eu.citrix.com> In-Reply-To: <73F58E88-3499-4ADE-98A0-09979CB96721@eu.citrix.com> X-ASG-Orig-Subj: R: [Xen-API] XCP - problem Subject: R: [Xen-API] XCP - problem Date: Tue, 1 Jun 2010 14:07:11 +0200 Message-ID: <005201cb0182$f739fce0$e5adf6a0$@it> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsBcYtx3MF8lLtHQBWl/3bHAclNWQAEEmmQ Content-Language: it X-Barracuda-Connect: aa013msr.fastwebnet.it[85.18.95.73] X-Barracuda-Start-Time: 1275394036 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE, NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31321 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.00 HTML_MESSAGE BODY: HTML included in message Cc: xen-api@lists.xensource.com X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1905829824==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com This is a multi-part message in MIME format. --===============1905829824== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0053_01CB0193.BAC2CCE0" Content-Language: it This is a multi-part message in MIME format. ------=_NextPart_000_0053_01CB0193.BAC2CCE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Jon, =20 thankyou very much for your help. =20 I tried with restarting xapi on both hosts (xcp1 is the pool master and xcp2) but unsuccessfully L =20 I think it could be an incoherence of xapi-db. Let me know if you need = some log or something else. I can make a dump by using =93xe host-get-system-status=94. =20 Thanks again and regards, FG =20 Da: Jonathan Ludlam [mailto:Jonathan.Ludlam@eu.citrix.com]=20 Inviato: marted=EC 1 giugno 2010 12:02 A: Cc: xen-api@lists.xensource.com Oggetto: Re: [Xen-API] XCP - problem =20 Hi there, =20 Try executing this on the pool master: =20 service xapi restart =20 This restarts the xapi process, which could well help. Assuming you've = got a pool, you might try running that command on them too (probably best to = wait a minute or so between running it on each host). =20 There have been many changes since 0.1.1, many many bugfixes, and the = new stable release (0.5) should be out in the next couple of weeks or so.=20 =20 If the problem persists, let us know! =20 Jon =20 =20 On 1 Jun 2010, at 10:50, wrote: Hi all, =20 after an accidental poweroff of pool-master the startup & poweroff of = all VMS in the pool has become terribly slow! I need of more then 1 hour to reboot a VM. =20 Looking into the logs there is always the same error: =20 > Jun 1 11:36:23 xcp1 xapi: [error|xcp1|503495 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56, "write", "") ] > Jun 1 11:44:53 xcp1 xapi: [error|xcp1|503720 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56, "write", "") ] =20 Any idea? =20 Thanks a lot and regards, FG =20 ------=_NextPart_000_0053_01CB0193.BAC2CCE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi Jon,

 

thankyou very much for your help.

 

I tried with restarting xapi on both hosts (xcp1 is the = pool master and xcp2) but unsuccessfully L

 

I think it could be an incoherence of xapi-db. Let me = know if you need some log or something else. I can make a dump by using = “xe host-get-system-status”.

 

Thanks again and regards,

FG

 

Da: Jonathan = Ludlam [mailto:Jonathan.Ludlam@eu.citrix.com]
Inviato: marted=EC 1 giugno 2010 12:02
A: <cluster@xinet.it> <cluster@xinet.it>
Cc: xen-api@lists.xensource.com
Oggetto: Re: [Xen-API] XCP - problem

 

Hi there,

 

Try executing this on the pool = master:

 

service xapi restart

 

This restarts the xapi process, which could well = help. Assuming you've got a pool, you might try running that command on them = too (probably best to wait a minute or so between running it on each = host).

 

There have been many changes since 0.1.1, many many = bugfixes, and the new stable release (0.5) should be out in the next couple of = weeks or so. 

 

If the problem persists, let us = know!

 

Jon

 

 

On 1 Jun 2010, at 10:50, <cluster@xinet.it> <cluster@xinet.it> = wrote:



Hi all,

 =

after an accidental poweroff of pool-master the startup & poweroff of all = VMS in the pool has become terribly slow! I need of more then 1 hour to reboot = a VM.=

 =

Looking into the logs there is always the same error:

 =

> Jun  1 11:36:23 xcp1 xapi: [error|xcp1|503495 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56, "write", "") = ]=

> Jun  1 11:44:53 xcp1 xapi: [error|xcp1|503720 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56, "write", "") = ]=

 =

Any idea?=

 =

Thanks a lot and regards,=

FG=

<ATT00= 001..txt>

 

------=_NextPart_000_0053_01CB0193.BAC2CCE0-- --===============1905829824== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1905829824==-- From xen-api-bounces@lists.xensource.com Tue Jun 01 05:26:17 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 05:26:17 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJQXv-0008H6-Fk; Tue, 01 Jun 2010 05:26:15 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJQXd-0008E7-51 for xen-api@lists.xensource.com; Tue, 01 Jun 2010 05:25:57 -0700 X-ASG-Debug-ID: 1275395154-218200a10000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 561A9290640 for ; Tue, 1 Jun 2010 05:25:55 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id so43XF5FvKaQeySY (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 01 Jun 2010 05:25:55 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,340,1272844800"; d="scan'208,217";a="185415" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 01 Jun 2010 12:25:34 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX01.citrite.net ([10.30.224.162]) with mapi; Tue, 1 Jun 2010 13:25:34 +0100 From: Jonathan Ludlam To: "" Date: Tue, 1 Jun 2010 13:25:33 +0100 X-ASG-Orig-Subj: Re: R: [Xen-API] XCP - problem Subject: Re: R: [Xen-API] XCP - problem Thread-Topic: R: [Xen-API] XCP - problem Thread-Index: AcsBhYiq7FeoGHgcSOyGx6vtMWevag== Message-ID: <4EBBA706-55B4-45FD-872B-45C951973A6F@eu.citrix.com> References: <000001cb016f$db1c8c70$9155a550$@it> <73F58E88-3499-4ADE-98A0-09979CB96721@eu.citrix.com> <005201cb0182$f739fce0$e5adf6a0$@it> In-Reply-To: <005201cb0182$f739fce0$e5adf6a0$@it> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275395156 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31325 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0669974773==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0669974773== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_4EBBA70655B445FD872B45C951973A6Feucitrixcom_" --_000_4EBBA70655B445FD872B45C951973A6Feucitrixcom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Interesting. There are a couple more things to try - perhaps a restart of t= he 'fe' daemon would help - a 'service fe restart' should do the trick ther= e. Otherwise a complete host reboot might get you somewhere. If these fail, send in the bug report produced by xe host-get-system-status= . I'll have a look through when I get a chance to see if there's anything t= hat stands out. Cheers, Jon On 1 Jun 2010, at 13:07, > wrote: Hi Jon, thankyou very much for your help. I tried with restarting xapi on both hosts (xcp1 is the pool master and xcp= 2) but unsuccessfully :( I think it could be an incoherence of xapi-db. Let me know if you need some= log or something else. I can make a dump by using =93xe host-get-system-st= atus=94. Thanks again and regards, FG Da: Jonathan Ludlam [mailto:Jonathan.Ludlam@eu.citrix.com] Inviato: marted=EC 1 giugno 2010 12:02 A: > > Cc: xen-api@lists.xensource.com Oggetto: Re: [Xen-API] XCP - problem Hi there, Try executing this on the pool master: service xapi restart This restarts the xapi process, which could well help. Assuming you've got = a pool, you might try running that command on them too (probably best to wa= it a minute or so between running it on each host). There have been many changes since 0.1.1, many many bugfixes, and the new s= table release (0.5) should be out in the next couple of weeks or so. If the problem persists, let us know! Jon On 1 Jun 2010, at 10:50, > > wrote: Hi all, after an accidental poweroff of pool-master the startup & poweroff of all V= MS in the pool has become terribly slow! I need of more then 1 hour to rebo= ot a VM. Looking into the logs there is always the same error: > Jun 1 11:36:23 xcp1 xapi: [error|xcp1|503495 inet_rpc||xapi] RBAC: INTER= NAL_ERROR: [ Unix.Unix_error(56, "write", "") ] > Jun 1 11:44:53 xcp1 xapi: [error|xcp1|503720 inet_rpc||xapi] RBAC: INTER= NAL_ERROR: [ Unix.Unix_error(56, "write", "") ] Any idea? Thanks a lot and regards, FG --_000_4EBBA70655B445FD872B45C951973A6Feucitrixcom_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable cluster@xinet.it> wr= ote:
Hi Jon,
=  
thankyou ve= ry much for your help.
 
I tr= ied with restarting xapi on both hosts (xcp1 is the pool master and xcp2) b= ut unsuccessfully = L=
 
I think it could be an incoherence of x= api-db. Let me know if you need some log or something else. I can make a du= mp by using =93xe host-get-system-status=94.
 
Thanks again and regards,
FG
 
Da: Jonathan Ludlam [mailto:Jonathan.Ludlam= @eu.citrix.com] 
In= viato: marted=EC 1 gi= ugno 2010 12:02
A: <cluster@xinet.it> <cluster@xine= t.it>
Cc: xen-api@lists.xensource.com
Oggetto: Re: [Xen-API] XCP - pro= blem
 
Hi there,=
 
Try executing thi= s on the pool master:
 
service xapi restart
 
This restarts the xapi process, which could well help. A= ssuming you've got a pool, you might try running that command on them too (= probably best to wait a minute or so between running it on each host).=
 
There have been = many changes since 0.1.1, many many bugfixes, and the new stable release (0= .5) should be out in the next couple of weeks or so. 
=
If the problem persists, let= us know!
 
Jo= n
 
&nbs= p;
On 1 Jun 2010, at 10:50, <cluster@= xinet.it> <cluster@xinet.it> wrote:


Hi all,
 
after an acciden= tal poweroff of pool-master the startup & poweroff of all VMS in the po= ol has become terribly slow! I need of more then 1 hour to reboot a VM.
 
Looking into the logs there is always the same error:=
 
> Jun  1 11:36:23 xcp1 xapi: [error|xcp1|503495 inet_rp= c||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56, "write", "") ]<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif; ">
> Jun  1 11:44:53 xcp1 xapi: [e= rror|xcp1|503720 inet_rpc||xapi] RBAC: INTERNAL_ERROR: [ Unix.Unix_error(56= , "write", "") ]
 
Any idea?
<= div>
 
Thanks a lot= and regards,
FG
<ATT00001..txt>
=
 

= --_000_4EBBA70655B445FD872B45C951973A6Feucitrixcom_-- --===============0669974773== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0669974773==-- From xen-users-bounces@lists.xensource.com Tue Jun 01 09:28:53 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 09:28:53 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJUKj-0007OL-Jv; Tue, 01 Jun 2010 09:28:53 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OGUKK-0004Pc-UO for xen-users@lists.xensource.com; Mon, 24 May 2010 02:52:05 -0700 X-ASG-Debug-ID: 1274694721-7cde00150000-xM1yvO X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 5240428BB1F; Mon, 24 May 2010 02:52:02 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id kW0Q5kdAKh5DqNno (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Mon, 24 May 2010 02:52:02 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,290,1272844800"; d="scan'208,217";a="54212" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 24 May 2010 09:52:01 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Mon, 24 May 2010 10:52:01 +0100 From: Jonathan Ludlam To: liuqing Date: Mon, 24 May 2010 10:52:00 +0100 X-ASG-Orig-Subj: Re: [Xen-API] what's place the vm template are stored on the xenserver or xcp Thread-Topic: [Xen-API] what's place the vm template are stored on the xenserver or xcp Thread-Index: Acr7JsGrfQvzMZvcQhKJ5uKgONat2g== Message-ID: References: <1ad6d37.b314.128c853e9cc.Coremail.jk4245@163.com> In-Reply-To: <1ad6d37.b314.128c853e9cc.Coremail.jk4245@163.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1274694723 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.52 X-Barracuda-Spam-Status: No, SCORE=0.52 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE, MIME_BASE64_TEXT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.30651 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message 0.52 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding X-Mailman-Approved-At: Tue, 01 Jun 2010 08:31:01 -0700 Cc: xen-users , xen-api Subject: [Xen-users] Re: [Xen-API] what's place the vm template are stored on the xenserver or xcp X-BeenThere: xen-users@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Xen user discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0056291122==" Sender: xen-users-bounces@lists.xensource.com Errors-To: xen-users-bounces@lists.xensource.com --===============0056291122== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_D712DCCF08CB46CBA4E017EACFC42658eucitrixcom_" --_000_D712DCCF08CB46CBA4E017EACFC42658eucitrixcom_ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 WGFwaSdzIGludGVybmFsIGRhdGFiYXNlIGlzIHN0b3JlZCBpbiB0aGUgZmlsZSAvdmFyL3hhcGkv c3RhdGUuZGIuIFRoZSBwb29sIG1hc3RlciBjb250YWlucyB0aGUgbW9zdCB1cC10by1kYXRlIHZl cnNpb24gYW5kIHRoZSBzbGF2ZXMgZ2V0IGEgYmFja3VwIGNvcHkgdGhhdCBpcyBzeW5jZWQgb25j ZSBhIGRheS4NCg0KSW4gZ2VuZXJhbCB0aG91Z2gsIHdlIGRpc2NvdXJhZ2UgZGlyZWN0IGFjY2Vz cyBvZiB0aGlzIGZpbGUuIFlvdSBzaG91bGQgdXNlIHRoZSBBUEkgaW5zdGVhZC4NCg0KQ2hlZXJz LA0KDQpKb24NCg0KDQpPbiAyNCBNYXkgMjAxMCwgYXQgMDQ6MjEsIGxpdXFpbmcgd3JvdGU6DQoN CmhpIGFsbCwNCiAgICB3aG8ga25vdyB0aGUgeGNwIG9yIHhjcCAgaG93IHRvIHN0b3JlIHRoZSBk YXRhIHJlbGF0ZWQgd2l0aCB0aGUgaG9zdCAudm0gLmFuZCBwb29sID8gdGhhbmtzDQoNCg0KDQpC ZXN0UmVnYXJkcw0KDQoNCiAgICAgICAgIGxpdXFpbmcNCg0KDQpfX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fXw0KzfjS186q1tDQocbz0rXD4rfRzOG5qcbz0rXTys/ko6jX1Nb30/LD+6Op PGh0dHA6Ly95bS4xNjMuY29tLz9mcm9tPW9kMz4gPEFUVDAwMDAxLi50eHQ+DQoNCg== --_000_D712DCCF08CB46CBA4E017EACFC42658eucitrixcom_ Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable Xapi's internal database i= s stored in the file /var/xapi/state.db. The pool master contains the most = up-to-date version and the slaves get a backup copy that is synced once a d= ay.

In general though, we discourage direct access of th= is file. You should use the API instead.

Cheers,

Jon


On 24 May= 2010, at 04:21, liuqing wrote:

hi all,
    who know the xcp or xcp  how to store the data= related with the host .vm .and pool ? thanks
 
 
 
BestRegards
 
 
         liuqing


=
=CD=F8=D2=D7=CE= =AA=D6=D0=D0=A1=C6=F3=D2=B5=C3=E2=B7=D1=CC=E1=B9=A9=C6=F3=D2=B5=D3=CA=CF=E4= =A3=A8=D7=D4=D6=F7=D3=F2=C3=FB=A3=A9
<ATT00001..txt>

= --_000_D712DCCF08CB46CBA4E017EACFC42658eucitrixcom_-- --===============0056291122== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users --===============0056291122==-- From xen-api-bounces@lists.xensource.com Tue Jun 01 10:35:52 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 10:35:52 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJVNY-000496-3c; Tue, 01 Jun 2010 10:35:52 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJTVx-0002xy-TJ for xen-api@lists.xensource.com; Tue, 01 Jun 2010 08:36:25 -0700 X-ASG-Debug-ID: 1275406583-328c00790000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 5B066290DA2 for ; Tue, 1 Jun 2010 08:36:24 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 2rF9u7LLDYOxVMBj (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 01 Jun 2010 08:36:24 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,340,1272844800"; d="scan'208";a="190463" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 01 Jun 2010 15:36:23 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Tue, 1 Jun 2010 16:36:23 +0100 Received: from ely.uk.xensource.com ([10.80.2.32]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OJTVv-0002Cz-5V for xen-api@lists.xensource.com; Tue, 01 Jun 2010 16:36:23 +0100 Content-Type: multipart/mixed; boundary="===============1784801392==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Fix build permission problem X-Mercurial-Node: ece26f39ce0998469291d08373815634b242d506 Message-ID: Date: Tue, 1 Jun 2010 16:38:54 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275406585 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31336 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Subject: [Xen-API] [PATCH] Fix build permission problem X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1784801392== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1275406705 -3600 # Node ID ece26f39ce0998469291d08373815634b242d506 # Parent 07f69949f0bfd5ec679453a8ce202de8d19b4ac3 Avoid permission problems by installing the .spec files to $(RPM_SPECSDIR) before calling $(RPMBUILD) Signed-off-by: David Scott diff -r 07f69949f0bf -r ece26f39ce09 mk/Makefile --- a/mk/Makefile Fri May 28 15:22:28 2010 +0100 +++ b/mk/Makefile Tue Jun 01 16:38:25 2010 +0100 @@ -13,7 +13,7 @@ .PHONY: build build: srpm $(MY_SOURCES)/MANIFEST - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb ../xapi-libs.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/xapi-libs.spec mkdir -p $(MY_MAIN_PACKAGES) cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-libs-fe-*.rpm $(MY_MAIN_PACKAGES) @@ -21,7 +21,8 @@ srpm: mkdir -p $(RPM_SRPMSDIR) $(RPM_SPECSDIR) $(RPM_SOURCESDIR) $(RPM_RPMSDIR) hg archive -p xapi-libs-0 -t tbz2 $(RPM_SOURCESDIR)/xapi-libs-0.tar.bz2 - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bs ../xapi-libs.spec + install -o root -g root ../xapi-libs.spec $(RPM_SPECSDIR) + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bs $(RPM_SPECSDIR)/xapi-libs.spec $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) rm -f $@ 1 file changed, 3 insertions(+), 2 deletions(-) mk/Makefile | 5 +++-- --===============1784801392== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User David Scott # Date 1275406705 -3600 # Node ID ece26f39ce0998469291d08373815634b242d506 # Parent 07f69949f0bfd5ec679453a8ce202de8d19b4ac3 Avoid permission problems by installing the .spec files to $(RPM_SPECSDIR) before calling $(RPMBUILD) Signed-off-by: David Scott diff -r 07f69949f0bf -r ece26f39ce09 mk/Makefile --- a/mk/Makefile Fri May 28 15:22:28 2010 +0100 +++ b/mk/Makefile Tue Jun 01 16:38:25 2010 +0100 @@ -13,7 +13,7 @@ .PHONY: build build: srpm $(MY_SOURCES)/MANIFEST - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb ../xapi-libs.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/xapi-libs.spec mkdir -p $(MY_MAIN_PACKAGES) cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-libs-fe-*.rpm $(MY_MAIN_PACKAGES) @@ -21,7 +21,8 @@ srpm: mkdir -p $(RPM_SRPMSDIR) $(RPM_SPECSDIR) $(RPM_SOURCESDIR) $(RPM_RPMSDIR) hg archive -p xapi-libs-0 -t tbz2 $(RPM_SOURCESDIR)/xapi-libs-0.tar.bz2 - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bs ../xapi-libs.spec + install -o root -g root ../xapi-libs.spec $(RPM_SPECSDIR) + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bs $(RPM_SPECSDIR)/xapi-libs.spec $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) rm -f $@ --===============1784801392== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1784801392==-- From xen-api-bounces@lists.xensource.com Tue Jun 01 10:36:09 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 10:36:09 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJVNp-0004Ge-M9; Tue, 01 Jun 2010 10:36:09 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJTWf-00039w-4g for xen-api@lists.xensource.com; Tue, 01 Jun 2010 08:37:10 -0700 X-ASG-Debug-ID: 1275406626-511f00000000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 8439C290DA4 for ; Tue, 1 Jun 2010 08:37:07 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id LbemwOvfRIXjHkqv (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 01 Jun 2010 08:37:07 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,340,1272844800"; d="scan'208";a="190478" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 01 Jun 2010 15:37:06 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Tue, 1 Jun 2010 16:37:06 +0100 Received: from ely.uk.xensource.com ([10.80.2.32]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OJTWc-0002DS-7J for xen-api@lists.xensource.com; Tue, 01 Jun 2010 16:37:06 +0100 Content-Type: multipart/mixed; boundary="===============1310509592==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Fix build permission problem X-Mercurial-Node: b3462209199855bd5d312cccbbe40829369d75a5 Message-ID: Date: Tue, 1 Jun 2010 16:39:39 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275406628 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31336 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Fix build permission problem X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1310509592== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1275406761 -3600 # Node ID b3462209199855bd5d312cccbbe40829369d75a5 # Parent 6310f068b5c8143d1fcb82ae169097196ec5d19b Avoid owner/group problems by copying the .spec files into $(RPM_SPECSDIR) before calling $(RPMBUILD) Signed-off-by: David Scott diff -r 6310f068b5c8 -r b34622091998 Makefile --- a/Makefile Fri May 28 15:20:05 2010 +0100 +++ b/Makefile Tue Jun 01 16:39:21 2010 +0100 @@ -38,17 +38,18 @@ .PHONY: build build: srpm $(MY_SOURCES)/MANIFEST - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb ocaml.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/ocaml.spec $(RPM) -ihv $(RPM_BINDIR)/{ocaml-3*.rpm,ocaml-camlp4*.rpm} || echo ocaml is already installed - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb findlib.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/findlib.spec $(RPM) -ihv $(RPM_BINDIR)/ocaml-findlib*.rpm || echo ocaml-findlib is already installed - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb omake.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/omake.spec $(RPM) -ihv $(RPM_BINDIR)/omake* || echo omake is already installed - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb xmlm.spec getopt.spec type-conv.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/xmlm.spec $(RPM_SPECSDIR)/getopt.spec $(RPM_SPECSDIR)/type-conv.spec .PHONY: srpm srpm: mkdir -p $(RPM_SRPMSDIR) $(RPM_SPECSDIR) $(RPM_SOURCESDIR) $(RPM_RPMSDIR) + install -g root -o root {ocaml,findlib,omake,xmlm,getopt,type-conv}.spec $(RPM_SPECSDIR) cp $(DIST)/ocaml-${OCAML_VERSION}.tar.bz2 $(RPM_SOURCESDIR)/ cp $(DIST)/findlib-${FINDLIB_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp $(DIST)/omake-${OMAKE_VERSION}.tar.gz $(RPM_SOURCESDIR)/ @@ -56,13 +57,13 @@ cp $(DIST)/xmlm-${XMLM_VERSION}.tbz $(RPM_SOURCESDIR)/ cp $(DIST)/getopt-${GETOPT_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp $(DIST)/type-conv-${TYPECONV_VERSION}.tar.bz2 $(RPM_SOURCESDIR)/ - $(RPMBUILD) -bs ocaml.spec + $(RPMBUILD) -bs $(RPM_SPECSDIR)/ocaml.spec cp patches/xmlm-do-not-display-none-dtd-on-output $(RPM_SOURCESDIR)/ - $(RPMBUILD) --nodeps -bs findlib.spec - $(RPMBUILD) --nodeps -bs omake.spec - $(RPMBUILD) --nodeps -bs xmlm.spec - $(RPMBUILD) --nodeps -bs getopt.spec - $(RPMBUILD) --nodeps -bs type-conv.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/findlib.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/omake.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/xmlm.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/getopt.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/type-conv.spec $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) rm -f $@ 1 file changed, 11 insertions(+), 10 deletions(-) Makefile | 21 +++++++++++---------- --===============1310509592== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-dist-ocaml.hg.patch" # HG changeset patch # User David Scott # Date 1275406761 -3600 # Node ID b3462209199855bd5d312cccbbe40829369d75a5 # Parent 6310f068b5c8143d1fcb82ae169097196ec5d19b Avoid owner/group problems by copying the .spec files into $(RPM_SPECSDIR) before calling $(RPMBUILD) Signed-off-by: David Scott diff -r 6310f068b5c8 -r b34622091998 Makefile --- a/Makefile Fri May 28 15:20:05 2010 +0100 +++ b/Makefile Tue Jun 01 16:39:21 2010 +0100 @@ -38,17 +38,18 @@ .PHONY: build build: srpm $(MY_SOURCES)/MANIFEST - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb ocaml.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/ocaml.spec $(RPM) -ihv $(RPM_BINDIR)/{ocaml-3*.rpm,ocaml-camlp4*.rpm} || echo ocaml is already installed - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb findlib.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/findlib.spec $(RPM) -ihv $(RPM_BINDIR)/ocaml-findlib*.rpm || echo ocaml-findlib is already installed - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb omake.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/omake.spec $(RPM) -ihv $(RPM_BINDIR)/omake* || echo omake is already installed - $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb xmlm.spec getopt.spec type-conv.spec + $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bb $(RPM_SPECSDIR)/xmlm.spec $(RPM_SPECSDIR)/getopt.spec $(RPM_SPECSDIR)/type-conv.spec .PHONY: srpm srpm: mkdir -p $(RPM_SRPMSDIR) $(RPM_SPECSDIR) $(RPM_SOURCESDIR) $(RPM_RPMSDIR) + install -g root -o root {ocaml,findlib,omake,xmlm,getopt,type-conv}.spec $(RPM_SPECSDIR) cp $(DIST)/ocaml-${OCAML_VERSION}.tar.bz2 $(RPM_SOURCESDIR)/ cp $(DIST)/findlib-${FINDLIB_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp $(DIST)/omake-${OMAKE_VERSION}.tar.gz $(RPM_SOURCESDIR)/ @@ -56,13 +57,13 @@ cp $(DIST)/xmlm-${XMLM_VERSION}.tbz $(RPM_SOURCESDIR)/ cp $(DIST)/getopt-${GETOPT_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp $(DIST)/type-conv-${TYPECONV_VERSION}.tar.bz2 $(RPM_SOURCESDIR)/ - $(RPMBUILD) -bs ocaml.spec + $(RPMBUILD) -bs $(RPM_SPECSDIR)/ocaml.spec cp patches/xmlm-do-not-display-none-dtd-on-output $(RPM_SOURCESDIR)/ - $(RPMBUILD) --nodeps -bs findlib.spec - $(RPMBUILD) --nodeps -bs omake.spec - $(RPMBUILD) --nodeps -bs xmlm.spec - $(RPMBUILD) --nodeps -bs getopt.spec - $(RPMBUILD) --nodeps -bs type-conv.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/findlib.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/omake.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/xmlm.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/getopt.spec + $(RPMBUILD) --nodeps -bs $(RPM_SPECSDIR)/type-conv.spec $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) rm -f $@ --===============1310509592== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1310509592==-- From xen-api-bounces@lists.xensource.com Tue Jun 01 10:36:31 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 10:36:31 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJVOB-0004Od-FK; Tue, 01 Jun 2010 10:36:31 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJTYd-0003iD-K1 for xen-api@lists.xensource.com; Tue, 01 Jun 2010 08:39:11 -0700 X-ASG-Debug-ID: 1275406749-484200310000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id C00ED290DB3 for ; Tue, 1 Jun 2010 08:39:10 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id Kgp681SEEOq1obHA (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 01 Jun 2010 08:39:10 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,341,1272844800"; d="scan'208";a="190556" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 01 Jun 2010 15:38:58 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Tue, 1 Jun 2010 16:38:58 +0100 Received: from ely.uk.xensource.com ([10.80.2.32]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OJTYQ-0002H1-EC for xen-api@lists.xensource.com; Tue, 01 Jun 2010 16:38:58 +0100 Content-Type: multipart/mixed; boundary="===============0579653266==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Perform /sbin/chkconfig commands in rpm post-install script X-Mercurial-Node: 799dd0a8b2b13ad017ca6dda4def92364774950a Message-ID: <799dd0a8b2b13ad017ca.1275406891@ely.uk.xensource.com> Date: Tue, 1 Jun 2010 16:41:31 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275406750 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31336 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Perform /sbin/chkconfig commands in rpm post-install script X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0579653266== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1275406815 -3600 # Node ID 799dd0a8b2b13ad017ca6dda4def92364774950a # Parent 6c138bada8993d8261dede260f76a6f28cc6ae3c Perform /sbin/chkconfig commands in rpm post-install script rather than the host-installer. Signed-off-by: David Scott diff -r 6c138bada899 -r 799dd0a8b2b1 xapi.spec --- a/xapi.spec Fri May 28 15:25:56 2010 +0100 +++ b/xapi.spec Tue Jun 01 16:40:15 2010 +0100 @@ -101,6 +101,11 @@ %post core [ ! -x /sbin/chkconfig ] || chkconfig xapi on +[ ! -x /sbin/chkconfig ] || chkconfig management-interface on +[ ! -x /sbin/chkconfig ] || chkconfig xenservices on +[ ! -x /sbin/chkconfig ] || chkconfig xapi-domains on +[ ! -x /sbin/chkconfig ] || chkconfig perfmon on +[ ! -x /sbin/chkconfig ] || chkconfig v6d on %post squeezed [ ! -x /sbin/chkconfig ] || chkconfig squeezed on 1 file changed, 5 insertions(+) xapi.spec | 5 +++++ --===============0579653266== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User David Scott # Date 1275406815 -3600 # Node ID 799dd0a8b2b13ad017ca6dda4def92364774950a # Parent 6c138bada8993d8261dede260f76a6f28cc6ae3c Perform /sbin/chkconfig commands in rpm post-install script rather than the host-installer. Signed-off-by: David Scott diff -r 6c138bada899 -r 799dd0a8b2b1 xapi.spec --- a/xapi.spec Fri May 28 15:25:56 2010 +0100 +++ b/xapi.spec Tue Jun 01 16:40:15 2010 +0100 @@ -101,6 +101,11 @@ %post core [ ! -x /sbin/chkconfig ] || chkconfig xapi on +[ ! -x /sbin/chkconfig ] || chkconfig management-interface on +[ ! -x /sbin/chkconfig ] || chkconfig xenservices on +[ ! -x /sbin/chkconfig ] || chkconfig xapi-domains on +[ ! -x /sbin/chkconfig ] || chkconfig perfmon on +[ ! -x /sbin/chkconfig ] || chkconfig v6d on %post squeezed [ ! -x /sbin/chkconfig ] || chkconfig squeezed on --===============0579653266== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0579653266==-- From xen-api-bounces@lists.xensource.com Tue Jun 01 11:27:17 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 11:27:17 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJWBJ-0000sm-LJ; Tue, 01 Jun 2010 11:27:17 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJWBA-0000qs-Al for xen-api@lists.xensource.com; Tue, 01 Jun 2010 11:27:08 -0700 X-ASG-Debug-ID: 1275416826-4e5e01390000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from outmail149113.authsmtp.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id E847429085D for ; Tue, 1 Jun 2010 11:27:07 -0700 (PDT) Received: from outmail149113.authsmtp.com (outmail149113.authsmtp.com [62.13.149.113]) by spam.xensource.com with ESMTP id 9IsUodoxUiZIMk4P for ; Tue, 01 Jun 2010 11:27:07 -0700 (PDT) X-Barracuda-Envelope-From: blp@benpfaff.org Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt5.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id o51IR6IV098508; Tue, 1 Jun 2010 19:27:06 +0100 (BST) Received: from blp (173-164-153-21-SFBA.hfc.comcastbusiness.net [173.164.153.21]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id o51IQvBr042948 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 1 Jun 2010 19:26:59 +0100 (BST) Received: from blp by blp with local (Exim 4.71) (envelope-from ) id 1OJWAy-0008Rs-7r; Tue, 01 Jun 2010 11:26:56 -0700 Date: Tue, 1 Jun 2010 11:26:56 -0700 From: Ben Pfaff To: xen-api@lists.xensource.com X-ASG-Orig-Subj: XCP - additional ovs testing? Message-ID: <20100601182656.GG31659@nicira.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Server-Quench: 44208748-6dab-11df-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdwYQ8QAVZfSBwy AC4CFCFJRwtjIQdD FxoeKRdbOF4EFV4Q JB4DaXhONhpGHQgB E2cCUVZSWlh4F2Jy aBRQawFDY09NQQdr T0pMQFdNFUs3BB14 Z1hsEBl2dQxCcDBz Z0NqEHRfXkRyckJ1 X0gARD8bZGY0Pn0X UBJRagNUcgFMeh8X Ylh8AT1lEgUXe2ox EwMyIzE2OzxbYCNL WUkRIEkOQEAESVYA X-Authentic-SMTP: 61633331373532.1015:706/Kp X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Barracuda-Connect: outmail149113.authsmtp.com[62.13.149.113] X-Barracuda-Start-Time: 1275416827 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31348 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] XCP - additional ovs testing? X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com [This was originally on xen-devel. I'm resending to xen-api at a suggestion from Goncalo Gomes, who thought this might be a better place to ask. My apologies if you've already read it.] I noticed an item on the most recent XCP meeting minutes, "vSwitch - needs more testing". As one of the OVS developers, I'm curious what kind of additional testing is needed. Perhaps I can get our QA guys to add some more tests to what they do already, or I can ask them whether we can give out a description of the testing we do. Currently we internally test XenServer, but not XCP, but I imagine that some of the tests are still useful. _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-devel-bounces@lists.xensource.com Tue Jun 01 13:00:46 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 01 Jun 2010 13:00:46 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJXdl-0004hl-Pq; Tue, 01 Jun 2010 13:00:46 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJXbZ-0004SA-0g for xen-devel@lists.xensource.com; Tue, 01 Jun 2010 12:58:29 -0700 X-ASG-Debug-ID: 1275422303-64b000450000-8pertM X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 321A02909F0; Tue, 1 Jun 2010 12:58:24 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 7ZyLtKKMrcNKw3ci (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Tue, 01 Jun 2010 12:58:24 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,342,1272844800"; d="scan'208";a="193935" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 01 Jun 2010 19:58:22 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Tue, 1 Jun 2010 20:58:22 +0100 From: Dave Scott To: 'Ben Pfaff' , "xen-api@lists.xensource.com" , "'xen-devel@lists.xensource.com'" Date: Tue, 1 Jun 2010 20:58:22 +0100 X-ASG-Orig-Subj: RE: [Xen-API] XCP - additional ovs testing? Thread-Topic: [Xen-API] XCP - additional ovs testing? Thread-Index: AcsBuBFroauevG+tQRW2KIRNSucIiwACjw1g Message-ID: <81A73678E76EA642801C8F2E4823AD21807FFE692C@LONPMAILBOX01.citrite.net> References: <20100601182656.GG31659@nicira.com> In-Reply-To: <20100601182656.GG31659@nicira.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275422308 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31354 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: Subject: [Xen-devel] RE: [Xen-API] XCP - additional ovs testing? X-BeenThere: xen-devel@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com Hi Ben, > [This was originally on xen-devel. I'm resending to xen-api at a > suggestion from Goncalo Gomes, who thought this might be a better place > to ask. My apologies if you've already read it.] Thanks for the retransmit -- I was intending to reply to the original messa= ge but forgot. > I noticed an item on the most recent XCP meeting minutes, "vSwitch - > needs more testing". As one of the OVS developers, I'm curious what > kind of additional testing is needed. I think the sentiment was, "everyone please try it in your environment and = give us some feedback". As you say, there's lots of explicit testing going = on so we're confident it's great. However there's always the slim possibili= ty that a problem surfaces in some obscure environment-- so the more end-us= er testing it gets the better. Note that XCP 0.5 (should be in RC form RSN) will have a refreshed openvswi= tch so that should be even better than the older snapshot in XCP 0.1.1. > Perhaps I can get our QA guys to > add some more tests to what they do already, or I can ask them whether > we can give out a description of the testing we do. Currently we > internally test XenServer, but not XCP, but I imagine that some of the > tests are still useful. That would be interesting. As far as networking goes, XenServer uses the sa= me code as XCP so the test results should carry over nicely. Cheers, Dave _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel From xen-api-bounces@lists.xensource.com Wed Jun 02 06:49:10 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 02 Jun 2010 06:49:10 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJoJh-0003fX-J1; Wed, 02 Jun 2010 06:49:09 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJoJU-0003cY-QI for xen-api@lists.xensource.com; Wed, 02 Jun 2010 06:48:56 -0700 X-ASG-Debug-ID: 1275486532-6d3d006f0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 4443C291C51 for ; Wed, 2 Jun 2010 06:48:53 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id Iu0AMa50PeLMCUOF (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 02 Jun 2010 06:48:53 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,347,1272844800"; d="scan'208";a="208654" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 02 Jun 2010 13:48:52 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Wed, 2 Jun 2010 14:48:52 +0100 Received: from snoosnoo2.uk.xensource.com ([10.80.2.49] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OJoJP-0006NT-WD for xen-api@lists.xensource.com; Wed, 02 Jun 2010 14:48:52 +0100 Content-Type: multipart/mixed; boundary="===============0251579300==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Turn the netdev dir into a library in xen-api-libs.hg X-Mercurial-Node: b06f07f4cd089928ee177f3b800ba454fa6d2771 Message-ID: User-Agent: Mercurial-patchbomb/1.3.1 Date: Wed, 2 Jun 2010 13:48:43 +0000 From: Jonathan Ludlam To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275486535 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31424 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Turn the netdev dir into a library in xen-api-libs.hg X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0251579300== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Patch subject is complete summary. ocaml/OMakefile | 1 - ocaml/in_guest_install/OMakefile | 6 +- ocaml/netdev/OMakefile | 5 - ocaml/netdev/addr_stubs.c | 116 ----------- ocaml/netdev/bridge_stubs.c | 85 -------- ocaml/netdev/link_stubs.c | 179 ----------------- ocaml/netdev/netdev.h | 33 --- ocaml/netdev/netdev.ml | 412 ----------------------------------------- ocaml/netdev/netdev.mli | 138 ------------- ocaml/netdev/sockios_compat.h | 6 - ocaml/xapi/OMakefile | 6 +- ocaml/xe-cli/OMakefile | 5 +- ocaml/xe-cli/rt/OMakefile | 6 +- ocaml/xenops-ts/OMakefile | 6 +- ocaml/xenops/OMakefile | 8 +- ocaml/xiu/OMakefile | 6 +- 16 files changed, 21 insertions(+), 997 deletions(-) --===============0251579300== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User Jonathan Ludlam # Date 1275485468 -3600 # Node ID b06f07f4cd089928ee177f3b800ba454fa6d2771 # Parent d3c124fa2c15930d287cb67f6b34547d90923043 [mq]: netdev-library diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/OMakefile --- a/ocaml/OMakefile +++ b/ocaml/OMakefile @@ -22,7 +22,6 @@ xva \ guest \ console \ - netdev \ auth \ events \ in_guest_install \ diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/in_guest_install/OMakefile --- a/ocaml/in_guest_install/OMakefile +++ b/ocaml/in_guest_install/OMakefile @@ -1,6 +1,6 @@ -OCAML_LIBS = ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../netdev/netdev ../xenops/xenops -OCAMLINCLUDES = ../idl/ocaml_backend ../autogen ../idl ../netdev ../xenops -OCAMLPACKS = unix stdext xml-light2 +OCAML_LIBS = ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../xenops/xenops +OCAMLINCLUDES = ../idl/ocaml_backend ../autogen ../idl ../xenops +OCAMLPACKS = unix stdext xml-light2 netdev OCAMLFLAGS += -dtypes -warn-error F -cclib -static diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/netdev/OMakefile --- a/ocaml/netdev/OMakefile +++ /dev/null @@ -1,5 +0,0 @@ -OCamlLibraryClib(netdev, netdev, netdev_stubs) -StaticCLibrary(netdev_stubs, bridge_stubs link_stubs addr_stubs) -OCamlDocLibrary(netdev, netdev) - -OCAML_LIBS += netdev diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/netdev/addr_stubs.c --- a/ocaml/netdev/addr_stubs.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - */ -/* - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -static value alloc_addr(struct sockaddr *sock) -{ - CAMLparam0(); - CAMLlocal1(result); - char output[36]; - int ret = 0; - - switch (sock->sa_family) { - case AF_INET: { - struct sockaddr_in *in = (struct sockaddr_in *) sock; - int v = ntohl(in->sin_addr.s_addr); - ret = snprintf(output, sizeof(output), "%u.%u.%u.%u", - (v >> 24) & 0xff, (v >> 16) & 0xff, - (v >> 8) & 0xff, v & 0xff); - break; - } - case AF_INET6: { - struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) sock; - ret = snprintf(output, sizeof(output), - "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", - in6->sin6_addr.s6_addr[0], - in6->sin6_addr.s6_addr[1], - in6->sin6_addr.s6_addr[2], - in6->sin6_addr.s6_addr[3], - in6->sin6_addr.s6_addr[4], - in6->sin6_addr.s6_addr[5], - in6->sin6_addr.s6_addr[6], - in6->sin6_addr.s6_addr[7], - in6->sin6_addr.s6_addr[8], - in6->sin6_addr.s6_addr[9], - in6->sin6_addr.s6_addr[10], - in6->sin6_addr.s6_addr[11], - in6->sin6_addr.s6_addr[12], - in6->sin6_addr.s6_addr[13]); - break; - } - default: - /* just ignore */ - ; - } - result = caml_alloc_string(ret); - memcpy(String_val(result), output, ret); - CAMLreturn(result); -} - -value stub_if_getaddr(value unit) -{ - CAMLparam0(); - CAMLlocal5(result, temp, name, addrstr, netmaskstr); - CAMLlocal1(tuple); - int ret; - struct ifaddrs *ifaddrs, *tmp; - struct sockaddr *sock, *netmask; - - result = temp = Val_emptylist; - name = addrstr = Val_int(0); - - ret = getifaddrs(&ifaddrs); - if (ret < 0) - caml_failwith("cannot get interface address"); - - for (tmp = ifaddrs; tmp; tmp = tmp->ifa_next) { - sock = tmp->ifa_addr; - netmask = tmp->ifa_netmask; - - if (sock->sa_family == AF_INET || sock->sa_family == AF_INET6) { - name = caml_copy_string(tmp->ifa_name); - addrstr = alloc_addr(sock); - netmaskstr = alloc_addr(netmask); - - tuple = caml_alloc_tuple(4); - Store_field(tuple, 0, name); - Store_field(tuple, 1, addrstr); - Store_field(tuple, 2, netmaskstr); - Store_field(tuple, 3, Val_bool(sock->sa_family == AF_INET6)); - - result = caml_alloc_small(2, Tag_cons); - Field(result, 0) = tuple; - Field(result, 1) = temp; - - temp = result; - } - } - - freeifaddrs(ifaddrs); - - CAMLreturn(result); -} diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/netdev/bridge_stubs.c --- a/ocaml/netdev/bridge_stubs.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - */ -/* - */ - -#include "netdev.h" - -#include -#include -#include -#include -#include -#include - -value stub_bridge_add(value fd, value name) -{ - CAMLparam2(fd, name); - int err; - - err = ioctl(Int_val(fd), SIOCBRADDBR, String_val(name)); - CHECK_IOCTL(err, "bridge add"); - CAMLreturn(Val_unit); -} - -value stub_bridge_del(value fd, value name) -{ - CAMLparam2(fd, name); - int err; - - err = ioctl(Int_val(fd), SIOCBRDELBR, String_val(name)); - CHECK_IOCTL(err, "bridge del"); - CAMLreturn(Val_unit); -} - -value stub_bridge_intf_add(value fd, value name, value intf) -{ - CAMLparam3(fd, name, intf); - int err; - struct ifreq ifr; - int ifindex; - - ifindex = if_nametoindex(String_val(intf)); - if (ifindex == 0) - caml_failwith("Device_not_found"); - - memset(ifr.ifr_name, '\000', IFNAMSIZ); - strncpy(ifr.ifr_name, String_val(name), IFNAMSIZ); - ifr.ifr_ifindex = ifindex; - - err = ioctl(Int_val(fd), SIOCBRADDIF, &ifr); - CHECK_IOCTL(err, "bridge intf add"); - CAMLreturn(Val_unit); -} - -value stub_bridge_intf_del(value fd, value name, value intf) -{ - CAMLparam3(fd, name, intf); - int err; - struct ifreq ifr; - int ifindex; - - ifindex = if_nametoindex(String_val(intf)); - if (ifindex == 0) - caml_failwith("Device_not_found"); - - memset(ifr.ifr_name, '\000', IFNAMSIZ); - strncpy(ifr.ifr_name, String_val(name), IFNAMSIZ); - ifr.ifr_ifindex = ifindex; - - err = ioctl(Int_val(fd), SIOCBRDELIF, &ifr); - CHECK_IOCTL(err, "bridge intf del"); - - CAMLreturn(Val_unit); -} diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/netdev/link_stubs.c --- a/ocaml/netdev/link_stubs.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - */ -/* - */ - -#include "netdev.h" - -#include -#include -#include -#include -#include -#include - -#define SET_IFREQ(ifreq, devname) \ - strncpy(ifreq.ifr_name, devname, IFNAMSIZ) - -static int link_change_flags(int fd, char *name, - unsigned int flags, unsigned int mask) -{ - struct ifreq ifr; - int ret; - - SET_IFREQ(ifr, name); - ret = ioctl(fd, SIOCGIFFLAGS, &ifr); - if (ret < 0) - return ret; - if ((ifr.ifr_flags ^ flags) & mask) { - ifr.ifr_flags &= ~mask; - ifr.ifr_flags |= mask & flags; - ret = ioctl(fd, SIOCSIFFLAGS, &ifr); - } - return ret; -} - -static int link_change_name(int fd, char *name, char *newname) -{ - struct ifreq ifr; - int ret; - - SET_IFREQ(ifr, name); - strncpy(ifr.ifr_newname, newname, IFNAMSIZ); - ret = ioctl(fd, SIOCSIFNAME, &ifr); - return ret; -} - -value stub_link_up(value fd, value dev) -{ - CAMLparam2(fd, dev); - int err; - err = link_change_flags(Int_val(fd), String_val(dev), IFF_UP, IFF_UP); - CHECK_IOCTL(err, "link up"); - CAMLreturn(Val_unit); -} - -value stub_link_is_up(value fd, value dev) -{ - CAMLparam2(fd, dev); - struct ifreq ifr; - int err; - - SET_IFREQ(ifr, String_val(dev)); - err = ioctl(Int_val(fd), SIOCGIFFLAGS, &ifr); - CHECK_IOCTL(err, "link_is_up"); - CAMLreturn(Val_bool (ifr.ifr_flags & IFF_UP)); -} - -value stub_link_down(value fd, value dev) -{ - CAMLparam2(fd, dev); - int err; - err = link_change_flags(Int_val(fd), String_val(dev), 0, IFF_UP); - CHECK_IOCTL(err, "link down"); - - CAMLreturn(Val_unit); -} - -value stub_link_change_name(value fd, value dev, value newname) -{ - CAMLparam3(fd, dev, newname); - int err; - - err = link_change_name(Int_val(fd), - String_val(dev), String_val(newname)); - CHECK_IOCTL(err, "link change name"); - CAMLreturn(Val_unit); -} - -value stub_link_multicast(value fd, value dev, value v) -{ - CAMLparam3(fd, dev, v); - int err; - err = link_change_flags(Int_val(fd), String_val(dev), - ((Bool_val(v)) ? IFF_MULTICAST : 0), IFF_MULTICAST); - CHECK_IOCTL(err, "link multicast"); - CAMLreturn(Val_unit); -} - -value stub_link_arp(value fd, value dev, value v) -{ - CAMLparam3(fd, dev, v); - int err; - err = link_change_flags(Int_val(fd), String_val(dev), - ((Bool_val(v)) ? 0 : IFF_NOARP), IFF_NOARP); - CHECK_IOCTL(err, "link arp"); - CAMLreturn(Val_unit); -} - -#ifdef SIOCETHTOOL -#define ETHTOOL_GSET 0x00000001 /* Get settings. */ - -#include -/* copied from linux/ethtool.h and made compilable with userspace types */ -struct ethtool_cmd { - uint32_t cmd; - uint32_t supported; /* Features this interface supports */ - uint32_t advertising; /* Features this interface advertises */ - uint16_t speed; /* The forced speed, 10Mb, 100Mb, gigabit */ - uint8_t duplex; /* Duplex, half or full */ - uint8_t port; /* Which connector port */ - uint8_t phy_address; - uint8_t transceiver; /* Which transceiver to use */ - uint8_t autoneg; /* Enable or disable autonegotiation */ - uint32_t maxtxpkt; /* Tx pkts before generating tx int */ - uint32_t maxrxpkt; /* Rx pkts before generating rx int */ - uint32_t reserved[4]; -}; - -value stub_link_get_status(value fd, value dev) -{ - CAMLparam2(fd, dev); - CAMLlocal1(ret); - struct ifreq ifr; - struct ethtool_cmd ecmd; - int err, speed, duplex; - - SET_IFREQ(ifr, String_val(dev)); - ecmd.cmd = ETHTOOL_GSET; - ifr.ifr_data = (caddr_t) &ecmd; - err = ioctl(Int_val(fd), SIOCETHTOOL, &ifr); - CHECK_IOCTL(err, "get ethtool"); - - /* CA-24610: apparently speeds can be other values eg 2500 */ - speed = ecmd.speed; - - switch (ecmd.duplex) { - case 0: duplex = 1; break; - case 1: duplex = 2; break; - default: duplex = 0; - } - - ret = caml_alloc_tuple(2); - Store_field(ret, 0, Val_int(speed)); - Store_field(ret, 1, Val_int(duplex)); - - CAMLreturn(ret); -} -#else -value stub_link_get_status(value fd, value dev) -{ - CAMLparam2(fd, dev); - CAMLlocal1(ret); - ret = caml_alloc_tuple(2); - Store_field(ret, 0, Val_int(0)); /* unknown speed */ - Store_field(ret, 1, Val_int(0)); /* unknown duplex */ - CAMLreturn(ret); -} -#endif diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/netdev/netdev.h --- a/ocaml/netdev/netdev.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - */ -/* - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef SIOCBRADDBR -#include "sockios_compat.h" -#endif - -#define CHECK_IOCTL(err, S) \ - if (err < 0) { \ - caml_failwith(S ": ioctl failed"); \ - } diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/netdev/netdev.ml --- a/ocaml/netdev/netdev.ml +++ /dev/null @@ -1,412 +0,0 @@ -(* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - *) -open Stringext -open Forkhelpers - -type kind = Bridge | Vswitch - -type network_ops = { - kind: kind; - add: string -> ?uuid:string -> unit; - del: string -> unit; - list: unit -> string list; - - exists: string -> bool; - - intf_add: string -> string -> unit; - intf_del: string -> string -> unit; - intf_list: string -> string list; - - get_bridge: string -> string; - is_on_bridge: string -> bool; - - set_forward_delay: string -> int -> unit; -} - -exception Unknown_network_backend of string -exception Invalid_network_backend_operation of string * kind - -let string_of_kind kind = match kind with - | Bridge -> "bridge" - | Vswitch -> "openvswitch" - -let kind_of_string s = match s with - | "bridge" -> Bridge - | "vswitch" -> Vswitch - | "openvswitch" -> Vswitch - | _ -> raise (Unknown_network_backend s) - -module Internal = struct - -let control_socket () = - try - Unix.socket Unix.PF_INET Unix.SOCK_DGRAM 0 - with - exn -> - try - Unix.socket Unix.PF_UNIX Unix.SOCK_DGRAM 0 - with - exn -> - Unix.socket Unix.PF_INET6 Unix.SOCK_DGRAM 0 - -let with_fd f = - let fd = control_socket () in - let r = begin try - f fd - with - exn -> - Unix.close fd; - raise exn - end in - Unix.close fd; - r - -let exec cmd = - let ret = Sys.command cmd in - if ret <> 0 then - failwith (Printf.sprintf "cmd returned %d" ret) - -let read_one_line file = - let inchan = open_in file in - try - let result = input_line inchan in - close_in inchan; - result - with exn -> close_in inchan; raise exn - -let write_one_line file l = - let outchan = open_out file in - try - output_string outchan (l ^ "\n"); - close_out outchan - with - exn -> close_out outchan; raise exn -end - -module Bridge = struct - -external _add : Unix.file_descr -> string -> unit = "stub_bridge_add" -external _del : Unix.file_descr -> string -> unit = "stub_bridge_del" - -let add name ?uuid = - Internal.with_fd (fun fd -> _add fd name) - -let del name = - Internal.with_fd (fun fd -> _del fd name) - -let list () = - let dirs = Array.to_list (Sys.readdir "/sys/class/net") in - List.filter (fun dir -> - Sys.file_exists ("/sys/class/net/" ^ dir ^ "/bridge")) dirs - -let exists name = - try Sys.file_exists ("/sys/class/net/" ^ name ^ "/bridge") - with _ -> false - -let set name obj v = - let file = "/sys/class/net/" ^ name ^ "/bridge/" ^ obj in - let outchan = open_out file in - output_string outchan v; - output_char outchan '\n'; - close_out outchan - -let get name obj = Internal.read_one_line ("/sys/class/net/" ^ name ^ "/bridge/" ^ obj) - -let _forward_delay = "forward_delay" -let _hello_time = "hello_time" -let _max_age = "max_age" -let _ageing_time = "ageing_time" -let _stp_state = "stp_state" -let _priority = "priority" -let _bridge_id = "bridge_id" - -let get_id name = - get name _bridge_id - -let set_forward_delay name v = - set name _forward_delay (string_of_int v) - -let get_forward_delay name = - int_of_string (get name _forward_delay) - -let set_hello_time name v = - set name _hello_time (string_of_int v) - -let get_hello_time name = - int_of_string (get name _hello_time) - -let set_max_age name v = - set name _max_age (string_of_int v) - -let get_max_age name = - int_of_string (get name _max_age) - -let set_ageing_time name v = - set name _ageing_time (string_of_int v) - -let get_ageing_time name = - int_of_string (get name _ageing_time) - -let set_stp_state name v = - set name _stp_state (if v then "1" else "0") - -let get_stp_state name = - get name _stp_state <> "0" - -let set_priority name v = - set name _priority (string_of_int v) - -let get_priority name = - int_of_string (get name _priority) - -(* bridge interfaces control function *) -external _intf_add : Unix.file_descr -> string -> string -> unit - = "stub_bridge_intf_add" -external _intf_del : Unix.file_descr -> string -> string -> unit - = "stub_bridge_intf_del" - -let intf_add name intf = - Internal.with_fd (fun fd -> _intf_add fd name intf) - -let intf_del name intf = - Internal.with_fd (fun fd -> _intf_del fd name intf) - -let intf_list name = - Array.to_list (Sys.readdir ("/sys/class/net/" ^ name ^ "/brif/")) - -let getpath dev attr = Printf.sprintf "/sys/class/net/%s/%s" dev attr - -let is_on_bridge name = try Unix.access (getpath name "brport") [ Unix.F_OK ]; true with _ -> false - -let get_bridge name = Filename.basename (Unix.readlink ((getpath name "brport") ^ "/bridge")) - -let ops = { - kind = Bridge; - - add = add; - del = del; - list = list; - - exists = exists; - - intf_add = intf_add; - intf_del = intf_del; - intf_list = intf_list; - - get_bridge = get_bridge; - is_on_bridge = is_on_bridge; - - set_forward_delay = set_forward_delay; -} - -end - -module Vswitch = struct - -let vsctl_script = "/usr/bin/ovs-vsctl" - -let vsctl args = - Unix.access vsctl_script [ Unix.X_OK ]; - let output, _ = Forkhelpers.execute_command_get_output vsctl_script args in - let stripped = Stringext.String.strip (fun c -> c='\n') output in - match stripped with - | "" -> [] - | s -> Stringext.String.split '\n' s - -let add name ?uuid = - let extra = match uuid with - | Some uuid' -> ["--"; "br-set-external-id"; name; "network-uuids"; uuid'] - | None -> ["--"; "foo"] in - ignore(vsctl (["add-br" ; name] @ extra)) -let del name = ignore(vsctl ["del-br" ; name]) -let list () = vsctl [ "list-br" ] - -let exists name = List.exists (fun x -> x = name) (list ()) - -let intf_add name intf = ignore(vsctl ["add-port"; name; intf]) -let intf_del name intf = ignore(vsctl ["del-port"; name; intf]) -let intf_list name = vsctl [ "list-ports"; name ] - -let get_bridge name = - match vsctl [ "port-to-br"; name ] with - | l::[] -> l - | [] -> failwith ("ovs-vsctl port-to-br: did not return a bridge for port " ^ name) - | _ -> failwith ("ovs-vsctl port-to-br: returned an unexpected number of results for port " ^ name) - -let is_on_bridge name = - match vsctl [ "port-to-br"; name ] with - | l::[] -> true - | [] -> false - | _ -> failwith ("ovs-vsctl port-to-br: returned an unexpected number of results for port " ^ name) - -let ops = { - kind = Vswitch; - - add = add; - del = del; - list = list; - - exists = exists; - - intf_add = intf_add; - intf_del = intf_del; - intf_list = intf_list; - - get_bridge = get_bridge; - is_on_bridge = is_on_bridge; - - set_forward_delay = fun name v -> raise (Invalid_network_backend_operation ("set_forward_delay", Vswitch)) -} - -end - -module Link = struct - -type speed = int (* see CA-24610 *) -type duplex = Duplex_unknown | Duplex_half | Duplex_full - -let string_of_duplex = function - | Duplex_unknown -> "unknown" - | Duplex_half -> "half" - | Duplex_full -> "full" - -let duplex_of_string = function - | "full" -> Duplex_full - | "half" -> Duplex_half - | _ -> Duplex_unknown - -let int_of_speed x = x -let speed_of_int x = x -let speed_unknown = 0 - -external _up : Unix.file_descr -> string -> unit = "stub_link_up" -external _is_up : Unix.file_descr -> string -> bool = "stub_link_is_up" -external _down : Unix.file_descr -> string -> unit = "stub_link_down" -external _multicast : Unix.file_descr -> string -> bool -> unit = "stub_link_multicast" -external _arp : Unix.file_descr -> string -> bool -> unit = "stub_link_arp" -external _change_name : Unix.file_descr -> string -> string -> unit = "stub_link_change_name" -external _get_status : Unix.file_descr -> string -> speed * duplex = "stub_link_get_status" - -let up name = - Internal.with_fd (fun fd -> _up fd name) - -let is_up name = - Internal.with_fd (fun fd -> try _is_up fd name with _ -> false) - -let down name = - Internal.with_fd (fun fd -> _down fd name) - -let multicast name v = - Internal.with_fd (fun fd -> _multicast fd name v) - -let arp name v = - Internal.with_fd (fun fd -> _arp fd name v) - -let change_name name newname = - Internal.with_fd (fun fd -> _change_name fd name newname) - -let set_addr name addr = - (* temporary *) - Internal.exec (Printf.sprintf "ip link set %s addr %s" name addr) - -let get_status name = - Internal.with_fd (fun fd -> _get_status fd name) - -end - -module Addr = struct - -let flush name = - Internal.exec (Printf.sprintf "ip addr flush %s" name) - -external __get_all : unit -> (string * string * string * bool) list = "stub_if_getaddr" - -type addr = IPV4 of string * string | IPV6 of string * string - -let get_all () = - List.map (fun (name, addr, netmask, inet6) -> name, if inet6 then IPV6 (addr,netmask) else IPV4 (addr,netmask)) - (__get_all ()) - -let get_all_ipv4 () = - let ipv4s = List.filter (fun (_, _, _, inet6) -> not inet6) (__get_all ()) in - List.map (fun (name, addr, netmask, _) -> - name, Unix.inet_addr_of_string addr, Unix.inet_addr_of_string netmask - ) ipv4s - -let get name = - List.map (fun (a,b,c) -> (b,c)) (List.filter (fun (dev, _, _) -> dev = name) (get_all_ipv4 ())) - -end - -let list () = - Array.to_list (Sys.readdir "/sys/class/net") - -let getpath dev attr = Printf.sprintf "/sys/class/net/%s/%s" dev attr - -let get_address name = Internal.read_one_line (getpath name "address") - -let get_mtu name = Internal.read_one_line (getpath name "mtu") -let set_mtu name mtu = - Internal.write_one_line (getpath name "mtu") - (string_of_int mtu) - -let get_by_address address = - List.filter - (fun device -> - (* CA-21402: Not everything returned by list() is guaranteed to be a directory containing an address; - so we have to make sure we catch exceptions here so we keep trying the next one and so on.. *) - try String.lowercase (get_address device) = String.lowercase address with _ -> false) - (list ()) - -let get_pcibuspath name = - try - let devpath = Unix.readlink (getpath name "device") in - List.hd (List.rev (String.split '/' devpath)) - with exn -> "N/A" - -let get_carrier name = - let i = int_of_string (Internal.read_one_line (getpath name "carrier")) in - match i with 1 -> true | 0 -> false | _ -> false - -let get_ids name = - let read_id_from path = - try - let l = Internal.read_one_line path in - (* trim 0x *) - String.sub l 2 (String.length l - 2) - with _ -> "" - in - read_id_from (getpath name "device/vendor"), - read_id_from (getpath name "device/device") - -let is_physical name = - try - let link = Unix.readlink (getpath name "device") in - (* filter out device symlinks which look like /../../../devices/xen-backend/vif- *) - not(List.mem "xen-backend" (String.split '/' link)) - with _ -> false - -(* Dispatch network backend operations. *) - -let network_config_file = "/etc/xensource/network.conf" -let network_backend = - try - kind_of_string (String.strip String.isspace (Unixext.read_whole_file_to_string network_config_file)) - with - | Unix.Unix_error(Unix.ENOENT, "open", _) -> Bridge - | Unix.Unix_error(err, op, path) -> failwith (Printf.sprintf "Unix error: %s (%s,%s)\n" (Unix.error_message err) op path) - -let network = match network_backend with - | Bridge -> Bridge.ops - | Vswitch -> Vswitch.ops diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/netdev/netdev.mli --- a/ocaml/netdev/netdev.mli +++ /dev/null @@ -1,138 +0,0 @@ -(* - * Copyright (C) 2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - *) -(** Interface to the domain 0 network stack. *) - -(** Enumerates possible network backend types. *) -type kind = - Bridge (** Linux Bridge based networking *) - | Vswitch (** Vswitch based networking *) - -(** Possible operations on each network backend type. *) -type network_ops = { - kind : kind; (** The type of network backend. *) - add : string -> ?uuid:string -> unit; (** Add a bridge. *) - del : string -> unit; (** Remove a bridge. *) - list : unit -> string list; (** List all bridges. *) - exists : string -> bool; (** Query the existance of a bridge. *) - intf_add : string -> string -> unit; (** Add a network device as a port on a bridge. *) - intf_del : string -> string -> unit; (** Remove a network device from a bridge. *) - intf_list : string -> string list; (** List all network devices currently attached as a port on a bridge. *) - get_bridge : string -> string; (** Return the bridge to which a network device is currently attached. *) - is_on_bridge : string -> bool; (** Query whether a network device is currently attached to a bridge. *) - set_forward_delay : string -> int -> unit;(** Set the forwarding delay for a device on a bridge. *) -} - -(** Raised when an invalid network backend is detected. *) -exception Unknown_network_backend of string - -(** Raised when an operation in network_ops is not valid for a particular kind *) -exception Invalid_network_backend_operation of string * kind - -(** Returns string name of a network backend type. *) -val string_of_kind : kind -> string - -(** Converts a string to a valid network backend type, or raises Unknown_network_backend. *) -val kind_of_string : string -> kind - -(** Module dealing with network device link characteristics *) -module Link : - sig - (** Link speed in megabits. *) - type speed - - (** Convert speed to a string. *) - val int_of_speed : speed -> int - - (** Create speed from a string. *) - val speed_of_int : int -> speed - - (** Magic speed value representing Unknown. *) - val speed_unknown : speed - - (** Device duplex. *) - type duplex = - Duplex_unknown (** Device duplex is unknown. *) - | Duplex_half (** Device is running half-duplex. *) - | Duplex_full (** Device is running full-duplex. *) - - (** Convert duplex setting to string. *) - val string_of_duplex : duplex -> string - - (** Create duplex from a string *) - val duplex_of_string : string -> duplex - - (** Bring up a network device. *) - val up : string -> unit - - (** Determine if a network device is up. *) - val is_up : string -> bool - - (** Bring down a network device. *) - val down : string -> unit - - (** Configure a device to allow or disallow multicast. *) - val multicast : string -> bool -> unit - - (** Configure a device to respond to or ignore ARP requests. *) - val arp : string -> bool -> unit - - (** Change the name of a network device. *) - val change_name : string -> string -> unit - - (** Set MAC address of a device. *) - val set_addr : string -> string -> unit - - (** Get current speed a duplex settings for a device. *) - val get_status : string -> speed * duplex - end - -(** Module dealing with IP addresses on network devices. *) -module Addr : - sig - (** Flush all the addresses configured on a device. *) - val flush : string -> unit - - (** Get all IPV4 addresses associated with a device. *) - val get : string -> (Unix.inet_addr * Unix.inet_addr) list - end - -(** List all the interfaces on the system. *) -val list : unit -> string list - -(** Return MAC address for a network device. *) -val get_address : string -> string - -(** Get device MTU. *) -val get_mtu : string -> string - -(** Set device MTU. *) -val set_mtu : string -> int -> unit - -(** Returns the list of device names (eg physical + VLAN) which a particular MAC address. *) -val get_by_address : string -> string list - -(** Returns the PCI bus path of a device. *) -val get_pcibuspath : string -> string - -(** Returns the carrier status for a device. *) -val get_carrier : string -> bool - -(** Returns PCI vendor and device ID for network device. *) -val get_ids : string -> string * string - -(** Indicates whether the given interface is a physical interface *) -val is_physical : string -> bool - -(** Dispatch operation to correct backend device *) -val network : network_ops diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/netdev/sockios_compat.h --- a/ocaml/netdev/sockios_compat.h +++ /dev/null @@ -1,6 +0,0 @@ -/* Our dom0 chroot doesn't include up to date headers: */ - -#define SIOCBRADDBR 0x89a0 /* create new bridge device */ -#define SIOCBRDELBR 0x89a1 /* remove bridge device */ -#define SIOCBRADDIF 0x89a2 /* add interface to bridge */ -#define SIOCBRDELIF 0x89a3 /* remove interface from bridge */ diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/xapi/OMakefile --- a/ocaml/xapi/OMakefile +++ b/ocaml/xapi/OMakefile @@ -1,10 +1,10 @@ -OCAMLPACKS = xml-light2 cdrom pciutil sexpr log stunnel http-svr rss xen-utils +OCAMLPACKS = xml-light2 cdrom pciutil sexpr log stunnel http-svr rss xen-utils netdev OCAML_LIBS = ../util/version ../util/vm_memory_constraints ../util/sanitycheck ../util/stats \ ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../idl/ocaml_backend/server ../util/ocamltest OCAMLINCLUDES = ../idl ../idl/ocaml_backend \ ../autogen ../database/ \ ../xenops ../xva ../util \ - ../netdev ../auth ../license ../client_records ../rfb ../gpg + ../auth ../license ../client_records ../rfb ../gpg @@ -14,7 +14,7 @@ # xen stuff at all. # NB order of libraries is important: OMake cannot determine dependencies between libraries # (the same holds for OCaml packages) -XEN_OCAML_LIBS = ../netdev/netdev ../xenops/xenops ../auth/pam +XEN_OCAML_LIBS = ../xenops/xenops ../auth/pam XEN_OCAMLINCLUDES = XEN_OCAMLPACKS = xc xs cpuid OCAML_CLIBS = $(if $(equal $(COMPILE_XENSTUFF), yes), $(XEN_OCAML_CLIBS) $(OCAML_CLIBS), $(OCAML_CLIBS)) diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/xe-cli/OMakefile --- a/ocaml/xe-cli/OMakefile +++ b/ocaml/xe-cli/OMakefile @@ -11,11 +11,10 @@ section - OCAMLPACKS += xb xs - OCAML_CLIBS = ../xenops/statdev_stubs ../netdev/netdev_stubs + OCAMLPACKS += xb xs netdev + OCAML_CLIBS = ../xenops/statdev_stubs OCamlProgram(fatxe, cli options \ - ../netdev/netdev \ ../xapi/xapi_cli \ ../xapi/pool_role \ ../xapi/helpers \ diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/xe-cli/rt/OMakefile --- a/ocaml/xe-cli/rt/OMakefile +++ b/ocaml/xe-cli/rt/OMakefile @@ -1,6 +1,6 @@ -OCAML_LIBS = ../../netdev/netdev -OCAMLINCLUDES = ../../netdev -OCAMLPACKS = str xml-light2 log +OCAML_LIBS = +OCAMLINCLUDES = +OCAMLPACKS = str xml-light2 log netdev .SUBDIRS:geneva diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/xenops-ts/OMakefile --- a/ocaml/xenops-ts/OMakefile +++ b/ocaml/xenops-ts/OMakefile @@ -1,8 +1,8 @@ -OCAMLINCLUDES = ../netdev ../xenops -OCAML_LIBS = ../util/stats ../netdev/netdev ../xenops/xenops +OCAMLINCLUDES = ../xenops +OCAML_LIBS = ../util/stats ../xenops/xenops OCAML_CLIBS += $(XEN_OCAML_CLIBS) OCAML_LINK_FLAGS += $(XEN_OCAML_LINK_FLAGS) CFLAGS += $(XEN_CFLAGS) -OCAMLPACKS = xc xs stdext log cdrom +OCAMLPACKS = xc xs stdext log cdrom netdev OCamlProgram(runtest, runtest test ../xenops/xenvmlib) diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/xenops/OMakefile --- a/ocaml/xenops/OMakefile +++ b/ocaml/xenops/OMakefile @@ -1,10 +1,10 @@ -OCAMLINCLUDES = ../netdev ../util -OCAML_LIBS = ../netdev/netdev ../util/stats +OCAMLINCLUDES = ../util +OCAML_LIBS = ../util/stats OCAML_CLIBS += $(XEN_OCAML_CLIBS) OCAML_LINK_FLAGS+= $(XEN_OCAML_LINK_FLAGS) CFLAGS += $(XEN_CFLAGS) -OCAMLPACKS = threads xc xs stdext log cdrom +OCAMLPACKS = threads xc xs stdext log cdrom netdev OCAMLFLAGS += -thread LIBFILES = xenops_helpers xenbus balloon xenguestHelper domain hotplug device io statdev xal netman memory watch device_common squeeze squeeze_xen squeezed_rpc squeezed_state squeezed_rpc @@ -42,7 +42,7 @@ OCamlProgram(dbgring, dbgring) section - OCAMLINCLUDES = ../idl/ocaml_backend ../netdev ../idl + OCAMLINCLUDES = ../idl/ocaml_backend ../idl OCAMLFLAGS = -dtypes -warn-error F -cclib -static OCAMLPACKS = xc xs OCamlProgram(xs, xenstore_readdir) diff -r d3c124fa2c15 -r b06f07f4cd08 ocaml/xiu/OMakefile --- a/ocaml/xiu/OMakefile +++ b/ocaml/xiu/OMakefile @@ -1,6 +1,6 @@ -OCAMLPACKS = stdext xs -OCAML_LIBS += ../xenops/xenops ../netdev/netdev -OCAMLINCLUDES += ../xenops ../netdev +OCAMLPACKS = stdext xs netdev +OCAML_LIBS += ../xenops/xenops +OCAMLINCLUDES += ../xenops OCamlProgram(xiu, xiu) OCamlDocProgram(xiu, xiu) --===============0251579300== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0251579300==-- From xen-api-bounces@lists.xensource.com Wed Jun 02 06:49:43 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 02 Jun 2010 06:49:43 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJoKE-0003nE-TW; Wed, 02 Jun 2010 06:49:42 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJoJk-0003gc-2P for xen-api@lists.xensource.com; Wed, 02 Jun 2010 06:49:12 -0700 X-ASG-Debug-ID: 1275486548-516502470000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 92911291C53 for ; Wed, 2 Jun 2010 06:49:09 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id FjfdNE1EAPxbQWKO (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 02 Jun 2010 06:49:09 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,347,1272844800"; d="scan'208";a="208660" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 02 Jun 2010 13:49:07 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Wed, 2 Jun 2010 14:49:07 +0100 Received: from snoosnoo2.uk.xensource.com ([10.80.2.49] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OJoJf-0006O6-HY for xen-api@lists.xensource.com; Wed, 02 Jun 2010 14:49:07 +0100 Content-Type: multipart/mixed; boundary="===============0927168310==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Turn the netdev dir into a library in xen-api-libs.hg X-Mercurial-Node: b875536f6117d448213feb0d410a28f087ed21fe Message-ID: User-Agent: Mercurial-patchbomb/1.3.1 Date: Wed, 2 Jun 2010 13:49:00 +0000 From: Jonathan Ludlam To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275486550 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31424 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Subject: [Xen-API] [PATCH] Turn the netdev dir into a library in xen-api-libs.hg X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0927168310== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Patch subject is complete summary. Makefile.in | 5 + netdev/META.in | 4 + netdev/Makefile | 72 +++++++++ netdev/addr_stubs.c | 116 ++++++++++++++ netdev/bridge_stubs.c | 85 ++++++++++ netdev/link_stubs.c | 179 ++++++++++++++++++++++ netdev/netdev.h | 33 ++++ netdev/netdev.ml | 412 +++++++++++++++++++++++++++++++++++++++++++++++++++ netdev/netdev.mli | 138 +++++++++++++++++ netdev/sockios_compat.h | 6 + xapi-libs.spec | 1 + 11 files changed, 1051 insertions(+), 0 deletions(-) --===============0927168310== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User Jonathan Ludlam # Date 1275484240 -3600 # Node ID b875536f6117d448213feb0d410a28f087ed21fe # Parent ece26f39ce0998469291d08373815634b242d506 imported patch netdev-library diff -r ece26f39ce09 -r b875536f6117 Makefile.in --- a/Makefile.in +++ b/Makefile.in @@ -37,6 +37,7 @@ allxen: ifeq ($(HAVE_XEN),1) $(MAKE) -C mmap + $(MAKE) -C netdev $(MAKE) -C xc $(MAKE) -C xb $(MAKE) -C xs @@ -74,6 +75,7 @@ installxen: ifeq ($(HAVE_XEN),1) $(MAKE) -C mmap install + $(MAKE) -C netdev install $(MAKE) -C xc install $(MAKE) -C xb install $(MAKE) -C xs install @@ -112,6 +114,7 @@ ifeq ($(HAVE_XEN),1) $(MAKE) -C eventchn uninstall $(MAKE) -C xsrpc uninstall + $(MAKE) -C netdev uninstall $(MAKE) -C xs uninstall $(MAKE) -C xb uninstall $(MAKE) -C xc uninstall @@ -162,6 +165,7 @@ $(MAKE) -C stunnel doc $(MAKE) -C xsrpc doc $(MAKE) -C mmap doc + $(MAKE) -C netdev doc $(MAKE) -C forking_executioner doc $(MAKE) -C mlvm doc $(MAKE) -C cpuid doc @@ -190,6 +194,7 @@ cleanxen: $(MAKE) -C mmap clean + $(MAKE) -C netdev clean $(MAKE) -C xc clean $(MAKE) -C xb clean $(MAKE) -C xs clean diff -r ece26f39ce09 -r b875536f6117 netdev/META.in --- /dev/null +++ b/netdev/META.in @@ -0,0 +1,4 @@ +version = "@VERSION@" +description = "Bindings to network APIs" +requires = "stdext" +archive(native) = "netdev.cmxa" diff -r ece26f39ce09 -r b875536f6117 netdev/Makefile --- /dev/null +++ b/netdev/Makefile @@ -0,0 +1,72 @@ +CC = gcc +CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml +OCAMLC = ocamlc -g +OCAMLOPT = ocamlopt + +LDFLAGS = -cclib -L./ + +VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) +OCAMLOPTFLAGS = -g -dtypes +OCAMLFLAGS = -I ../stdext + +OCAMLABI := $(shell ocamlc -version) +OCAMLLIBDIR := $(shell ocamlc -where) +OCAMLDESTDIR ?= $(OCAMLLIBDIR) + +OBJS = netdev +INTF = $(foreach obj, $(OBJS),$(obj).cmi) +LIBS = netdev.cma netdev.cmxa + +DOCDIR = /myrepos/xen-api-libs.hg/doc + +all: $(INTF) $(LIBS) $(PROGRAMS) + +bins: $(PROGRAMS) + +libs: $(LIBS) + +netdev.cmxa: libnetdev_stubs.a $(foreach obj,$(OBJS),$(obj).cmx) + $(OCAMLOPT) $(OCAMLOPTFLAGS) $(OCAMLFLAGS) -a -o $@ -cclib -lnetdev_stubs $(foreach obj,$(OBJS),$(obj).cmx) + +netdev.cma: libnetdev_stubs.a $(foreach obj,$(OBJS),$(obj).cmo) + $(OCAMLC) $(OCAMLFLAGS) -a -dllib dllnetdev_stubs.so -cclib -lnetdev_stubs -o $@ $(foreach obj,$(OBJS),$(obj).cmo) + +netdev_stubs.a: addr_stubs.o bridge_stubs.o link_stubs.o + ocamlmklib -o netdev_stubs $+ + +libnetdev_stubs.a: addr_stubs.o bridge_stubs.o link_stubs.o + ar rcs $@ $+ + ocamlmklib -o netdev_stubs $+ + +%.cmo: %.ml + $(OCAMLC) $(OCAMLFLAGS) -c -o $@ $< + +%.cmi: %.mli + $(OCAMLC) $(OCAMLFLAGS) -c -o $@ $< + +%.cmx: %.ml + $(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) -c -o $@ $< + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +META: META.in + sed 's/@VERSION@/$(VERSION)/g' < $< > $@ + +.PHONY: install +install: path = $(DESTDIR)$(shell ocamlfind printconf destdir) +install: $(LIBS) META + mkdir -p $(path) + ocamlfind install -destdir $(path) -ldconf ignore netdev META $(INTF) $(LIBS) *.a *.so *.cmx + +.PHONY: uninstall +uninstall: + ocamlfind remove netdev + +.PHONY: doc +doc: $(INTF) + python ../doc/doc.py $(DOCDIR) "netdev" "package" "$(OBJS)" "." "" "" + +clean: + rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS) + diff -r ece26f39ce09 -r b875536f6117 netdev/addr_stubs.c --- /dev/null +++ b/netdev/addr_stubs.c @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ +/* + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +static value alloc_addr(struct sockaddr *sock) +{ + CAMLparam0(); + CAMLlocal1(result); + char output[36]; + int ret = 0; + + switch (sock->sa_family) { + case AF_INET: { + struct sockaddr_in *in = (struct sockaddr_in *) sock; + int v = ntohl(in->sin_addr.s_addr); + ret = snprintf(output, sizeof(output), "%u.%u.%u.%u", + (v >> 24) & 0xff, (v >> 16) & 0xff, + (v >> 8) & 0xff, v & 0xff); + break; + } + case AF_INET6: { + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) sock; + ret = snprintf(output, sizeof(output), + "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", + in6->sin6_addr.s6_addr[0], + in6->sin6_addr.s6_addr[1], + in6->sin6_addr.s6_addr[2], + in6->sin6_addr.s6_addr[3], + in6->sin6_addr.s6_addr[4], + in6->sin6_addr.s6_addr[5], + in6->sin6_addr.s6_addr[6], + in6->sin6_addr.s6_addr[7], + in6->sin6_addr.s6_addr[8], + in6->sin6_addr.s6_addr[9], + in6->sin6_addr.s6_addr[10], + in6->sin6_addr.s6_addr[11], + in6->sin6_addr.s6_addr[12], + in6->sin6_addr.s6_addr[13]); + break; + } + default: + /* just ignore */ + ; + } + result = caml_alloc_string(ret); + memcpy(String_val(result), output, ret); + CAMLreturn(result); +} + +value stub_if_getaddr(value unit) +{ + CAMLparam0(); + CAMLlocal5(result, temp, name, addrstr, netmaskstr); + CAMLlocal1(tuple); + int ret; + struct ifaddrs *ifaddrs, *tmp; + struct sockaddr *sock, *netmask; + + result = temp = Val_emptylist; + name = addrstr = Val_int(0); + + ret = getifaddrs(&ifaddrs); + if (ret < 0) + caml_failwith("cannot get interface address"); + + for (tmp = ifaddrs; tmp; tmp = tmp->ifa_next) { + sock = tmp->ifa_addr; + netmask = tmp->ifa_netmask; + + if (sock->sa_family == AF_INET || sock->sa_family == AF_INET6) { + name = caml_copy_string(tmp->ifa_name); + addrstr = alloc_addr(sock); + netmaskstr = alloc_addr(netmask); + + tuple = caml_alloc_tuple(4); + Store_field(tuple, 0, name); + Store_field(tuple, 1, addrstr); + Store_field(tuple, 2, netmaskstr); + Store_field(tuple, 3, Val_bool(sock->sa_family == AF_INET6)); + + result = caml_alloc_small(2, Tag_cons); + Field(result, 0) = tuple; + Field(result, 1) = temp; + + temp = result; + } + } + + freeifaddrs(ifaddrs); + + CAMLreturn(result); +} diff -r ece26f39ce09 -r b875536f6117 netdev/bridge_stubs.c --- /dev/null +++ b/netdev/bridge_stubs.c @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ +/* + */ + +#include "netdev.h" + +#include +#include +#include +#include +#include +#include + +value stub_bridge_add(value fd, value name) +{ + CAMLparam2(fd, name); + int err; + + err = ioctl(Int_val(fd), SIOCBRADDBR, String_val(name)); + CHECK_IOCTL(err, "bridge add"); + CAMLreturn(Val_unit); +} + +value stub_bridge_del(value fd, value name) +{ + CAMLparam2(fd, name); + int err; + + err = ioctl(Int_val(fd), SIOCBRDELBR, String_val(name)); + CHECK_IOCTL(err, "bridge del"); + CAMLreturn(Val_unit); +} + +value stub_bridge_intf_add(value fd, value name, value intf) +{ + CAMLparam3(fd, name, intf); + int err; + struct ifreq ifr; + int ifindex; + + ifindex = if_nametoindex(String_val(intf)); + if (ifindex == 0) + caml_failwith("Device_not_found"); + + memset(ifr.ifr_name, '\000', IFNAMSIZ); + strncpy(ifr.ifr_name, String_val(name), IFNAMSIZ); + ifr.ifr_ifindex = ifindex; + + err = ioctl(Int_val(fd), SIOCBRADDIF, &ifr); + CHECK_IOCTL(err, "bridge intf add"); + CAMLreturn(Val_unit); +} + +value stub_bridge_intf_del(value fd, value name, value intf) +{ + CAMLparam3(fd, name, intf); + int err; + struct ifreq ifr; + int ifindex; + + ifindex = if_nametoindex(String_val(intf)); + if (ifindex == 0) + caml_failwith("Device_not_found"); + + memset(ifr.ifr_name, '\000', IFNAMSIZ); + strncpy(ifr.ifr_name, String_val(name), IFNAMSIZ); + ifr.ifr_ifindex = ifindex; + + err = ioctl(Int_val(fd), SIOCBRDELIF, &ifr); + CHECK_IOCTL(err, "bridge intf del"); + + CAMLreturn(Val_unit); +} diff -r ece26f39ce09 -r b875536f6117 netdev/link_stubs.c --- /dev/null +++ b/netdev/link_stubs.c @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ +/* + */ + +#include "netdev.h" + +#include +#include +#include +#include +#include +#include + +#define SET_IFREQ(ifreq, devname) \ + strncpy(ifreq.ifr_name, devname, IFNAMSIZ) + +static int link_change_flags(int fd, char *name, + unsigned int flags, unsigned int mask) +{ + struct ifreq ifr; + int ret; + + SET_IFREQ(ifr, name); + ret = ioctl(fd, SIOCGIFFLAGS, &ifr); + if (ret < 0) + return ret; + if ((ifr.ifr_flags ^ flags) & mask) { + ifr.ifr_flags &= ~mask; + ifr.ifr_flags |= mask & flags; + ret = ioctl(fd, SIOCSIFFLAGS, &ifr); + } + return ret; +} + +static int link_change_name(int fd, char *name, char *newname) +{ + struct ifreq ifr; + int ret; + + SET_IFREQ(ifr, name); + strncpy(ifr.ifr_newname, newname, IFNAMSIZ); + ret = ioctl(fd, SIOCSIFNAME, &ifr); + return ret; +} + +value stub_link_up(value fd, value dev) +{ + CAMLparam2(fd, dev); + int err; + err = link_change_flags(Int_val(fd), String_val(dev), IFF_UP, IFF_UP); + CHECK_IOCTL(err, "link up"); + CAMLreturn(Val_unit); +} + +value stub_link_is_up(value fd, value dev) +{ + CAMLparam2(fd, dev); + struct ifreq ifr; + int err; + + SET_IFREQ(ifr, String_val(dev)); + err = ioctl(Int_val(fd), SIOCGIFFLAGS, &ifr); + CHECK_IOCTL(err, "link_is_up"); + CAMLreturn(Val_bool (ifr.ifr_flags & IFF_UP)); +} + +value stub_link_down(value fd, value dev) +{ + CAMLparam2(fd, dev); + int err; + err = link_change_flags(Int_val(fd), String_val(dev), 0, IFF_UP); + CHECK_IOCTL(err, "link down"); + + CAMLreturn(Val_unit); +} + +value stub_link_change_name(value fd, value dev, value newname) +{ + CAMLparam3(fd, dev, newname); + int err; + + err = link_change_name(Int_val(fd), + String_val(dev), String_val(newname)); + CHECK_IOCTL(err, "link change name"); + CAMLreturn(Val_unit); +} + +value stub_link_multicast(value fd, value dev, value v) +{ + CAMLparam3(fd, dev, v); + int err; + err = link_change_flags(Int_val(fd), String_val(dev), + ((Bool_val(v)) ? IFF_MULTICAST : 0), IFF_MULTICAST); + CHECK_IOCTL(err, "link multicast"); + CAMLreturn(Val_unit); +} + +value stub_link_arp(value fd, value dev, value v) +{ + CAMLparam3(fd, dev, v); + int err; + err = link_change_flags(Int_val(fd), String_val(dev), + ((Bool_val(v)) ? 0 : IFF_NOARP), IFF_NOARP); + CHECK_IOCTL(err, "link arp"); + CAMLreturn(Val_unit); +} + +#ifdef SIOCETHTOOL +#define ETHTOOL_GSET 0x00000001 /* Get settings. */ + +#include +/* copied from linux/ethtool.h and made compilable with userspace types */ +struct ethtool_cmd { + uint32_t cmd; + uint32_t supported; /* Features this interface supports */ + uint32_t advertising; /* Features this interface advertises */ + uint16_t speed; /* The forced speed, 10Mb, 100Mb, gigabit */ + uint8_t duplex; /* Duplex, half or full */ + uint8_t port; /* Which connector port */ + uint8_t phy_address; + uint8_t transceiver; /* Which transceiver to use */ + uint8_t autoneg; /* Enable or disable autonegotiation */ + uint32_t maxtxpkt; /* Tx pkts before generating tx int */ + uint32_t maxrxpkt; /* Rx pkts before generating rx int */ + uint32_t reserved[4]; +}; + +value stub_link_get_status(value fd, value dev) +{ + CAMLparam2(fd, dev); + CAMLlocal1(ret); + struct ifreq ifr; + struct ethtool_cmd ecmd; + int err, speed, duplex; + + SET_IFREQ(ifr, String_val(dev)); + ecmd.cmd = ETHTOOL_GSET; + ifr.ifr_data = (caddr_t) &ecmd; + err = ioctl(Int_val(fd), SIOCETHTOOL, &ifr); + CHECK_IOCTL(err, "get ethtool"); + + /* CA-24610: apparently speeds can be other values eg 2500 */ + speed = ecmd.speed; + + switch (ecmd.duplex) { + case 0: duplex = 1; break; + case 1: duplex = 2; break; + default: duplex = 0; + } + + ret = caml_alloc_tuple(2); + Store_field(ret, 0, Val_int(speed)); + Store_field(ret, 1, Val_int(duplex)); + + CAMLreturn(ret); +} +#else +value stub_link_get_status(value fd, value dev) +{ + CAMLparam2(fd, dev); + CAMLlocal1(ret); + ret = caml_alloc_tuple(2); + Store_field(ret, 0, Val_int(0)); /* unknown speed */ + Store_field(ret, 1, Val_int(0)); /* unknown duplex */ + CAMLreturn(ret); +} +#endif diff -r ece26f39ce09 -r b875536f6117 netdev/netdev.h --- /dev/null +++ b/netdev/netdev.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ +/* + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SIOCBRADDBR +#include "sockios_compat.h" +#endif + +#define CHECK_IOCTL(err, S) \ + if (err < 0) { \ + caml_failwith(S ": ioctl failed"); \ + } diff -r ece26f39ce09 -r b875536f6117 netdev/netdev.ml --- /dev/null +++ b/netdev/netdev.ml @@ -0,0 +1,412 @@ +(* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + *) +open Stringext +open Forkhelpers + +type kind = Bridge | Vswitch + +type network_ops = { + kind: kind; + add: string -> ?uuid:string -> unit; + del: string -> unit; + list: unit -> string list; + + exists: string -> bool; + + intf_add: string -> string -> unit; + intf_del: string -> string -> unit; + intf_list: string -> string list; + + get_bridge: string -> string; + is_on_bridge: string -> bool; + + set_forward_delay: string -> int -> unit; +} + +exception Unknown_network_backend of string +exception Invalid_network_backend_operation of string * kind + +let string_of_kind kind = match kind with + | Bridge -> "bridge" + | Vswitch -> "openvswitch" + +let kind_of_string s = match s with + | "bridge" -> Bridge + | "vswitch" -> Vswitch + | "openvswitch" -> Vswitch + | _ -> raise (Unknown_network_backend s) + +module Internal = struct + +let control_socket () = + try + Unix.socket Unix.PF_INET Unix.SOCK_DGRAM 0 + with + exn -> + try + Unix.socket Unix.PF_UNIX Unix.SOCK_DGRAM 0 + with + exn -> + Unix.socket Unix.PF_INET6 Unix.SOCK_DGRAM 0 + +let with_fd f = + let fd = control_socket () in + let r = begin try + f fd + with + exn -> + Unix.close fd; + raise exn + end in + Unix.close fd; + r + +let exec cmd = + let ret = Sys.command cmd in + if ret <> 0 then + failwith (Printf.sprintf "cmd returned %d" ret) + +let read_one_line file = + let inchan = open_in file in + try + let result = input_line inchan in + close_in inchan; + result + with exn -> close_in inchan; raise exn + +let write_one_line file l = + let outchan = open_out file in + try + output_string outchan (l ^ "\n"); + close_out outchan + with + exn -> close_out outchan; raise exn +end + +module Bridge = struct + +external _add : Unix.file_descr -> string -> unit = "stub_bridge_add" +external _del : Unix.file_descr -> string -> unit = "stub_bridge_del" + +let add name ?uuid = + Internal.with_fd (fun fd -> _add fd name) + +let del name = + Internal.with_fd (fun fd -> _del fd name) + +let list () = + let dirs = Array.to_list (Sys.readdir "/sys/class/net") in + List.filter (fun dir -> + Sys.file_exists ("/sys/class/net/" ^ dir ^ "/bridge")) dirs + +let exists name = + try Sys.file_exists ("/sys/class/net/" ^ name ^ "/bridge") + with _ -> false + +let set name obj v = + let file = "/sys/class/net/" ^ name ^ "/bridge/" ^ obj in + let outchan = open_out file in + output_string outchan v; + output_char outchan '\n'; + close_out outchan + +let get name obj = Internal.read_one_line ("/sys/class/net/" ^ name ^ "/bridge/" ^ obj) + +let _forward_delay = "forward_delay" +let _hello_time = "hello_time" +let _max_age = "max_age" +let _ageing_time = "ageing_time" +let _stp_state = "stp_state" +let _priority = "priority" +let _bridge_id = "bridge_id" + +let get_id name = + get name _bridge_id + +let set_forward_delay name v = + set name _forward_delay (string_of_int v) + +let get_forward_delay name = + int_of_string (get name _forward_delay) + +let set_hello_time name v = + set name _hello_time (string_of_int v) + +let get_hello_time name = + int_of_string (get name _hello_time) + +let set_max_age name v = + set name _max_age (string_of_int v) + +let get_max_age name = + int_of_string (get name _max_age) + +let set_ageing_time name v = + set name _ageing_time (string_of_int v) + +let get_ageing_time name = + int_of_string (get name _ageing_time) + +let set_stp_state name v = + set name _stp_state (if v then "1" else "0") + +let get_stp_state name = + get name _stp_state <> "0" + +let set_priority name v = + set name _priority (string_of_int v) + +let get_priority name = + int_of_string (get name _priority) + +(* bridge interfaces control function *) +external _intf_add : Unix.file_descr -> string -> string -> unit + = "stub_bridge_intf_add" +external _intf_del : Unix.file_descr -> string -> string -> unit + = "stub_bridge_intf_del" + +let intf_add name intf = + Internal.with_fd (fun fd -> _intf_add fd name intf) + +let intf_del name intf = + Internal.with_fd (fun fd -> _intf_del fd name intf) + +let intf_list name = + Array.to_list (Sys.readdir ("/sys/class/net/" ^ name ^ "/brif/")) + +let getpath dev attr = Printf.sprintf "/sys/class/net/%s/%s" dev attr + +let is_on_bridge name = try Unix.access (getpath name "brport") [ Unix.F_OK ]; true with _ -> false + +let get_bridge name = Filename.basename (Unix.readlink ((getpath name "brport") ^ "/bridge")) + +let ops = { + kind = Bridge; + + add = add; + del = del; + list = list; + + exists = exists; + + intf_add = intf_add; + intf_del = intf_del; + intf_list = intf_list; + + get_bridge = get_bridge; + is_on_bridge = is_on_bridge; + + set_forward_delay = set_forward_delay; +} + +end + +module Vswitch = struct + +let vsctl_script = "/usr/bin/ovs-vsctl" + +let vsctl args = + Unix.access vsctl_script [ Unix.X_OK ]; + let output, _ = Forkhelpers.execute_command_get_output vsctl_script args in + let stripped = Stringext.String.strip (fun c -> c='\n') output in + match stripped with + | "" -> [] + | s -> Stringext.String.split '\n' s + +let add name ?uuid = + let extra = match uuid with + | Some uuid' -> ["--"; "br-set-external-id"; name; "network-uuids"; uuid'] + | None -> ["--"; "foo"] in + ignore(vsctl (["add-br" ; name] @ extra)) +let del name = ignore(vsctl ["del-br" ; name]) +let list () = vsctl [ "list-br" ] + +let exists name = List.exists (fun x -> x = name) (list ()) + +let intf_add name intf = ignore(vsctl ["add-port"; name; intf]) +let intf_del name intf = ignore(vsctl ["del-port"; name; intf]) +let intf_list name = vsctl [ "list-ports"; name ] + +let get_bridge name = + match vsctl [ "port-to-br"; name ] with + | l::[] -> l + | [] -> failwith ("ovs-vsctl port-to-br: did not return a bridge for port " ^ name) + | _ -> failwith ("ovs-vsctl port-to-br: returned an unexpected number of results for port " ^ name) + +let is_on_bridge name = + match vsctl [ "port-to-br"; name ] with + | l::[] -> true + | [] -> false + | _ -> failwith ("ovs-vsctl port-to-br: returned an unexpected number of results for port " ^ name) + +let ops = { + kind = Vswitch; + + add = add; + del = del; + list = list; + + exists = exists; + + intf_add = intf_add; + intf_del = intf_del; + intf_list = intf_list; + + get_bridge = get_bridge; + is_on_bridge = is_on_bridge; + + set_forward_delay = fun name v -> raise (Invalid_network_backend_operation ("set_forward_delay", Vswitch)) +} + +end + +module Link = struct + +type speed = int (* see CA-24610 *) +type duplex = Duplex_unknown | Duplex_half | Duplex_full + +let string_of_duplex = function + | Duplex_unknown -> "unknown" + | Duplex_half -> "half" + | Duplex_full -> "full" + +let duplex_of_string = function + | "full" -> Duplex_full + | "half" -> Duplex_half + | _ -> Duplex_unknown + +let int_of_speed x = x +let speed_of_int x = x +let speed_unknown = 0 + +external _up : Unix.file_descr -> string -> unit = "stub_link_up" +external _is_up : Unix.file_descr -> string -> bool = "stub_link_is_up" +external _down : Unix.file_descr -> string -> unit = "stub_link_down" +external _multicast : Unix.file_descr -> string -> bool -> unit = "stub_link_multicast" +external _arp : Unix.file_descr -> string -> bool -> unit = "stub_link_arp" +external _change_name : Unix.file_descr -> string -> string -> unit = "stub_link_change_name" +external _get_status : Unix.file_descr -> string -> speed * duplex = "stub_link_get_status" + +let up name = + Internal.with_fd (fun fd -> _up fd name) + +let is_up name = + Internal.with_fd (fun fd -> try _is_up fd name with _ -> false) + +let down name = + Internal.with_fd (fun fd -> _down fd name) + +let multicast name v = + Internal.with_fd (fun fd -> _multicast fd name v) + +let arp name v = + Internal.with_fd (fun fd -> _arp fd name v) + +let change_name name newname = + Internal.with_fd (fun fd -> _change_name fd name newname) + +let set_addr name addr = + (* temporary *) + Internal.exec (Printf.sprintf "ip link set %s addr %s" name addr) + +let get_status name = + Internal.with_fd (fun fd -> _get_status fd name) + +end + +module Addr = struct + +let flush name = + Internal.exec (Printf.sprintf "ip addr flush %s" name) + +external __get_all : unit -> (string * string * string * bool) list = "stub_if_getaddr" + +type addr = IPV4 of string * string | IPV6 of string * string + +let get_all () = + List.map (fun (name, addr, netmask, inet6) -> name, if inet6 then IPV6 (addr,netmask) else IPV4 (addr,netmask)) + (__get_all ()) + +let get_all_ipv4 () = + let ipv4s = List.filter (fun (_, _, _, inet6) -> not inet6) (__get_all ()) in + List.map (fun (name, addr, netmask, _) -> + name, Unix.inet_addr_of_string addr, Unix.inet_addr_of_string netmask + ) ipv4s + +let get name = + List.map (fun (a,b,c) -> (b,c)) (List.filter (fun (dev, _, _) -> dev = name) (get_all_ipv4 ())) + +end + +let list () = + Array.to_list (Sys.readdir "/sys/class/net") + +let getpath dev attr = Printf.sprintf "/sys/class/net/%s/%s" dev attr + +let get_address name = Internal.read_one_line (getpath name "address") + +let get_mtu name = Internal.read_one_line (getpath name "mtu") +let set_mtu name mtu = + Internal.write_one_line (getpath name "mtu") + (string_of_int mtu) + +let get_by_address address = + List.filter + (fun device -> + (* CA-21402: Not everything returned by list() is guaranteed to be a directory containing an address; + so we have to make sure we catch exceptions here so we keep trying the next one and so on.. *) + try String.lowercase (get_address device) = String.lowercase address with _ -> false) + (list ()) + +let get_pcibuspath name = + try + let devpath = Unix.readlink (getpath name "device") in + List.hd (List.rev (String.split '/' devpath)) + with exn -> "N/A" + +let get_carrier name = + let i = int_of_string (Internal.read_one_line (getpath name "carrier")) in + match i with 1 -> true | 0 -> false | _ -> false + +let get_ids name = + let read_id_from path = + try + let l = Internal.read_one_line path in + (* trim 0x *) + String.sub l 2 (String.length l - 2) + with _ -> "" + in + read_id_from (getpath name "device/vendor"), + read_id_from (getpath name "device/device") + +let is_physical name = + try + let link = Unix.readlink (getpath name "device") in + (* filter out device symlinks which look like /../../../devices/xen-backend/vif- *) + not(List.mem "xen-backend" (String.split '/' link)) + with _ -> false + +(* Dispatch network backend operations. *) + +let network_config_file = "/etc/xensource/network.conf" +let network_backend = + try + kind_of_string (String.strip String.isspace (Unixext.read_whole_file_to_string network_config_file)) + with + | Unix.Unix_error(Unix.ENOENT, "open", _) -> Bridge + | Unix.Unix_error(err, op, path) -> failwith (Printf.sprintf "Unix error: %s (%s,%s)\n" (Unix.error_message err) op path) + +let network = match network_backend with + | Bridge -> Bridge.ops + | Vswitch -> Vswitch.ops diff -r ece26f39ce09 -r b875536f6117 netdev/netdev.mli --- /dev/null +++ b/netdev/netdev.mli @@ -0,0 +1,138 @@ +(* + * Copyright (C) 2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + *) +(** Interface to the domain 0 network stack. *) + +(** Enumerates possible network backend types. *) +type kind = + Bridge (** Linux Bridge based networking *) + | Vswitch (** Vswitch based networking *) + +(** Possible operations on each network backend type. *) +type network_ops = { + kind : kind; (** The type of network backend. *) + add : string -> ?uuid:string -> unit; (** Add a bridge. *) + del : string -> unit; (** Remove a bridge. *) + list : unit -> string list; (** List all bridges. *) + exists : string -> bool; (** Query the existance of a bridge. *) + intf_add : string -> string -> unit; (** Add a network device as a port on a bridge. *) + intf_del : string -> string -> unit; (** Remove a network device from a bridge. *) + intf_list : string -> string list; (** List all network devices currently attached as a port on a bridge. *) + get_bridge : string -> string; (** Return the bridge to which a network device is currently attached. *) + is_on_bridge : string -> bool; (** Query whether a network device is currently attached to a bridge. *) + set_forward_delay : string -> int -> unit;(** Set the forwarding delay for a device on a bridge. *) +} + +(** Raised when an invalid network backend is detected. *) +exception Unknown_network_backend of string + +(** Raised when an operation in network_ops is not valid for a particular kind *) +exception Invalid_network_backend_operation of string * kind + +(** Returns string name of a network backend type. *) +val string_of_kind : kind -> string + +(** Converts a string to a valid network backend type, or raises Unknown_network_backend. *) +val kind_of_string : string -> kind + +(** Module dealing with network device link characteristics *) +module Link : + sig + (** Link speed in megabits. *) + type speed + + (** Convert speed to a string. *) + val int_of_speed : speed -> int + + (** Create speed from a string. *) + val speed_of_int : int -> speed + + (** Magic speed value representing Unknown. *) + val speed_unknown : speed + + (** Device duplex. *) + type duplex = + Duplex_unknown (** Device duplex is unknown. *) + | Duplex_half (** Device is running half-duplex. *) + | Duplex_full (** Device is running full-duplex. *) + + (** Convert duplex setting to string. *) + val string_of_duplex : duplex -> string + + (** Create duplex from a string *) + val duplex_of_string : string -> duplex + + (** Bring up a network device. *) + val up : string -> unit + + (** Determine if a network device is up. *) + val is_up : string -> bool + + (** Bring down a network device. *) + val down : string -> unit + + (** Configure a device to allow or disallow multicast. *) + val multicast : string -> bool -> unit + + (** Configure a device to respond to or ignore ARP requests. *) + val arp : string -> bool -> unit + + (** Change the name of a network device. *) + val change_name : string -> string -> unit + + (** Set MAC address of a device. *) + val set_addr : string -> string -> unit + + (** Get current speed a duplex settings for a device. *) + val get_status : string -> speed * duplex + end + +(** Module dealing with IP addresses on network devices. *) +module Addr : + sig + (** Flush all the addresses configured on a device. *) + val flush : string -> unit + + (** Get all IPV4 addresses associated with a device. *) + val get : string -> (Unix.inet_addr * Unix.inet_addr) list + end + +(** List all the interfaces on the system. *) +val list : unit -> string list + +(** Return MAC address for a network device. *) +val get_address : string -> string + +(** Get device MTU. *) +val get_mtu : string -> string + +(** Set device MTU. *) +val set_mtu : string -> int -> unit + +(** Returns the list of device names (eg physical + VLAN) which a particular MAC address. *) +val get_by_address : string -> string list + +(** Returns the PCI bus path of a device. *) +val get_pcibuspath : string -> string + +(** Returns the carrier status for a device. *) +val get_carrier : string -> bool + +(** Returns PCI vendor and device ID for network device. *) +val get_ids : string -> string * string + +(** Indicates whether the given interface is a physical interface *) +val is_physical : string -> bool + +(** Dispatch operation to correct backend device *) +val network : network_ops diff -r ece26f39ce09 -r b875536f6117 netdev/sockios_compat.h --- /dev/null +++ b/netdev/sockios_compat.h @@ -0,0 +1,6 @@ +/* Our dom0 chroot doesn't include up to date headers: */ + +#define SIOCBRADDBR 0x89a0 /* create new bridge device */ +#define SIOCBRDELBR 0x89a1 /* remove bridge device */ +#define SIOCBRADDIF 0x89a2 /* add interface to bridge */ +#define SIOCBRDELIF 0x89a3 /* remove interface from bridge */ diff -r ece26f39ce09 -r b875536f6117 xapi-libs.spec --- a/xapi-libs.spec +++ b/xapi-libs.spec @@ -273,6 +273,7 @@ /usr/lib/ocaml/cpuid/cpuid.cmxa /usr/lib/ocaml/cpuid/dllcpuid_stubs.so /usr/lib/ocaml/cpuid/libcpuid_stubs.a + /usr/lib/ocaml/netdev/* /usr/lib/ocaml/eventchn/META /usr/lib/ocaml/eventchn/dlleventchn_stubs.so /usr/lib/ocaml/eventchn/eventchn.a --===============0927168310== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0927168310==-- From xen-devel-bounces@lists.xensource.com Wed Jun 02 10:35:28 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 02 Jun 2010 10:35:28 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJrqi-0006Wq-JM; Wed, 02 Jun 2010 10:35:28 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OE2LC-0007Jm-Aw for xen-devel@lists.xensource.com; Mon, 17 May 2010 08:34:50 -0700 X-ASG-Debug-ID: 1274110487-099a00c60000-8pertM X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mail-vw0-f43.google.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 5D45F287509; Mon, 17 May 2010 08:34:47 -0700 (PDT) Received: from mail-vw0-f43.google.com (mail-vw0-f43.google.com [209.85.212.43]) by spam.xensource.com with ESMTP id IifvVdL1PEYeWfOw; Mon, 17 May 2010 08:34:47 -0700 (PDT) X-Barracuda-Envelope-From: bquiroz.work@gmail.com Received: by vws15 with SMTP id 15so3429360vws.30 for ; Mon, 17 May 2010 08:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PtvlvfnR0RKpwipDzv6WYyV62TuhEQPaQOe6KLbNNa0=; b=ieBM+eOAPhwGKHeVpQVl5uO9a31VSejLMi7JNreJeyHW4lNP4zQRve5B9ArvMYdU9e 4pOybVeNvt0c7sHPNWnuSfFnH4rZ9qQm4zbl+EQuM2uEz7OF8N02Q1YfmRecKJz21wX8 3zSYjJw8f2RxKCkF7XQjMFgHUc4Yn8ebYvJVw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=A0Lrw4LSJbAgIrZzpxhpoNpXHYVua+PbYFF0DeCoY6IurZRPERkhFAP6X3f8lnaaHX GvVvSjtOCe0nFsl0I8c6X5zX/OasV/L5feNupUHcc2XdVRDGPtkhMgrVLkvlp6d3Go+o /q+URNdShKCZjj01+PXLs6Is7/dec202QIrSI= MIME-Version: 1.0 Received: by 10.229.230.65 with SMTP id jl1mr1164907qcb.7.1274110486190; Mon, 17 May 2010 08:34:46 -0700 (PDT) Received: by 10.229.236.12 with HTTP; Mon, 17 May 2010 08:34:46 -0700 (PDT) In-Reply-To: <20100513113908.GW17817@reaktio.net> References: <20100513113908.GW17817@reaktio.net> Date: Mon, 17 May 2010 11:34:46 -0400 Message-ID: X-ASG-Orig-Subj: Re: [Xen-devel] Re: [Xen-API] XCP Monthly Call Request Subject: Re: [Xen-devel] Re: [Xen-API] XCP Monthly Call Request From: Boris Quiroz To: =?ISO-8859-1?Q?Pasi_K=E4rkk=E4inen?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Barracuda-Connect: mail-vw0-f43.google.com[209.85.212.43] X-Barracuda-Start-Time: 1274110488 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.30100 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Mailman-Approved-At: Wed, 02 Jun 2010 10:21:01 -0700 Cc: "xen-devel@lists.xensource.com" , Marco Sinhoreli , "xen-api@lists.xensource.com" X-BeenThere: xen-devel@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com 2010/5/13 Pasi K=E4rkk=E4inen : > On Wed, May 12, 2010 at 07:29:16PM -0300, Marco Sinhoreli wrote: >> Hello Stephen: >> >> Me also like Evaldo and Lucas. >> >> My time zone is: UTC-3 >> > > > And mine is UTC+3 > > -- Pasi > >> Cheers, >> >> On Mon, May 10, 2010 at 4:58 PM, Lucas Santos wrote= : >> > Hi Stephen, >> > I'm at same timezone as Evaldo, UTC-3. >> > Regards, >> > Lucas de Souza Santos (ldss) >> > >> > >> > >> > On Fri, May 7, 2010 at 6:46 AM, Evaldo Gardenali >> > wrote: >> >> >> >> Dear Stephen, >> >> >> >> My current timezone is America/Sao_Paulo, which at this time of the y= ear >> >> overlaps with UTC-3. >> >> >> >> Thanks for the awesome initiative! >> >> >> >> Regards >> >> >> >> Evaldo >> >> >> >> ***Sent via RoadSync=AE for Android??? >> >> >> >> From: Stephen Spector >> >> Sent: May 05, 2010 2:29 PM >> >> To: xen-devel@lists.xensource.com, xen-api@lists.xensource.com >> >> Subject: [Xen-API] XCP Monthly Call Request >> >> >> >> >> >> I am planning to schedule a monthly XCP meeting for the community and= am >> >> struggling with when to host the call. As we are a global community, = there >> >> is no single optimal time to host the meeting. In an effort to suppor= t the >> >> most likely attendees, please send me your time zone if you plan to >> >> participate in these calls. I will track the most common time zones i= n an >> >> effort to maximize attendance. All meetings will have notes taken whi= ch will >> >> be posted on the Xen.org wiki for those of you unable to participate. >> >> >> >> >> >> >> >> Stephen Spector >> >> >> >> >> >> >> >> Xen.org Community Manager >> >> >> >> T: (772) 621-5062 | M: (954) 854-4257 >> >> >> >> stephen.spector@xen.org >> >> >> >> http://blog.xen.org | @xen_com_mgr >> >> >> >> >> >> >> >> ________________________________ >> >> AVISO: A informa=E7=E3o contida neste e-mail, bem como em qualquer de= seus >> >> anexos, =E9 CONFIDENCIAL e destinada ao uso exclusivo do(s) destinat= =E1rio(s) >> >> acima referido(s), podendo conter informa=E7=F5es sigilosas e/ou lega= lmente >> >> protegidas. Caso voc=EA n=E3o seja o destinat=E1rio desta mensagem, i= nformamos que >> >> qualquer divulga=E7=E3o, distribui=E7=E3o ou c=F3pia deste e-mail e/o= u de qualquer de >> >> seus anexos =E9 absolutamente proibida. Solicitamos que o remetente s= eja >> >> comunicado imediatamente, respondendo esta mensagem, e que o original= desta >> >> mensagem e de seus anexos, bem como toda e qualquer c=F3pia e/ou impr= ess=E3o >> >> realizada a partir destes, sejam permanentemente apagados e/ou destru= =EDdos. >> >> Informa=E7=F5es adicionais sobre nossa empresa podem ser obtidas no s= ite >> >> http://sobre.uol.com.br/. >> >> >> >> NOTICE: The information contained in this e-mail and any attachments >> >> thereto is CONFIDENTIAL and is intended only for use by the recipient= named >> >> herein and may contain legally privileged and/or secret information. >> >> If you are not the e-mail??s intended recipient, you are hereby notif= ied >> >> that any dissemination, distribution or copy of this e-mail, and/or a= ny >> >> attachments thereto, is strictly prohibited. Please immediately notif= y the >> >> sender replying to the above mentioned e-mail address, and permanentl= y >> >> delete and/or destroy the original and any copy of this e-mail and/or= its >> >> attachments, as well as any printout thereof. Additional information = about >> >> our company may be obtained through the site http://www.uol.com.br/ir= /. >> >> >> >> _______________________________________________ >> >> xen-api mailing list >> >> xen-api@lists.xensource.com >> >> http://lists.xensource.com/mailman/listinfo/xen-api >> >> >> > >> > >> > _______________________________________________ >> > xen-api mailing list >> > xen-api@lists.xensource.com >> > http://lists.xensource.com/mailman/listinfo/xen-api >> > >> > >> >> >> >> -- >> Marco Sinhoreli >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel > > _______________________________________________ > xen-api mailing list > xen-api@lists.xensource.com > http://lists.xensource.com/mailman/listinfo/xen-api > Hi, Mine is UTC-4, same as EST I guess... _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel From xen-api-bounces@lists.xensource.com Wed Jun 02 11:02:03 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 02 Jun 2010 11:02:03 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJsGQ-0004mj-Ch; Wed, 02 Jun 2010 11:02:02 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OHkDk-0001mm-0K for xen-api@lists.xensource.com; Thu, 27 May 2010 14:02:28 -0700 X-ASG-Debug-ID: 1274994147-6cb600340000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mail1.tehlulz.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 5ED3828E664 for ; Thu, 27 May 2010 14:02:27 -0700 (PDT) Received: from mail1.tehlulz.com (www.tehlulz.com [67.18.187.246]) by spam.xensource.com with ESMTP id i1skTf1P3FLW2ddH (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 27 May 2010 14:02:27 -0700 (PDT) X-Barracuda-Envelope-From: dye.michael@utah.edu Received: from [172.16.8.184] (ip67-88-113-150.z113-88-67.customer.algx.net [67.88.113.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mdye@divisive.info) by mail1.tehlulz.com (Postfix) with ESMTPSA id B09EB7431D for ; Thu, 27 May 2010 15:40:00 -0500 (CDT) Message-ID: <4BFEDDE1.1010400@utah.edu> Date: Thu, 27 May 2010 15:02:25 -0600 From: michael dye User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100525 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: xen-api@lists.xensource.com X-ASG-Orig-Subj: xen 4.0.0 dom0 console video unreadable / scrambled Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: www.tehlulz.com[67.18.187.246] X-Barracuda-Start-Time: 1274994147 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.30929 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Mailman-Approved-At: Wed, 02 Jun 2010 10:22:53 -0700 Subject: [Xen-API] xen 4.0.0 dom0 console video unreadable / scrambled X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com I am following http://www.gentoo.org/doc/en/xen-guide.xml to build a new box for use as dom0. For the dom0 kernel configu I used as a basis a previous, working config from a non-xen kernel. That previous kernel (2.6.32-gentoo-r7) exhibits no console video problem. My new xen kernel, however, displays suitable console output as it boots the xen kernel, but when it boots the dom0 kernel I compiled, the video turns to a multicolored, unreadable scramble. Here are the relevant details of my configuration: xen-enabled kernel version 2.6.32 (from sys-kernel/xen-sources 2.6.32-r1) xen 4.0.0 (from app-emulation/xen-4.0.0) xen-tools 4.0.0 (from app-emulation/xen-tools-4.0.0) # cat /boot/grub/grub.conf default 0 timeout 10 title Gentoo Linux 2.6.32-xen-r1-a + xen 4.0.0 root (hd0,0) kernel /boot/xen-4.0.0.gz dom0_mem=512M loglvl=all guest_loglvl=all sync_console console_to_ring com1=115200,8n1 console=com1 lapic apic_verbosity=debug apic=debug iommu=off module /boot/linux-2.6.32-xen-r1-a ro root=/dev/sda3 console=hvc0 earlyprintk=xen nomodeset initcall_debug debug loglevel=10 I have an intel 82915G/GV/910GL graphics card so I configured AGP_INTEL, DRM, FB, FB_BOOT_VESA_SUPPORT, FB_VGA16, FB_UVESA, FB_VESA, VGA_CONSOLE, FONTS, FRAMEBUFFER_CONSOLE, and DUMMY_CONSOLE into the kernel. What am I missing or screwing up? Thanks. -mike d. _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 02 11:15:36 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 02 Jun 2010 11:15:36 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OJsTX-00070i-QP; Wed, 02 Jun 2010 11:15:35 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OJ1p6-0008QQ-Cl for xen-api@lists.xensource.com; Mon, 31 May 2010 03:02:21 -0700 X-ASG-Debug-ID: 1275300137-015f00130000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from song.cn.fujitsu.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 4B0AD2901B8; Mon, 31 May 2010 03:02:18 -0700 (PDT) Received: from song.cn.fujitsu.com (cn.fujitsu.com [222.73.24.84]) by spam.xensource.com with ESMTP id Y4LnxDGMpaiMOuGC; Mon, 31 May 2010 03:02:18 -0700 (PDT) X-Barracuda-Envelope-From: xiaoguangrong@cn.fujitsu.com Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 687A21701AC; Mon, 31 May 2010 18:02:16 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o4VA05Kp024123; Mon, 31 May 2010 18:00:05 +0800 Received: from localhost.localdomain (unknown [10.167.141.99]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 62ECA10C0A6; Mon, 31 May 2010 18:06:05 +0800 (CST) Message-ID: <4C03F8DB.5010300@cn.fujitsu.com> Date: Tue, 01 Jun 2010 01:58:51 +0800 From: Xiao Guangrong User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4 MIME-Version: 1.0 To: Keir Fraser X-ASG-Orig-Subj: io performance regression between xen and XCP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Barracuda-Connect: cn.fujitsu.com[222.73.24.84] X-Barracuda-Start-Time: 1275300139 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 3.11 X-Barracuda-Spam-Status: No, SCORE=3.11 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=DATE_IN_FUTURE_06_12, DATE_IN_FUTURE_06_12_2 X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31219 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.01 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date 3.10 DATE_IN_FUTURE_06_12_2 DATE_IN_FUTURE_06_12_2 X-Mailman-Approved-At: Wed, 02 Jun 2010 10:22:53 -0700 Cc: xen-devel , xen-api@lists.xensource.com Subject: [Xen-API] io performance regression between xen and XCP X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi guys, We have done the io performance test between xen and XCP, both tested on = a separate disk, and found XCP's regression is very great: XCP's parameters: =EF=BC=A4om0 =3D=3D=3D=3D=3D=3D Control[d44ecc85-5539-438d-9bbc-f596dec69617] info: VCPU: VCPUs-params (MRW): mask: 0,1 VCPUs-max ( RW): 8 VCPUs-at-startup ( RW): 8 VCPUs-number ( RO): 8 VCPUs-utilisation (MRO):=20 Mem: memory-actual ( RO): 2146172928 memory-target ( RO): 2146172928 memory-overhead ( RO): 1048576 memory-static-max ( RW): 2146172928 memory-dynamic-max ( RW): 2146172928 memory-dynamic-min ( RW): 1887436800 memory-static-min ( RW): 307232768 Guest: =3D=3D=3D=3D=3D=3D spv1[9a1a2bf2-41a7-ca00-8dc5-92c51b6ed992] info: VCPU: VCPUs-params (MRW): mask: 7 VCPUs-max ( RW): 1 VCPUs-at-startup ( RW): 1 VCPUs-number ( RO): 1 VCPUs-utilisation (MRO): 0: 0.000 Mem: memory-actual ( RO): 1073741824 memory-target ( RO): 1073741824 memory-overhead ( RO): 1048576 memory-static-max ( RW): 1073741824 memory-dynamic-max ( RW): 1073741824 memory-dynamic-min ( RW): 1073741824 memory-static-min ( RW): 1073741824 Xen's parameters: ###### xm list ###### Name ID Mem VCPUs State T= ime(s) Domain-0 0 2048 2 r----- = 52.5 co5.4-32-2 1 1024 1 -b---- = 33.0 ###### xm vcpu-list ###### Name ID VCPU CPU State Time(s) CPU Af= finity Domain-0 0 0 0 r-- 42.2 0 Domain-0 0 1 1 -b- 10.4 1 co5.4-32-2 1 0 6 -b- 33.0 6 ###### xm sched-credit ###### Name ID Weight Cap Domain-0 0 256 0 co5.4-32-2 1 256 0 Test result: - direct read/write test: test command: dd if=3D/dev/zero of=3D1.img oflag=3Ddirect bs=3D256k count=3D4096 dd if=3D1.img of=3D/dev/null iflag=3Ddirect bs=3D256k count=3D4096 Xen: write: 33.3 MB/s read: 206 MB/s XCP: write: 18.5 MB/s read: 108 MB/s - no direct read/write test: test command: dd if=3D/dev/zero of=3D1.img bs=3D256k count=3D4096 dd if=3D1.img of=3D/dev/null bs=3D256k count=3D4096 Xen: write: 319 MB/s read: 85.9 MB/s XCP: write: 136 MB/s read: 63.8 MB/s Now, we are very confused about this result :-( Xiao _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Thu Jun 03 00:54:45 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Thu, 03 Jun 2010 00:54:45 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OK5GH-0002MF-38; Thu, 03 Jun 2010 00:54:45 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OK5G8-0002KG-Cl for xen-api@lists.xensource.com; Thu, 03 Jun 2010 00:54:36 -0700 X-ASG-Debug-ID: 1275551669-0df4007f0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from ydin.reaktio.net (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 21EE6291316 for ; Thu, 3 Jun 2010 00:54:29 -0700 (PDT) Received: from ydin.reaktio.net (reaktio.net [194.89.68.22]) by spam.xensource.com with ESMTP id JswD3iUgAJWbDBaA for ; Thu, 03 Jun 2010 00:54:29 -0700 (PDT) X-Barracuda-Envelope-From: pasik@iki.fi Received: by ydin.reaktio.net (Postfix, from userid 1001) id 04DF02005B; Thu, 3 Jun 2010 10:54:31 +0300 (EEST) Date: Thu, 3 Jun 2010 10:54:30 +0300 From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= To: michael dye X-ASG-Orig-Subj: Re: [Xen-API] xen 4.0.0 dom0 console video unreadable / scrambled Subject: Re: [Xen-API] xen 4.0.0 dom0 console video unreadable / scrambled Message-ID: <20100603075430.GV17817@reaktio.net> References: <4BFEDDE1.1010400@utah.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BFEDDE1.1010400@utah.edu> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: reaktio.net[194.89.68.22] X-Barracuda-Start-Time: 1275551670 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31491 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: xen-api@lists.xensource.com X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com On Thu, May 27, 2010 at 03:02:25PM -0600, michael dye wrote: > I am following http://www.gentoo.org/doc/en/xen-guide.xml to build a new > box for use as dom0. For the dom0 kernel configu I used as a basis a > previous, working config from a non-xen kernel. That previous kernel > (2.6.32-gentoo-r7) exhibits no console video problem. My new xen > kernel, however, displays suitable console output as it boots the xen > kernel, but when it boots the dom0 kernel I compiled, the video turns to > a multicolored, unreadable scramble. Here are the relevant details of > my configuration: > Hello, You're on a wrong mailinglist.. xen-users is the correct one. > xen-enabled kernel version 2.6.32 (from sys-kernel/xen-sources 2.6.32-r1) > xen 4.0.0 (from app-emulation/xen-4.0.0) > xen-tools 4.0.0 (from app-emulation/xen-tools-4.0.0) > > # cat /boot/grub/grub.conf > default 0 > timeout 10 > > title Gentoo Linux 2.6.32-xen-r1-a + xen 4.0.0 > root (hd0,0) > kernel /boot/xen-4.0.0.gz dom0_mem=512M loglvl=all guest_loglvl=all > sync_console console_to_ring com1=115200,8n1 console=com1 lapic > apic_verbosity=debug apic=debug iommu=off > module /boot/linux-2.6.32-xen-r1-a ro root=/dev/sda3 console=hvc0 > earlyprintk=xen nomodeset initcall_debug debug loglevel=10 > You're using Xenlinux kernel so you shouldn't have "console=hvc0 earlyprintk=xen" there. Xenlinux patched kernels use xvc0 as the console. > I have an intel 82915G/GV/910GL graphics card so I configured AGP_INTEL, > DRM, FB, FB_BOOT_VESA_SUPPORT, FB_VGA16, FB_UVESA, FB_VESA, VGA_CONSOLE, > FONTS, FRAMEBUFFER_CONSOLE, and DUMMY_CONSOLE into the kernel. What am > I missing or screwing up? Thanks. > -- Pasi _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Thu Jun 03 03:10:30 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Thu, 03 Jun 2010 03:10:30 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OK7Ne-0007Fh-Md; Thu, 03 Jun 2010 03:10:30 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OK7NY-0007EB-5l for xen-api@lists.xensource.com; Thu, 03 Jun 2010 03:10:24 -0700 X-ASG-Debug-ID: 1275559819-6758005c0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 13658283DCC for ; Thu, 3 Jun 2010 03:10:20 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id fqe837v4JpCBzgO0 (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Thu, 03 Jun 2010 03:10:20 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,353,1272844800"; d="scan'208";a="224127" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 03 Jun 2010 10:10:19 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Thu, 3 Jun 2010 11:10:19 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OK7NS-0000VI-Df for xen-api@lists.xensource.com; Thu, 03 Jun 2010 11:10:18 +0100 Content-Type: multipart/mixed; boundary="===============4955860572002916900==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Add biosdevname call to Netdev From: Rob Hoes To: xen-api Message-ID: Date: Thu, 3 Jun 2010 11:10:18 +0100 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275559821 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31498 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Add biosdevname call to Netdev X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============4955860572002916900== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User Rob Hoes Add biosdevname call to Netdev biosdevname is a tool used to find out the "real" device name of a network interface, according to the BIOS. This name is not affected by manual device renaming or changes in the Linux kernel. Signed-off-by: Rob Hoes diff -r 8d1a037cb063 netdev/netdev.ml --- a/netdev/netdev.ml +++ b/netdev/netdev.ml @@ -397,6 +397,12 @@ not(List.mem "xen-backend" (String.split '/' link)) with _ -> false +let get_bios_name name = + try + let output, _ = Forkhelpers.execute_command_get_output "biosdevname" ["-i"; name] in + output + with _ -> name + (* Dispatch network backend operations. *) let network_config_file = "/etc/xensource/network.conf" diff -r 8d1a037cb063 netdev/netdev.mli --- a/netdev/netdev.mli +++ b/netdev/netdev.mli @@ -131,8 +131,13 @@ (** Returns PCI vendor and device ID for network device. *) val get_ids : string -> string * string -(** Indicates whether the given interface is a physical interface *) +(** Indicates whether the given interface is a physical interface. *) val is_physical : string -> bool -(** Dispatch operation to correct backend device *) +(** Returns the device name of the given interface according to [biosdevname]. This is a name + * that is based on the BIOS name and should not be affected by changes in the Linux kernel or + * manual device renaming. *) +val get_bios_name : string -> string + +(** Dispatch operation to correct backend device. *) val network : network_ops --===============4955860572002916900== Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="netdev-biosdevname" IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFJvYiBIb2VzIDxyb2IuaG9lc0BjaXRyaXguY29t PgpBZGQgYmlvc2Rldm5hbWUgY2FsbCB0byBOZXRkZXYKCmJpb3NkZXZuYW1lIGlzIGEgdG9vbCB1 c2VkIHRvIGZpbmQgb3V0IHRoZSAicmVhbCIgZGV2aWNlIG5hbWUgb2YgYSBuZXR3b3JrIGludGVy ZmFjZSwgYWNjb3JkaW5nIHRvIHRoZSBCSU9TLiBUaGlzIG5hbWUgaXMgbm90IGFmZmVjdGVkIGJ5 IG1hbnVhbCBkZXZpY2UgcmVuYW1pbmcgb3IgY2hhbmdlcyBpbiB0aGUgTGludXgga2VybmVsLgoK U2lnbmVkLW9mZi1ieTogUm9iIEhvZXMgPHJvYi5ob2VzQGNpdHJpeC5jb20+CgpkaWZmIC1yIDhk MWEwMzdjYjA2MyBuZXRkZXYvbmV0ZGV2Lm1sCi0tLSBhL25ldGRldi9uZXRkZXYubWwKKysrIGIv bmV0ZGV2L25ldGRldi5tbApAQCAtMzk3LDYgKzM5NywxMiBAQAogCW5vdChMaXN0Lm1lbSAieGVu LWJhY2tlbmQiIChTdHJpbmcuc3BsaXQgJy8nIGxpbmspKQogICB3aXRoIF8gLT4gZmFsc2UKIAor bGV0IGdldF9iaW9zX25hbWUgbmFtZSA9CisJdHJ5CisJCWxldCBvdXRwdXQsIF8gPSBGb3JraGVs cGVycy5leGVjdXRlX2NvbW1hbmRfZ2V0X291dHB1dCAiYmlvc2Rldm5hbWUiIFsiLWkiOyBuYW1l XSBpbgorCQlvdXRwdXQKKwl3aXRoIF8gLT4gbmFtZQorCiAoKiBEaXNwYXRjaCBuZXR3b3JrIGJh Y2tlbmQgb3BlcmF0aW9ucy4gKikKIAogbGV0IG5ldHdvcmtfY29uZmlnX2ZpbGUgPSAiL2V0Yy94 ZW5zb3VyY2UvbmV0d29yay5jb25mIgpkaWZmIC1yIDhkMWEwMzdjYjA2MyBuZXRkZXYvbmV0ZGV2 Lm1saQotLS0gYS9uZXRkZXYvbmV0ZGV2Lm1saQorKysgYi9uZXRkZXYvbmV0ZGV2Lm1saQpAQCAt MTMxLDggKzEzMSwxMyBAQAogKCoqIFJldHVybnMgUENJIHZlbmRvciBhbmQgZGV2aWNlIElEIGZv ciBuZXR3b3JrIGRldmljZS4gKikKIHZhbCBnZXRfaWRzIDogc3RyaW5nIC0+IHN0cmluZyAqIHN0 cmluZwogCi0oKiogSW5kaWNhdGVzIHdoZXRoZXIgdGhlIGdpdmVuIGludGVyZmFjZSBpcyBhIHBo eXNpY2FsIGludGVyZmFjZSAqKQorKCoqIEluZGljYXRlcyB3aGV0aGVyIHRoZSBnaXZlbiBpbnRl cmZhY2UgaXMgYSBwaHlzaWNhbCBpbnRlcmZhY2UuICopCiB2YWwgaXNfcGh5c2ljYWwgOiBzdHJp bmcgLT4gYm9vbAogCi0oKiogRGlzcGF0Y2ggb3BlcmF0aW9uIHRvIGNvcnJlY3QgYmFja2VuZCBk ZXZpY2UgKikKKygqKiBSZXR1cm5zIHRoZSBkZXZpY2UgbmFtZSBvZiB0aGUgZ2l2ZW4gaW50ZXJm YWNlIGFjY29yZGluZyB0byBbYmlvc2Rldm5hbWVdLiBUaGlzIGlzIGEgbmFtZQorICogIHRoYXQg aXMgYmFzZWQgb24gdGhlIEJJT1MgbmFtZSBhbmQgc2hvdWxkIG5vdCBiZSBhZmZlY3RlZCBieSBj aGFuZ2VzIGluIHRoZSBMaW51eCBrZXJuZWwgb3IKKyAqICBtYW51YWwgZGV2aWNlIHJlbmFtaW5n LiAqKQordmFsIGdldF9iaW9zX25hbWUgOiBzdHJpbmcgLT4gc3RyaW5nCisKKygqKiBEaXNwYXRj aCBvcGVyYXRpb24gdG8gY29ycmVjdCBiYWNrZW5kIGRldmljZS4gKikKIHZhbCBuZXR3b3JrIDog bmV0d29ya19vcHMK --===============4955860572002916900== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============4955860572002916900==-- From xen-api-bounces@lists.xensource.com Fri Jun 04 03:48:51 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 04 Jun 2010 03:48:51 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OKUSI-0000TT-UW; Fri, 04 Jun 2010 03:48:50 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OKUPH-0007kh-Fe for xen-api@lists.xensource.com; Fri, 04 Jun 2010 03:45:43 -0700 X-ASG-Debug-ID: 1275648341-7da4004c0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 01147293122 for ; Fri, 4 Jun 2010 03:45:42 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 80raPzTASKPZEpu9 (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 04 Jun 2010 03:45:42 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,360,1272844800"; d="scan'208";a="243600" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 04 Jun 2010 10:45:40 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 4 Jun 2010 11:45:40 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OKUPE-0006J2-I1 for xen-api@lists.xensource.com; Fri, 04 Jun 2010 11:45:40 +0100 Content-Type: multipart/mixed; boundary="===============0028447542979828849==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Remove bond-slave filter from PIF.scan From: Rob Hoes To: xen-api Message-ID: Date: Fri, 4 Jun 2010 11:45:40 +0100 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275648343 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31597 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Remove bond-slave filter from PIF.scan X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0028447542979828849== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User Rob Hoes Remove bond-slave filter from PIF.scan This filter uses sysfs to find out whether an interface is a bond slave. This does not work when the openvswitch backend is used. Besides, it does not seem to be necessary (anymore?) anyway. PIF.scan creates a new PIF for each interface it finds if this interface is physical and there is no PIF with the same MAC. The slave interfaces always have the same MAC as the bond master PIF (bridging backend) or their "real" MACs as stored in their PIFs (openvswitch backend). Therefore, when a bond is in effect, the MACs of all bond slaves have corresponding PIFs in the DB, so PIF.scan won't create new ones. Signed-off-by: Rob Hoes diff -r 20b3b5da0f44 ocaml/xapi/xapi_pif.ml --- a/ocaml/xapi/xapi_pif.ml +++ b/ocaml/xapi/xapi_pif.ml @@ -272,15 +272,6 @@ let existing_macs = List.map fst t.mac_to_pif_table in let physical_macs = List.map fst t.mac_to_phy_table in - (* Filter out the interfaces that are enslaved as part of bonds: CA-12690 *) - let physical_macs = - List.filter - (fun mac -> - let device = List.assoc mac t.mac_to_phy_table in - let is_enslaved = try Unix.access ("/sys/class/net/"^device^"/master") [Unix.F_OK]; true with _ -> false in - not is_enslaved) - physical_macs in - (* Create PIF records for the new interfaces *) List.iter (fun mac -> --===============0028447542979828849== Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="pif-scan-simplify" IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFJvYiBIb2VzIDxyb2IuaG9lc0BjaXRyaXguY29t PgpSZW1vdmUgYm9uZC1zbGF2ZSBmaWx0ZXIgZnJvbSBQSUYuc2NhbgoKVGhpcyBmaWx0ZXIgdXNl cyBzeXNmcyB0byBmaW5kIG91dCB3aGV0aGVyIGFuIGludGVyZmFjZSBpcyBhIGJvbmQgc2xhdmUu IFRoaXMgZG9lcyBub3Qgd29yayB3aGVuIHRoZSBvcGVudnN3aXRjaCBiYWNrZW5kIGlzIHVzZWQu IEJlc2lkZXMsIGl0IGRvZXMgbm90IHNlZW0gdG8gYmUgbmVjZXNzYXJ5IChhbnltb3JlPykgYW55 d2F5LgoKUElGLnNjYW4gY3JlYXRlcyBhIG5ldyBQSUYgZm9yIGVhY2ggaW50ZXJmYWNlIGl0IGZp bmRzIGlmIHRoaXMgaW50ZXJmYWNlIGlzIHBoeXNpY2FsIGFuZCB0aGVyZSBpcyBubyBQSUYgd2l0 aCB0aGUgc2FtZSBNQUMuIFRoZSBzbGF2ZSBpbnRlcmZhY2VzIGFsd2F5cyBoYXZlIHRoZSBzYW1l IE1BQyBhcyB0aGUgYm9uZCBtYXN0ZXIgUElGIChicmlkZ2luZyBiYWNrZW5kKSBvciB0aGVpciAi cmVhbCIgTUFDcyBhcyBzdG9yZWQgaW4gdGhlaXIgUElGcyAob3BlbnZzd2l0Y2ggYmFja2VuZCku IFRoZXJlZm9yZSwgd2hlbiBhIGJvbmQgaXMgaW4gZWZmZWN0LCB0aGUgTUFDcyBvZiBhbGwgYm9u ZCBzbGF2ZXMgaGF2ZSBjb3JyZXNwb25kaW5nIFBJRnMgaW4gdGhlIERCLCBzbyBQSUYuc2NhbiB3 b24ndCBjcmVhdGUgbmV3IG9uZXMuCgpTaWduZWQtb2ZmLWJ5OiBSb2IgSG9lcyA8cm9iLmhvZXNA Y2l0cml4LmNvbT4KCmRpZmYgLXIgMjBiM2I1ZGEwZjQ0IG9jYW1sL3hhcGkveGFwaV9waWYubWwK LS0tIGEvb2NhbWwveGFwaS94YXBpX3BpZi5tbAorKysgYi9vY2FtbC94YXBpL3hhcGlfcGlmLm1s CkBAIC0yNzIsMTUgKzI3Miw2IEBACiAgIGxldCBleGlzdGluZ19tYWNzID0gTGlzdC5tYXAgZnN0 IHQubWFjX3RvX3BpZl90YWJsZSBpbgogICBsZXQgcGh5c2ljYWxfbWFjcyA9IExpc3QubWFwIGZz dCB0Lm1hY190b19waHlfdGFibGUgaW4KIAotICAoKiBGaWx0ZXIgb3V0IHRoZSBpbnRlcmZhY2Vz IHRoYXQgYXJlIGVuc2xhdmVkIGFzIHBhcnQgb2YgYm9uZHM6IENBLTEyNjkwICopCi0gIGxldCBw aHlzaWNhbF9tYWNzID0KLSAgICBMaXN0LmZpbHRlcgotICAgICAgKGZ1biBtYWMgLT4KLQkgbGV0 IGRldmljZSA9IExpc3QuYXNzb2MgbWFjIHQubWFjX3RvX3BoeV90YWJsZSBpbgotCSBsZXQgaXNf ZW5zbGF2ZWQgPSB0cnkgVW5peC5hY2Nlc3MgKCIvc3lzL2NsYXNzL25ldC8iXmRldmljZV4iL21h c3RlciIpIFtVbml4LkZfT0tdOyB0cnVlIHdpdGggXyAtPiBmYWxzZSBpbgotCSBub3QgaXNfZW5z bGF2ZWQpCi0gICAgICBwaHlzaWNhbF9tYWNzIGluCi0KICAgKCogQ3JlYXRlIFBJRiByZWNvcmRz IGZvciB0aGUgbmV3IGludGVyZmFjZXMgKikKICAgTGlzdC5pdGVyCiAgICAgKGZ1biBtYWMgLT4g Cg== --===============0028447542979828849== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0028447542979828849==-- From xen-api-bounces@lists.xensource.com Fri Jun 04 09:55:23 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 04 Jun 2010 09:55:23 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OKaB1-0002wf-7K; Fri, 04 Jun 2010 09:55:23 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OKaAl-0002uO-UX for xen-api@lists.xensource.com; Fri, 04 Jun 2010 09:55:08 -0700 X-ASG-Debug-ID: 1275670505-5dfb00690000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from lo.gmane.org (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 52284293181 for ; Fri, 4 Jun 2010 09:55:05 -0700 (PDT) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by spam.xensource.com with ESMTP id cSseIVU6x01S47UL for ; Fri, 04 Jun 2010 09:55:05 -0700 (PDT) X-Barracuda-Envelope-From: gcex-xen-api@m.gmane.org Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OKaAh-0005HQ-6t for xen-api@lists.xensource.com; Fri, 04 Jun 2010 18:55:03 +0200 Received: from 173-164-153-21-sfba.hfc.comcastbusiness.net ([173.164.153.21]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Jun 2010 18:55:03 +0200 Received: from blp by 173-164-153-21-sfba.hfc.comcastbusiness.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Jun 2010 18:55:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: xen-api@lists.xensource.com connect(): No such file or directory From: Ben Pfaff X-ASG-Orig-Subj: Re: [PATCH] Remove bond-slave filter from PIF.scan Date: Fri, 04 Jun 2010 09:51:22 -0700 Lines: 18 Message-ID: <87ljaubv1x.fsf@benpfaff.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 173-164-153-21-sfba.hfc.comcastbusiness.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:RN6N3cL0Y1pNIgOCnE7JCB/c7PM= X-Barracuda-Connect: lo.gmane.org[80.91.229.12] X-Barracuda-Start-Time: 1275670506 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31619 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] Re: [PATCH] Remove bond-slave filter from PIF.scan X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ben Pfaff List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Rob Hoes writes: > This filter uses sysfs to find out whether an interface is a > bond slave. This does not work when the openvswitch backend is > used. Besides, it does not seem to be necessary (anymore?) > anyway. > > PIF.scan creates a new PIF for each interface it finds if this > interface is physical and there is no PIF with the same > MAC. The slave interfaces always have the same MAC as the bond > master PIF (bridging backend) or their "real" MACs as stored in > their PIFs (openvswitch backend). Therefore, when a bond is in > effect, the MACs of all bond slaves have corresponding PIFs in > the DB, so PIF.scan won't create new ones. Makes sense to me. Acked-by: Ben Pfaff _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Mon Jun 07 09:11:03 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 07 Jun 2010 09:11:03 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OLeul-0003gZ-9K; Mon, 07 Jun 2010 09:11:03 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OLeue-0003dr-PN for xen-api@lists.xensource.com; Mon, 07 Jun 2010 09:10:56 -0700 X-ASG-Debug-ID: 1275927054-3051001d0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id D7FB3294F2A for ; Mon, 7 Jun 2010 09:10:55 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id Ccku5zh7pG7DJcqU (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 07 Jun 2010 09:10:55 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,379,1272844800"; d="scan'208";a="281184" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 07 Jun 2010 16:10:54 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Mon, 7 Jun 2010 17:10:53 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OLeuZ-0005PG-2m for xen-api@lists.xensource.com; Mon, 07 Jun 2010 17:10:51 +0100 Content-Type: multipart/mixed; boundary="===============2953917145568420767==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Re-sending with bug fix: Add biosdevname call to Netdev From: Rob Hoes To: xen-api Message-ID: Date: Mon, 7 Jun 2010 17:10:51 +0100 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275927055 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31897 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Re-sending with bug fix: Add biosdevname call to Netdev X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============2953917145568420767== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User Rob Hoes Re-sending with bug fix: Add biosdevname call to Netdev biosdevname is a tool used to find out the "real" device name of a network interface, according to the BIOS. This name is not affected by manual device renaming or changes in the Linux kernel. Signed-off-by: Rob Hoes diff -r 96761a1835c1 netdev/netdev.ml --- a/netdev/netdev.ml +++ b/netdev/netdev.ml @@ -397,6 +397,13 @@ not(List.mem "xen-backend" (String.split '/' link)) with _ -> false +let get_bios_name name = + try + let output, _ = Forkhelpers.execute_command_get_output "/sbin/biosdevname" ["-i"; name] in + let output = String.strip String.isspace output in + output + with _ -> name + (* Dispatch network backend operations. *) let network_config_file = "/etc/xensource/network.conf" diff -r 96761a1835c1 netdev/netdev.mli --- a/netdev/netdev.mli +++ b/netdev/netdev.mli @@ -131,8 +131,13 @@ (** Returns PCI vendor and device ID for network device. *) val get_ids : string -> string * string -(** Indicates whether the given interface is a physical interface *) +(** Indicates whether the given interface is a physical interface. *) val is_physical : string -> bool -(** Dispatch operation to correct backend device *) +(** Returns the device name of the given interface according to [biosdevname]. This is a name + * that is based on the BIOS name and should not be affected by changes in the Linux kernel or + * manual device renaming. *) +val get_bios_name : string -> string + +(** Dispatch operation to correct backend device. *) val network : network_ops --===============2953917145568420767== Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="netdev-biosdevname" IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFJvYiBIb2VzIDxyb2IuaG9lc0BjaXRyaXguY29t PgpSZS1zZW5kaW5nIHdpdGggYnVnIGZpeDogQWRkIGJpb3NkZXZuYW1lIGNhbGwgdG8gTmV0ZGV2 CgpiaW9zZGV2bmFtZSBpcyBhIHRvb2wgdXNlZCB0byBmaW5kIG91dCB0aGUgInJlYWwiIGRldmlj ZSBuYW1lIG9mIGEgbmV0d29yayBpbnRlcmZhY2UsIGFjY29yZGluZyB0byB0aGUgQklPUy4gVGhp cyBuYW1lIGlzIG5vdCBhZmZlY3RlZCBieSBtYW51YWwgZGV2aWNlIHJlbmFtaW5nIG9yIGNoYW5n ZXMgaW4gdGhlIExpbnV4IGtlcm5lbC4KClNpZ25lZC1vZmYtYnk6IFJvYiBIb2VzIDxyb2IuaG9l c0BjaXRyaXguY29tPgoKZGlmZiAtciA5Njc2MWExODM1YzEgbmV0ZGV2L25ldGRldi5tbAotLS0g YS9uZXRkZXYvbmV0ZGV2Lm1sCisrKyBiL25ldGRldi9uZXRkZXYubWwKQEAgLTM5Nyw2ICszOTcs MTMgQEAKIAlub3QoTGlzdC5tZW0gInhlbi1iYWNrZW5kIiAoU3RyaW5nLnNwbGl0ICcvJyBsaW5r KSkKICAgd2l0aCBfIC0+IGZhbHNlCiAKK2xldCBnZXRfYmlvc19uYW1lIG5hbWUgPQorCXRyeQor CQlsZXQgb3V0cHV0LCBfID0gRm9ya2hlbHBlcnMuZXhlY3V0ZV9jb21tYW5kX2dldF9vdXRwdXQg Ii9zYmluL2Jpb3NkZXZuYW1lIiBbIi1pIjsgbmFtZV0gaW4KKwkJbGV0IG91dHB1dCA9IFN0cmlu Zy5zdHJpcCBTdHJpbmcuaXNzcGFjZSBvdXRwdXQgaW4KKwkJb3V0cHV0CisJd2l0aCBfIC0+IG5h bWUKKwogKCogRGlzcGF0Y2ggbmV0d29yayBiYWNrZW5kIG9wZXJhdGlvbnMuICopCiAKIGxldCBu ZXR3b3JrX2NvbmZpZ19maWxlID0gIi9ldGMveGVuc291cmNlL25ldHdvcmsuY29uZiIKZGlmZiAt ciA5Njc2MWExODM1YzEgbmV0ZGV2L25ldGRldi5tbGkKLS0tIGEvbmV0ZGV2L25ldGRldi5tbGkK KysrIGIvbmV0ZGV2L25ldGRldi5tbGkKQEAgLTEzMSw4ICsxMzEsMTMgQEAKICgqKiBSZXR1cm5z IFBDSSB2ZW5kb3IgYW5kIGRldmljZSBJRCBmb3IgbmV0d29yayBkZXZpY2UuICopCiB2YWwgZ2V0 X2lkcyA6IHN0cmluZyAtPiBzdHJpbmcgKiBzdHJpbmcKIAotKCoqIEluZGljYXRlcyB3aGV0aGVy IHRoZSBnaXZlbiBpbnRlcmZhY2UgaXMgYSBwaHlzaWNhbCBpbnRlcmZhY2UgKikKKygqKiBJbmRp Y2F0ZXMgd2hldGhlciB0aGUgZ2l2ZW4gaW50ZXJmYWNlIGlzIGEgcGh5c2ljYWwgaW50ZXJmYWNl LiAqKQogdmFsIGlzX3BoeXNpY2FsIDogc3RyaW5nIC0+IGJvb2wKIAotKCoqIERpc3BhdGNoIG9w ZXJhdGlvbiB0byBjb3JyZWN0IGJhY2tlbmQgZGV2aWNlICopCisoKiogUmV0dXJucyB0aGUgZGV2 aWNlIG5hbWUgb2YgdGhlIGdpdmVuIGludGVyZmFjZSBhY2NvcmRpbmcgdG8gW2Jpb3NkZXZuYW1l XS4gVGhpcyBpcyBhIG5hbWUKKyAqICB0aGF0IGlzIGJhc2VkIG9uIHRoZSBCSU9TIG5hbWUgYW5k IHNob3VsZCBub3QgYmUgYWZmZWN0ZWQgYnkgY2hhbmdlcyBpbiB0aGUgTGludXgga2VybmVsIG9y CisgKiAgbWFudWFsIGRldmljZSByZW5hbWluZy4gKikKK3ZhbCBnZXRfYmlvc19uYW1lIDogc3Ry aW5nIC0+IHN0cmluZworCisoKiogRGlzcGF0Y2ggb3BlcmF0aW9uIHRvIGNvcnJlY3QgYmFja2Vu ZCBkZXZpY2UuICopCiB2YWwgbmV0d29yayA6IG5ldHdvcmtfb3BzCg== --===============2953917145568420767== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============2953917145568420767==-- From xen-api-bounces@lists.xensource.com Mon Jun 07 17:04:35 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 07 Jun 2010 17:04:35 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OLmJ1-00073G-LK; Mon, 07 Jun 2010 17:04:35 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OLmIr-00071Q-EB for xen-api@lists.xensource.com; Mon, 07 Jun 2010 17:04:26 -0700 X-ASG-Debug-ID: 1275955464-48b800300000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mail-gw0-f43.google.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id E5C3A2954DB for ; Mon, 7 Jun 2010 17:04:24 -0700 (PDT) Received: from mail-gw0-f43.google.com (mail-gw0-f43.google.com [74.125.83.43]) by spam.xensource.com with ESMTP id trgO5aYsG9n3BpiM for ; Mon, 07 Jun 2010 17:04:24 -0700 (PDT) X-Barracuda-Envelope-From: sergiocharpinel@gmail.com Received: by gwaa12 with SMTP id a12so69882gwa.30 for ; Mon, 07 Jun 2010 17:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=xhkkHhyRG7gkYpfZkM1ePsJtXCSTZM2cOKYRirqdrEk=; b=E7FEAj3Msu40jUt3ezAjWxGqAvfWSXdf9RWv4/LCHgOFJ7ir5tZ7MOR7boTUP7m/lO LGicAoZnDSHprrPbhQNg8eBa1axmyhiTdIgk3+Y2Mt2GwKlkfdw0TzfbMIMSxFv8TA/T H2lRS2rRChwmYpdNnuJ7WFRIuTumZFAUysEdY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=aq47z89bv9FJU2IkTgICN6bYo/BYs9nqypaJlYpEXQY4JmPTQc6FR6kNA0aCl5HIwc QwsPZKyGKrd9STk4LS51Zo9cYtKvzd6/TpNHZF/Ti6TrSKpB+ETZXCyEo62T7VVnjBm4 d19FuEtwi6TV068Nub+t+dTowI7SEQauE+l1g= MIME-Version: 1.0 Received: by 10.229.237.149 with SMTP id ko21mr4343701qcb.45.1275955464034; Mon, 07 Jun 2010 17:04:24 -0700 (PDT) Received: by 10.229.44.133 with HTTP; Mon, 7 Jun 2010 17:04:23 -0700 (PDT) Date: Mon, 7 Jun 2010 21:04:23 -0300 Message-ID: X-ASG-Orig-Subj: XCP DRBD Integration From: "Sergio Charpinel Jr." To: xen-api@lists.xensource.com X-Barracuda-Connect: mail-gw0-f43.google.com[74.125.83.43] X-Barracuda-Start-Time: 1275955464 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31917 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Subject: [Xen-API] XCP DRBD Integration X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1937865371==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1937865371== Content-Type: multipart/alternative; boundary=0016364eca722eda1d0488798845 --0016364eca722eda1d0488798845 Content-Type: text/plain; charset=ISO-8859-1 Hi, I'm student from GSoC project and I'm working in DRBD and XCP integration. I'd like to keep the community updated about the project, and to get some feedback from you. I was discussing with Dave some possibilites to handle DRBD config while creating the SR. One possibility was to use device-config to handle the configuration. But DRBD configuration is not so simple because we have resources, and inside resources we have nodes in configuration file. So, we have key pairs values for common section, resources section and for each node. And it should be easy to add new resources to DRBD. So I think it is a good idea to implement a separate plugin to manage DRBD resources (add, remove, edit, etc.) in a existing DRBDSR. But I'm still don't know at what point I can integrate this plugin with the existing SMAPI. It would be nice to have suggestions from you. Cheers. -- Sergio Roberto Charpinel Jr. --0016364eca722eda1d0488798845 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I'm student from GSoC project and I'm workin= g in DRBD and XCP integration. I'd like to keep the community updated a= bout the project, and to get some feedback from you.

I was discussing with Dave some possibilites to handle DRBD config whi= le creating the SR. One possibility was to use device-config to handle the = configuration. But DRBD configuration is not so simple because we have reso= urces, and inside resources we have nodes in configuration file. So, we hav= e key pairs values for common section, resources section and for each node.=
And it should be easy to add new resources to DRBD. So I think it is a= good idea to implement a separate plugin to manage DRBD resources (add, re= move, edit, etc.) in a existing DRBDSR. But I'm still don't know at= what point I can integrate this plugin with the existing SMAPI.

It would be nice to have suggestions from you.

Cheers.

--
Sergio Roberto Charpinel Jr.<= br>
--0016364eca722eda1d0488798845-- --===============1937865371== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1937865371==-- From xen-api-bounces@lists.xensource.com Tue Jun 08 04:36:07 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 08 Jun 2010 04:36:07 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OLx6F-0000Ob-2S; Tue, 08 Jun 2010 04:36:07 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OLx4S-0008F5-3r for xen-api@lists.xensource.com; Tue, 08 Jun 2010 04:34:16 -0700 X-ASG-Debug-ID: 1275996852-4c4500700000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 73DEC2951C0 for ; Tue, 8 Jun 2010 04:34:14 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id fJozzvjVCO0iYKrX (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 08 Jun 2010 04:34:14 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,384,1272844800"; d="scan'208";a="294666" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 08 Jun 2010 11:34:12 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Tue, 8 Jun 2010 12:34:11 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OLx4N-0008PM-5x for xen-api@lists.xensource.com; Tue, 08 Jun 2010 12:34:11 +0100 Content-Type: multipart/mixed; boundary="===============8587039706326548972==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Remove "dechainify VLAN" code from dbsync_slave From: Rob Hoes To: xen-api Message-ID: Date: Tue, 8 Jun 2010 12:34:11 +0100 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275996855 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31963 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Remove "dechainify VLAN" code from dbsync_slave X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============8587039706326548972== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User Rob Hoes Remove "dechainify VLAN" code from dbsync_slave This is no longer needed, as the creation of VLANs-on-VLANs is not possible anymore (for about two years), and this function therefore causes unnecessary overhead in xapi's startup sequence. Removed an unused function from the same module as well. Signed-off-by: Rob Hoes diff -r 7e09c13b96e7 ocaml/xapi/dbsync_slave.ml --- a/ocaml/xapi/dbsync_slave.ml +++ b/ocaml/xapi/dbsync_slave.ml @@ -31,14 +31,6 @@ let ( ** ) = Int64.mul let ( // ) = Int64.div -let trim_end s = - let i = ref (String.length s - 1) in - while !i > 0 && (List.mem s.[!i] [ ' '; '\t'; '\n'; '\r' ]) - do - decr i - done; - if !i >= 0 then String.sub s 0 (!i + 1) else "" - (* create localhost record *) let get_my_ip_addr() = @@ -115,35 +107,6 @@ end else Db.Host.remove_from_other_config ~__context ~self:host ~key:Xapi_globs.host_no_local_storage -(* CA-25162: Dechainify VLANs. We're actually doing this for _all_ - * PIFs, not just those relevant to localhost. Mostly this will be - * a no-op, and it shouldn't matter if we fix problems for other hosts - * here, and it covers the case where we're a slave and the master has - * broken vlans which need to be corrected before we try to replicate - * them *) -let fix_chained_vlans ~__context = - let pifs = Db.PIF.get_all_records ~__context in - let (vlan_pifs,underlying_pifs) = List.partition (fun (_,pifr) -> pifr.API.pIF_VLAN >= 0L) pifs in - List.iter (fun (vlan_pif_ref,vlan_pif_record) -> - let pif_underneath_vlan = Helpers.get_pif_underneath_vlan ~__context vlan_pif_ref in - if not (List.exists (fun (pif_ref,_) -> pif_ref = pif_underneath_vlan) underlying_pifs) then begin - (* There's a problem - the underlying PIF of the vlan might be a vlan itself (or might not exist) - Find the real underlying PIF by matching the host and device *) - try - let (real_pif_ref,real_pif_rec) = List.find (fun (_,pif_rec) -> - pif_rec.API.pIF_host = vlan_pif_record.API.pIF_host && - pif_rec.API.pIF_device = vlan_pif_record.API.pIF_device) underlying_pifs in - let vlan = Db.PIF.get_VLAN_master_of ~__context ~self:vlan_pif_ref in - warn "Resetting tagged PIF of VLAN %s, previously was %s" (Ref.string_of vlan) (Ref.string_of pif_underneath_vlan); - Db.VLAN.set_tagged_PIF ~__context ~self:vlan ~value:real_pif_ref - with _ -> - (* Can't find an underlying PIF - delete the VLAN record. This is pretty unlikely. *) - error "Destroying dangling VLAN and associated PIF record - the underlying device has disappeared"; - let vlan = Db.PIF.get_VLAN_master_of ~__context ~self:vlan_pif_ref in - Db.VLAN.destroy ~__context ~self:vlan; - Db.PIF.destroy ~__context ~self:vlan_pif_ref - end) vlan_pifs - (*************** update database tools ******************) let update_vms ~xal ~__context = @@ -557,11 +520,6 @@ update_physical_networks ~__context; *) - switched_sync Xapi_globs.sync_dechainify_vlans (fun () -> - debug "dechainifying VLANs"; - fix_chained_vlans ~__context - ); - switched_sync Xapi_globs.sync_resynchronise_pif_currently_attached (fun () -> debug "resynchronising PIF.currently_attached"; resynchronise_pif_currently_attached ~__context; --===============8587039706326548972== Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="dbsync-remove-vlan-dechainify" IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFJvYiBIb2VzIDxyb2IuaG9lc0BjaXRyaXguY29t PgpSZW1vdmUgImRlY2hhaW5pZnkgVkxBTiIgY29kZSBmcm9tIGRic3luY19zbGF2ZQoKVGhpcyBp cyBubyBsb25nZXIgbmVlZGVkLCBhcyB0aGUgY3JlYXRpb24gb2YgVkxBTnMtb24tVkxBTnMgaXMg bm90IHBvc3NpYmxlIGFueW1vcmUgKGZvciBhYm91dCB0d28geWVhcnMpLCBhbmQgdGhpcyBmdW5j dGlvbiB0aGVyZWZvcmUgY2F1c2VzIHVubmVjZXNzYXJ5IG92ZXJoZWFkIGluIHhhcGkncyBzdGFy dHVwIHNlcXVlbmNlLiBSZW1vdmVkIGFuIHVudXNlZCBmdW5jdGlvbiBmcm9tIHRoZSBzYW1lIG1v ZHVsZSBhcyB3ZWxsLgoKU2lnbmVkLW9mZi1ieTogUm9iIEhvZXMgPHJvYi5ob2VzQGNpdHJpeC5j b20+CgpkaWZmIC1yIDdlMDljMTNiOTZlNyBvY2FtbC94YXBpL2Ric3luY19zbGF2ZS5tbAotLS0g YS9vY2FtbC94YXBpL2Ric3luY19zbGF2ZS5tbAorKysgYi9vY2FtbC94YXBpL2Ric3luY19zbGF2 ZS5tbApAQCAtMzEsMTQgKzMxLDYgQEAKIGxldCAoICoqICkgPSBJbnQ2NC5tdWwKIGxldCAoIC8v ICkgPSBJbnQ2NC5kaXYKIAotbGV0IHRyaW1fZW5kIHMgPQotICAgICAgICBsZXQgaSA9IHJlZiAo U3RyaW5nLmxlbmd0aCBzIC0gMSkgaW4KLSAgICAgICAgd2hpbGUgIWkgPiAwICYmIChMaXN0Lm1l bSBzLlshaV0gWyAnICc7ICdcdCc7ICdcbic7ICdccicgXSkKLQlkbwotCQlkZWNyIGkKLQlkb25l OwotICAgICAgICBpZiAhaSA+PSAwIHRoZW4gU3RyaW5nLnN1YiBzIDAgKCFpICsgMSkgZWxzZSAi IgotCiAoKiBjcmVhdGUgbG9jYWxob3N0IHJlY29yZCAqKQogCiBsZXQgZ2V0X215X2lwX2FkZHIo KSA9CkBAIC0xMTUsMzUgKzEwNyw2IEBACiAgICAgZW5kIGVsc2UKICAgICAgIERiLkhvc3QucmVt b3ZlX2Zyb21fb3RoZXJfY29uZmlnIH5fX2NvbnRleHQgfnNlbGY6aG9zdCB+a2V5OlhhcGlfZ2xv YnMuaG9zdF9ub19sb2NhbF9zdG9yYWdlCiAKLSgqIENBLTI1MTYyOiBEZWNoYWluaWZ5IFZMQU5z LiBXZSdyZSBhY3R1YWxseSBkb2luZyB0aGlzIGZvciBfYWxsXwotICogUElGcywgbm90IGp1c3Qg dGhvc2UgcmVsZXZhbnQgdG8gbG9jYWxob3N0LiBNb3N0bHkgdGhpcyB3aWxsIGJlCi0gKiBhIG5v LW9wLCBhbmQgaXQgc2hvdWxkbid0IG1hdHRlciBpZiB3ZSBmaXggcHJvYmxlbXMgZm9yIG90aGVy IGhvc3RzCi0gKiBoZXJlLCBhbmQgaXQgY292ZXJzIHRoZSBjYXNlIHdoZXJlIHdlJ3JlIGEgc2xh dmUgYW5kIHRoZSBtYXN0ZXIgaGFzCi0gKiBicm9rZW4gdmxhbnMgd2hpY2ggbmVlZCB0byBiZSBj b3JyZWN0ZWQgYmVmb3JlIHdlIHRyeSB0byByZXBsaWNhdGUKLSAqIHRoZW0gKikKLWxldCBmaXhf Y2hhaW5lZF92bGFucyB+X19jb250ZXh0ID0KLSAgbGV0IHBpZnMgPSBEYi5QSUYuZ2V0X2FsbF9y ZWNvcmRzIH5fX2NvbnRleHQgaW4gCi0gIGxldCAodmxhbl9waWZzLHVuZGVybHlpbmdfcGlmcykg PSBMaXN0LnBhcnRpdGlvbiAoZnVuIChfLHBpZnIpIC0+IHBpZnIuQVBJLnBJRl9WTEFOID49IDBM KSBwaWZzIGluCi0gIExpc3QuaXRlciAoZnVuICh2bGFuX3BpZl9yZWYsdmxhbl9waWZfcmVjb3Jk KSAtPgotICAgIGxldCBwaWZfdW5kZXJuZWF0aF92bGFuID0gSGVscGVycy5nZXRfcGlmX3VuZGVy bmVhdGhfdmxhbiB+X19jb250ZXh0IHZsYW5fcGlmX3JlZiBpbgotICAgIGlmIG5vdCAoTGlzdC5l eGlzdHMgKGZ1biAocGlmX3JlZixfKSAtPiBwaWZfcmVmID0gcGlmX3VuZGVybmVhdGhfdmxhbikg dW5kZXJseWluZ19waWZzKSB0aGVuIGJlZ2luCi0gICAgICAoKiBUaGVyZSdzIGEgcHJvYmxlbSAt IHRoZSB1bmRlcmx5aW5nIFBJRiBvZiB0aGUgdmxhbiBtaWdodCBiZSBhIHZsYW4gaXRzZWxmIChv ciBtaWdodCBub3QgZXhpc3QpCi0JIEZpbmQgdGhlIHJlYWwgdW5kZXJseWluZyBQSUYgYnkgbWF0 Y2hpbmcgdGhlIGhvc3QgYW5kIGRldmljZSAqKQotICAgICAgdHJ5Ci0JbGV0IChyZWFsX3BpZl9y ZWYscmVhbF9waWZfcmVjKSA9IExpc3QuZmluZCAoZnVuIChfLHBpZl9yZWMpIC0+IAotCSAgcGlm X3JlYy5BUEkucElGX2hvc3QgPSB2bGFuX3BpZl9yZWNvcmQuQVBJLnBJRl9ob3N0ICYmCi0JICAg IHBpZl9yZWMuQVBJLnBJRl9kZXZpY2UgPSB2bGFuX3BpZl9yZWNvcmQuQVBJLnBJRl9kZXZpY2Up IHVuZGVybHlpbmdfcGlmcyBpbgotCWxldCB2bGFuID0gRGIuUElGLmdldF9WTEFOX21hc3Rlcl9v ZiB+X19jb250ZXh0IH5zZWxmOnZsYW5fcGlmX3JlZiBpbgotCXdhcm4gIlJlc2V0dGluZyB0YWdn ZWQgUElGIG9mIFZMQU4gJXMsIHByZXZpb3VzbHkgd2FzICVzIiAoUmVmLnN0cmluZ19vZiB2bGFu KSAoUmVmLnN0cmluZ19vZiBwaWZfdW5kZXJuZWF0aF92bGFuKTsKLQlEYi5WTEFOLnNldF90YWdn ZWRfUElGIH5fX2NvbnRleHQgfnNlbGY6dmxhbiB+dmFsdWU6cmVhbF9waWZfcmVmCi0gICAgICB3 aXRoIF8gLT4KLQkoKiBDYW4ndCBmaW5kIGFuIHVuZGVybHlpbmcgUElGIC0gZGVsZXRlIHRoZSBW TEFOIHJlY29yZC4gVGhpcyBpcyBwcmV0dHkgdW5saWtlbHkuICopCi0JZXJyb3IgIkRlc3Ryb3lp bmcgZGFuZ2xpbmcgVkxBTiBhbmQgYXNzb2NpYXRlZCBQSUYgcmVjb3JkIC0gdGhlIHVuZGVybHlp bmcgZGV2aWNlIGhhcyBkaXNhcHBlYXJlZCI7Ci0JbGV0IHZsYW4gPSBEYi5QSUYuZ2V0X1ZMQU5f bWFzdGVyX29mIH5fX2NvbnRleHQgfnNlbGY6dmxhbl9waWZfcmVmIGluCi0JRGIuVkxBTi5kZXN0 cm95IH5fX2NvbnRleHQgfnNlbGY6dmxhbjsKLQlEYi5QSUYuZGVzdHJveSB+X19jb250ZXh0IH5z ZWxmOnZsYW5fcGlmX3JlZgotICAgIGVuZCkgdmxhbl9waWZzCi0KICgqKioqKioqKioqKioqKiog dXBkYXRlIGRhdGFiYXNlIHRvb2xzICoqKioqKioqKioqKioqKioqKikKIAogbGV0IHVwZGF0ZV92 bXMgfnhhbCB+X19jb250ZXh0ID0KQEAgLTU1NywxMSArNTIwLDYgQEAKICAgdXBkYXRlX3BoeXNp Y2FsX25ldHdvcmtzIH5fX2NvbnRleHQ7CiAqKQogCi0gIHN3aXRjaGVkX3N5bmMgWGFwaV9nbG9i cy5zeW5jX2RlY2hhaW5pZnlfdmxhbnMgKGZ1biAoKSAtPgotICAgIGRlYnVnICJkZWNoYWluaWZ5 aW5nIFZMQU5zIjsKLSAgICBmaXhfY2hhaW5lZF92bGFucyB+X19jb250ZXh0Ci0gICk7Ci0KICAg c3dpdGNoZWRfc3luYyBYYXBpX2dsb2JzLnN5bmNfcmVzeW5jaHJvbmlzZV9waWZfY3VycmVudGx5 X2F0dGFjaGVkIChmdW4gKCkgLT4KICAgICBkZWJ1ZyAicmVzeW5jaHJvbmlzaW5nIFBJRi5jdXJy ZW50bHlfYXR0YWNoZWQiOwogICAgIHJlc3luY2hyb25pc2VfcGlmX2N1cnJlbnRseV9hdHRhY2hl ZCB+X19jb250ZXh0Owo= --===============8587039706326548972== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============8587039706326548972==-- From xen-api-bounces@lists.xensource.com Tue Jun 08 05:44:32 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 08 Jun 2010 05:44:32 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OLyAR-0005gd-VL; Tue, 08 Jun 2010 05:44:32 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OLy8j-0005J1-7O for xen-api@lists.xensource.com; Tue, 08 Jun 2010 05:42:45 -0700 X-ASG-Debug-ID: 1276000962-0ac7003f0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 470552953F4 for ; Tue, 8 Jun 2010 05:42:43 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id SMgcxVeHX6fBqxpB (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 08 Jun 2010 05:42:43 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,384,1272844800"; d="scan'208";a="296433" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 08 Jun 2010 12:42:42 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Tue, 8 Jun 2010 13:42:42 +0100 Received: from drall.uk.xensource.com ([10.80.227.107]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OLy8f-0000ez-Ua for xen-api@lists.xensource.com; Tue, 08 Jun 2010 13:42:41 +0100 Content-Type: multipart/mixed; boundary="===============6590655537380855457==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] fix occasional failure building omake X-Mercurial-Node: 5227f497aaa239ff7ce8b7d20c61aa6a3fc1b23b Message-ID: <5227f497aaa239ff7ce8.1276000957@drall.uk.xensource.com> Date: Tue, 8 Jun 2010 13:42:37 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276000964 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31969 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] fix occasional failure building omake X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============6590655537380855457== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1275996954 -3600 # Node ID 5227f497aaa239ff7ce8b7d20c61aa6a3fc1b23b # Parent b3462209199855bd5d312cccbbe40829369d75a5 Add omake fix from Debian bug 439568 This adds this patch from: http://patches.ubuntu.com/by-release/extracted/debian/o/omake/0.9.8.5-3-2/10_stdin_stdout_fix.dpatch by Mike Furr diff -r b34622091998 -r 5227f497aaa2 Makefile --- a/Makefile Tue Jun 01 16:39:21 2010 +0100 +++ b/Makefile Tue Jun 08 12:35:54 2010 +0100 @@ -54,6 +54,7 @@ cp $(DIST)/findlib-${FINDLIB_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp $(DIST)/omake-${OMAKE_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp patches/omake-no-sync $(RPM_SOURCESDIR)/ + cp patches/omake-stdin-stdout $(RPM_SOURCESDIR)/ cp $(DIST)/xmlm-${XMLM_VERSION}.tbz $(RPM_SOURCESDIR)/ cp $(DIST)/getopt-${GETOPT_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp $(DIST)/type-conv-${TYPECONV_VERSION}.tar.bz2 $(RPM_SOURCESDIR)/ diff -r b34622091998 -r 5227f497aaa2 omake.spec --- a/omake.spec Tue Jun 01 16:39:21 2010 +0100 +++ b/omake.spec Tue Jun 08 12:35:54 2010 +0100 @@ -8,6 +8,7 @@ URL: http://omake.metaprl.org/ Source0: %{name}-%{version}-%{index}.tar.gz Patch0: omake-no-sync +Patch1: omake-stdin-stdout License: GPL Group: Development/Tools BuildRoot: %{_tmppath}/%{name}-root @@ -32,6 +33,7 @@ %prep %setup -q %patch0 -p1 -b ~omake-no-sync +%patch1 -p1 -b ~omake-stdin-stdout %build INSTALL_ROOT=$RPM_BUILD_ROOT\ diff -r b34622091998 -r 5227f497aaa2 patches/omake-stdin-stdout --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/omake-stdin-stdout Tue Jun 08 12:35:54 2010 +0100 @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_stdin_stdout_fix.dpatch by Mike Furr +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: stdin <-> stdout fix (upstream r12115) + +@DPATCH@ +diff -urNad omake-0.9.8.5~/src/build/omake_rule.ml omake-0.9.8.5/src/build/omake_rule.ml +--- omake-0.9.8.5~/src/build/omake_rule.ml 2007-07-02 14:20:23.000000000 -0400 ++++ omake-0.9.8.5/src/build/omake_rule.ml 2007-09-06 12:52:23.752616976 -0400 +@@ -1040,12 +1040,12 @@ + * Evaluate the commands NOW. + *) + and exec_commands venv pos loc commands = +- let stdin = channel_of_var venv pos loc stdin_var in + let stdout = channel_of_var venv pos loc stdout_var in +- let stdin = Lm_channel.descr stdin in ++ let stderr = channel_of_var venv pos loc stderr_var in + let stdout = Lm_channel.descr stdout in ++ let stderr = Lm_channel.descr stderr in + List.iter (fun command -> +- let pid = eval_shell_internal stdin stdout command in ++ let pid = eval_shell_internal stdout stderr command in + let status, _ = eval_shell_wait venv pos pid in + let code = + match status with 3 files changed, 29 insertions(+) Makefile | 1 + omake.spec | 2 ++ patches/omake-stdin-stdout | 26 ++++++++++++++++++++++++++ --===============6590655537380855457== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-dist-ocaml.hg.patch" # HG changeset patch # User David Scott # Date 1275996954 -3600 # Node ID 5227f497aaa239ff7ce8b7d20c61aa6a3fc1b23b # Parent b3462209199855bd5d312cccbbe40829369d75a5 Add omake fix from Debian bug 439568 This adds this patch from: http://patches.ubuntu.com/by-release/extracted/debian/o/omake/0.9.8.5-3-2/10_stdin_stdout_fix.dpatch by Mike Furr diff -r b34622091998 -r 5227f497aaa2 Makefile --- a/Makefile Tue Jun 01 16:39:21 2010 +0100 +++ b/Makefile Tue Jun 08 12:35:54 2010 +0100 @@ -54,6 +54,7 @@ cp $(DIST)/findlib-${FINDLIB_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp $(DIST)/omake-${OMAKE_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp patches/omake-no-sync $(RPM_SOURCESDIR)/ + cp patches/omake-stdin-stdout $(RPM_SOURCESDIR)/ cp $(DIST)/xmlm-${XMLM_VERSION}.tbz $(RPM_SOURCESDIR)/ cp $(DIST)/getopt-${GETOPT_VERSION}.tar.gz $(RPM_SOURCESDIR)/ cp $(DIST)/type-conv-${TYPECONV_VERSION}.tar.bz2 $(RPM_SOURCESDIR)/ diff -r b34622091998 -r 5227f497aaa2 omake.spec --- a/omake.spec Tue Jun 01 16:39:21 2010 +0100 +++ b/omake.spec Tue Jun 08 12:35:54 2010 +0100 @@ -8,6 +8,7 @@ URL: http://omake.metaprl.org/ Source0: %{name}-%{version}-%{index}.tar.gz Patch0: omake-no-sync +Patch1: omake-stdin-stdout License: GPL Group: Development/Tools BuildRoot: %{_tmppath}/%{name}-root @@ -32,6 +33,7 @@ %prep %setup -q %patch0 -p1 -b ~omake-no-sync +%patch1 -p1 -b ~omake-stdin-stdout %build INSTALL_ROOT=$RPM_BUILD_ROOT\ diff -r b34622091998 -r 5227f497aaa2 patches/omake-stdin-stdout --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/omake-stdin-stdout Tue Jun 08 12:35:54 2010 +0100 @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_stdin_stdout_fix.dpatch by Mike Furr +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: stdin <-> stdout fix (upstream r12115) + +@DPATCH@ +diff -urNad omake-0.9.8.5~/src/build/omake_rule.ml omake-0.9.8.5/src/build/omake_rule.ml +--- omake-0.9.8.5~/src/build/omake_rule.ml 2007-07-02 14:20:23.000000000 -0400 ++++ omake-0.9.8.5/src/build/omake_rule.ml 2007-09-06 12:52:23.752616976 -0400 +@@ -1040,12 +1040,12 @@ + * Evaluate the commands NOW. + *) + and exec_commands venv pos loc commands = +- let stdin = channel_of_var venv pos loc stdin_var in + let stdout = channel_of_var venv pos loc stdout_var in +- let stdin = Lm_channel.descr stdin in ++ let stderr = channel_of_var venv pos loc stderr_var in + let stdout = Lm_channel.descr stdout in ++ let stderr = Lm_channel.descr stderr in + List.iter (fun command -> +- let pid = eval_shell_internal stdin stdout command in ++ let pid = eval_shell_internal stdout stderr command in + let status, _ = eval_shell_wait venv pos pid in + let code = + match status with --===============6590655537380855457== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============6590655537380855457==-- From xen-api-bounces@lists.xensource.com Tue Jun 08 07:10:45 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 08 Jun 2010 07:10:45 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OLzVs-0000PE-H6; Tue, 08 Jun 2010 07:10:44 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OLx0l-00082p-Qn for xen-api@lists.xensource.com; Tue, 08 Jun 2010 04:30:27 -0700 X-ASG-Debug-ID: 1275996625-4990007a0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 5D6D02950F8 for ; Tue, 8 Jun 2010 04:30:26 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id kdc45qz1cBvqFYaJ (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 08 Jun 2010 04:30:26 -0700 (PDT) X-Barracuda-Envelope-From: George.Dunlap@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,384,1272844800"; d="scan'208";a="294596" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 08 Jun 2010 11:30:25 +0000 Received: from [10.80.3.166] (10.80.3.166) by smtprelay.citrix.com (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Tue, 8 Jun 2010 12:30:25 +0100 Message-ID: <4C0E29CF.10407@eu.citrix.com> Date: Tue, 8 Jun 2010 12:30:23 +0100 From: George Dunlap User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: "xen-api@lists.xensource.com" , Jonathan Knowles X-ASG-Orig-Subj: [RFC] Ballooning and live migration Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1275996627 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31963 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Mailman-Approved-At: Tue, 08 Jun 2010 07:10:33 -0700 Cc: Subject: [Xen-API] [RFC] Ballooning and live migration X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com At the moment (and as of the latest XenServer release), when migrating a VM, it is first ballooned down to static-min before the migration happens. I don't think this is the right behavior; my sense is that there's little or no benefit, and a big potential cost. So I'd like to open up a discussion on the topic. I don't know the reason this behavior was decided, so I have go guess. Two reasons that come to mind are: 1. To reduce the network cost of migrating (lower memory -> fewer pages transferred) 2. To simplify logic of memory #1 I don't think is actually true. Migration can only happen when the disk is on shared storage across a network. When the balloon driver inflates the balloon, dirty pages will be written to disk; and assuming the data was somehow useful, they'll be read back in on the other side when the balloon is deflated. So on the whole, the total number of pages over the network won't decrease; they'll just switch from migration traffic to disk traffic. As for #2, I think that the following is simple enough: * If free memory on migration target host >= VM memory target, just transfer as is. * If free memory on migration taget host < VM memory target, balloon down to free memory. As for the cost: of course ballooning down has a cost, both in terms of cpu cycles spent, and dirty pages transferred over the network; and there's the cost on the other side of re-filling any pages that were swapped out. Furthermore, if the working set is greater than than static min, then ballooning down will cause the VM to thrash for the period of time while it's migrating, which is much worse than having a slightly longer migration time. Thoughts? -George _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Tue Jun 08 09:30:50 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 08 Jun 2010 09:30:50 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OM1hS-0002c6-D7; Tue, 08 Jun 2010 09:30:50 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OM1hF-0002Zk-I2 for xen-api@lists.xensource.com; Tue, 08 Jun 2010 09:30:37 -0700 X-ASG-Debug-ID: 1276014635-034500b20000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mail09.linbit.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id EE601295510 for ; Tue, 8 Jun 2010 09:30:36 -0700 (PDT) Received: from mail09.linbit.com (mail09.linbit.com [212.69.161.110]) by spam.xensource.com with ESMTP id zUWEDTykh4nyMtk9 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 08 Jun 2010 09:30:36 -0700 (PDT) X-Barracuda-Envelope-From: adam.gandelman@linbit.com Received: from [192.168.10.143] (static-173-50-141-22.ptldor.fios.verizon.net [173.50.141.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTPSA id 2B3EC103B4CB; Tue, 8 Jun 2010 18:30:32 +0200 (CEST) Message-ID: <4C0E7026.80805@linbit.com> Date: Tue, 08 Jun 2010 09:30:30 -0700 From: Adam Gandelman User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: "Sergio Charpinel Jr." X-ASG-Orig-Subj: Re: [Xen-API] XCP DRBD Integration Subject: Re: [Xen-API] XCP DRBD Integration References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: mail09.linbit.com[212.69.161.110] X-Barracuda-Start-Time: 1276014636 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.31981 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: xen-api@lists.xensource.com X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Sergio Charpinel Jr. wrote: > Hi, > > I'm student from GSoC project and I'm working in DRBD and XCP > integration. I'd like to keep the community updated about the project, > and to get some feedback from you. > > I was discussing with Dave some possibilites to handle DRBD config > while creating the SR. One possibility was to use device-config to > handle the configuration. But DRBD configuration is not so simple > because we have resources, and inside resources we have nodes in > configuration file. So, we have key pairs values for common section, > resources section and for each node. > And it should be easy to add new resources to DRBD. So I think it is a > good idea to implement a separate plugin to manage DRBD resources > (add, remove, edit, etc.) in a existing DRBDSR. But I'm still don't > know at what point I can integrate this plugin with the existing SMAPI. > > It would be nice to have suggestions from you. > > Cheers. Hi- I've given this lots of thought in the past but have not had time to familiarize myself with the API. I'm curious to know at which level you plan on integrating the DRBD functionality. For example, one large DRBD resource that ends up configured as entire SR or DRBD resources configured as a sort of extension to already existing SRs (ie, resource configured on top of an already existing LV virtual disk) The latter would certainly increase complexity but allow for more flexibility in terms of configuration, migration and performance tuning. I like the idea of configuring a resource to be brought up initially in StandAlone, waiting to be paired with another node/SR for initial synchronization, failover, migration, etc.. I believe the ganeti project uses DRBD in this way currently. There are certainly lots of different ways to insert DRBD into the mix. I'm also interested to know what others think. -- : Adam Gandelman : LINBIT | Your Way to High Availability : : http://www.linbit.com _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 09 00:00:21 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 09 Jun 2010 00:00:21 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OMFGu-0005Dm-Lr; Wed, 09 Jun 2010 00:00:20 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OMFFU-0004xD-5R for xen-api@lists.xensource.com; Tue, 08 Jun 2010 23:58:52 -0700 X-ASG-Debug-ID: 1276066730-2f0e00280000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mxs.selfmail.ru (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id C1FFA295EB2 for ; Tue, 8 Jun 2010 23:58:51 -0700 (PDT) Received: from mxs.selfmail.ru (mxs.selfmail.ru [77.221.143.26]) by spam.xensource.com with ESMTP id UY63VrlPhbit2aZ4 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 08 Jun 2010 23:58:51 -0700 (PDT) X-Barracuda-Envelope-From: v.tolstov@selfip.ru DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=selfip.ru; s=dk; h=Content-Transfer-Encoding:Mime-Version:Message-ID:Date:Content-Type:To:Reply-To:From:Subject; bh=mWKegbKrHddpFlyaSnRCJxS2hDdFze/OLYgAsTUCLH0=; b=jDrwTBKrsSUhAO0NRcJKp1GOlhjkIZb9LN7OWGV0btaoSvX+QGHKXFGhbZ7PX0gTpguFsSD2sDu/mzLmUsHASHTdJMMj0DoJk3DUbu8MO9Si0rxE+hrva+cG7lKwJtAb; X-ACL-SPF: Received: from [UNAVAILABLE] ([217.170.84.182]:46310 helo=[192.168.1.101]) by mxs.selfmail.ru with esmtpa (Exim 4.72) (envelope-from ) id 1OMFFQ-0000rR-9k for xen-api@lists.xensource.com; Wed, 09 Jun 2010 10:58:48 +0400 X-ASG-Orig-Subj: newbie question about xenapi (get la and free memory) From: Vasiliy G Tolstov To: "xen-api@lists.xensource.com" Content-Type: text/plain; charset="UTF-8" Organization: Selfip.Ru Date: Wed, 09 Jun 2010 10:58:35 +0400 Message-ID: <1276066715.2399.7.camel@work.selfip.ru> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: mxs.selfmail.ru[77.221.143.26] X-Barracuda-Start-Time: 1276066731 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32033 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words Subject: [Xen-API] newbie question about xenapi (get la and free memory) X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: v.tolstov@selfip.ru List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hello. I'm need to get load average and free memory for DomU. How can i get it using xenapi (in python or php) if i can get it with xmlrpc by http - i be happy ;) I'm try to google for my question, but i can't found answer. Thank You. -- Vasiliy G Tolstov Selfip.Ru _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 09 04:07:33 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 09 Jun 2010 04:07:33 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJ88-00076b-5Z; Wed, 09 Jun 2010 04:07:32 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJ31-0005rU-LD for xen-api@lists.xensource.com; Wed, 09 Jun 2010 04:02:16 -0700 X-ASG-Debug-ID: 1276081333-3d1600230000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 0AC24295F54 for ; Wed, 9 Jun 2010 04:02:14 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id Pbj0JchRyn2LpMxL (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 09 Jun 2010 04:02:14 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,391,1272844800"; d="scan'208";a="314907" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 09 Jun 2010 11:02:12 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Wed, 9 Jun 2010 12:02:12 +0100 From: Jonathan Ludlam To: "v.tolstov@selfip.ru" Date: Wed, 9 Jun 2010 12:02:11 +0100 X-ASG-Orig-Subj: Re: [Xen-API] newbie question about xenapi (get la and free memory) Subject: Re: [Xen-API] newbie question about xenapi (get la and free memory) Thread-Topic: [Xen-API] newbie question about xenapi (get la and free memory) Thread-Index: AcsHwzYvSk0qzvDbQf2NaJd7k4mT+w== Message-ID: References: <1276066715.2399.7.camel@work.selfip.ru> In-Reply-To: <1276066715.2399.7.camel@work.selfip.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276081335 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32046 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi Vasiliy, Have a look here: http://wiki.xensource.com/xenwiki/XAPI_RRDs We don't record the load average from a guest, but we do record the CPU usa= ge and free memory. Hope this helps! Jon On 9 Jun 2010, at 07:58, Vasiliy G Tolstov wrote: > Hello.=20 > I'm need to get load average and free memory for DomU. > How can i get it using xenapi (in python or php) if i can get it with > xmlrpc by http - i be happy ;) >=20 > I'm try to google for my question, but i can't found answer. >=20 > Thank You. >=20 > --=20 > Vasiliy G Tolstov > Selfip.Ru >=20 >=20 > _______________________________________________ > xen-api mailing list > xen-api@lists.xensource.com > http://lists.xensource.com/mailman/listinfo/xen-api _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 09 04:16:45 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 09 Jun 2010 04:16:45 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJH3-0001Ck-JT; Wed, 09 Jun 2010 04:16:45 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJDe-0000Gf-6a for xen-api@lists.xensource.com; Wed, 09 Jun 2010 04:13:14 -0700 X-ASG-Debug-ID: 1276081991-3d12003a0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mxs.selfmail.ru (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id B2E0A2962F1 for ; Wed, 9 Jun 2010 04:13:13 -0700 (PDT) Received: from mxs.selfmail.ru (mxs.selfmail.ru [77.221.143.26]) by spam.xensource.com with ESMTP id bemfUJeqBbsijz72 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 09 Jun 2010 04:13:13 -0700 (PDT) X-Barracuda-Envelope-From: v.tolstov@selfip.ru DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=selfip.ru; s=dk; h=Content-Transfer-Encoding:Mime-Version:Message-ID:Date:Content-Type:References:In-Reply-To:Cc:To:Reply-To:From:Subject; bh=U/+vCRDf0JYSjMPMho3X8HIBAiK3+jcEJVNLJvXURmY=; b=Srmn7qwG1mV/0hW2+wr7u2BCv8pYgpE2Ri8tss7oUns2zCjzaHSCxuKN6MfjM2JflbmcOlLPJVR8SdbC7E/TIjWeTnV85w0fGY5a3WLwYi+YcPatBWpK6cNJhPJTZSLp; X-ACL-SPF: Received: from [UNAVAILABLE] ([217.170.84.182]:49537 helo=[192.168.1.101]) by mxs.selfmail.ru with esmtpa (Exim 4.72) (envelope-from ) id 1OMJDa-0007pb-9Y; Wed, 09 Jun 2010 15:13:10 +0400 X-ASG-Orig-Subj: Re: [Xen-API] newbie question about xenapi (get la and free memory) Subject: Re: [Xen-API] newbie question about xenapi (get la and free memory) From: Vasiliy G Tolstov To: Jonathan Ludlam In-Reply-To: References: <1276066715.2399.7.camel@work.selfip.ru> Content-Type: text/plain; charset="UTF-8" Organization: Selfip.Ru Date: Wed, 09 Jun 2010 15:12:57 +0400 Message-ID: <1276081977.2399.12.camel@work.selfip.ru> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-Barracuda-Connect: mxs.selfmail.ru[77.221.143.26] X-Barracuda-Start-Time: 1276081993 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 3.40 X-Barracuda-Spam-Status: No, SCORE=3.40 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=MARKETING_SUBJECT, WEIRD_QUOTING X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32048 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words 2.80 WEIRD_QUOTING BODY: Weird repeated double-quotation marks Content-Transfer-Encoding: quoted-printable Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: v.tolstov@selfip.ru List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com =D0=92 =D0=A1=D1=80=D0=B4, 09/06/2010 =D0=B2 12:02 +0100, Jonathan Ludlam= =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Hi Vasiliy, >=20 > Have a look here: >=20 > http://wiki.xensource.com/xenwiki/XAPI_RRDs >=20 > We don't record the load average from a guest, but we do record the CPU= usage and free memory. >=20 > Hope this helps! >=20 > Jon Thank You very much. But i can fully understand how can i get this rrd files from xml-rpc? Can You provide some help? in php i wrote: send('session.login_with_password', array("",""))); ... ... ?> --=20 Vasiliy G Tolstov Selfip.Ru _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 09 04:22:52 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 09 Jun 2010 04:22:52 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJMx-0002VR-BU; Wed, 09 Jun 2010 04:22:51 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJMm-0002T4-18 for xen-api@lists.xensource.com; Wed, 09 Jun 2010 04:22:40 -0700 X-ASG-Debug-ID: 1276082557-3cf900500000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 8B88A295F50 for ; Wed, 9 Jun 2010 04:22:38 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id uW2jiKu9nze165DK (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 09 Jun 2010 04:22:38 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,391,1272844800"; d="scan'208";a="315435" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 09 Jun 2010 11:22:37 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Wed, 9 Jun 2010 12:22:37 +0100 From: Jonathan Ludlam To: "v.tolstov@selfip.ru" Date: Wed, 9 Jun 2010 12:22:35 +0100 X-ASG-Orig-Subj: Re: [Xen-API] newbie question about xenapi (get la and free memory) Subject: Re: [Xen-API] newbie question about xenapi (get la and free memory) Thread-Topic: [Xen-API] newbie question about xenapi (get la and free memory) Thread-Index: AcsHxhANm8Mncn2ZQye211Rn6ihsTQ== Message-ID: References: <1276066715.2399.7.camel@work.selfip.ru> <1276081977.2399.12.camel@work.selfip.ru> In-Reply-To: <1276081977.2399.12.camel@work.selfip.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276082559 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 3.40 X-Barracuda-Spam-Status: No, SCORE=3.40 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=MARKETING_SUBJECT, WEIRD_QUOTING X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32048 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words 2.80 WEIRD_QUOTING BODY: Weird repeated double-quotation marks Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0166665089==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0166665089== Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SXQncyBub3QgWE1MUlBDLCBpdCdzIGEgbm9ybWFsIGh0dHAgaGFuZGxlci4gSnVzdCBpc3N1ZSBh ICdHRVQnIHJlcXVlc3QgdG8gdGhlIFVSSXMgbWVudGlvbiBpbiB0aGUgd2lraSBwYWdlLg0KDQpJ J20gYWZyYWlkIEkgZG9uJ3Qga25vdyBQSFAsIHNvIEkgY2FuJ3QgaGVscCB3aXRoIHRoZSBjb2Rl IQ0KDQpKb24NCg0KDQoNCk9uIDkgSnVuIDIwMTAsIGF0IDEyOjEyLCBWYXNpbGl5IEcgVG9sc3Rv diB3cm90ZToNCg0KPiDQkiDQodGA0LQsIDA5LzA2LzIwMTAg0LIgMTI6MDIgKzAxMDAsIEpvbmF0 aGFuIEx1ZGxhbSDQv9C40YjQtdGCOg0KPj4gSGkgVmFzaWxpeSwNCj4+IA0KPj4gSGF2ZSBhIGxv b2sgaGVyZToNCj4+IA0KPj4gaHR0cDovL3dpa2kueGVuc291cmNlLmNvbS94ZW53aWtpL1hBUElf UlJEcw0KPj4gDQo+PiBXZSBkb24ndCByZWNvcmQgdGhlIGxvYWQgYXZlcmFnZSBmcm9tIGEgZ3Vl c3QsIGJ1dCB3ZSBkbyByZWNvcmQgdGhlIENQVSB1c2FnZSBhbmQgZnJlZSBtZW1vcnkuDQo+PiAN Cj4+IEhvcGUgdGhpcyBoZWxwcyENCj4+IA0KPj4gSm9uDQo+IA0KPiBUaGFuayBZb3UgdmVyeSBt dWNoLiBCdXQgaSBjYW4gZnVsbHkgdW5kZXJzdGFuZCBob3cgY2FuIGkgZ2V0IHRoaXMgcnJkDQo+ IGZpbGVzIGZyb20geG1sLXJwYz8gQ2FuIFlvdSBwcm92aWRlIHNvbWUgaGVscD8NCj4gDQo+IGlu IHBocCBpIHdyb3RlOg0KPiA8P3BocA0KPiAkeGVuID0gbmV3IHhtbHJwY19jbGllbnQoImh0dHA6 Ly8kaG9zdDokcG9ydCIpOw0KPiANCj4gJHNlc3Npb24gPSB2YWxpZGF0ZSgkeGVuLT5zZW5kKCdz ZXNzaW9uLmxvZ2luX3dpdGhfcGFzc3dvcmQnLA0KPiBhcnJheSgiIiwiIikpKTsNCj4gLi4uDQo+ IC4uLg0KPiANCj4gPz4NCj4gDQo+IC0tIA0KPiBWYXNpbGl5IEcgVG9sc3RvdiA8di50b2xzdG92 QHNlbGZpcC5ydT4NCj4gU2VsZmlwLlJ1DQo+IA0KDQo= --===============0166665089== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0166665089==-- From xen-api-bounces@lists.xensource.com Wed Jun 09 04:51:12 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 09 Jun 2010 04:51:12 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJoM-0004hA-93; Wed, 09 Jun 2010 04:51:10 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJo6-0004eE-AN for xen-api@lists.xensource.com; Wed, 09 Jun 2010 04:50:54 -0700 X-ASG-Debug-ID: 1276084252-3d1200850000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mail-yw0-f172.google.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 3ED81296186 for ; Wed, 9 Jun 2010 04:50:52 -0700 (PDT) Received: from mail-yw0-f172.google.com (mail-yw0-f172.google.com [209.85.211.172]) by spam.xensource.com with ESMTP id t6WGjpmAKOI8U9Z1 for ; Wed, 09 Jun 2010 04:50:52 -0700 (PDT) X-Barracuda-Envelope-From: sergiocharpinel@gmail.com Received: by ywh2 with SMTP id 2so2371306ywh.0 for ; Wed, 09 Jun 2010 04:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=6m4k1pFo9mbWWWv3G1UBIuzuNEvr+uL7lw2NO03gY4Q=; b=uf7LBbQLsG+npQLd+U7epwc+SCI37LjPFX1TFUKPabPBKkHCUEaQuC+i3tK7r8gJtt peJVnOtlG44Whe9vb1Dmxp2uxVuKxcc7KUVadg2frU1ZHY2oTbMfxiqdJnN0IvjOq6Se F152s5/6QC1QqMLHeblBO+XPZHdxhPXdRGfgE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=x4WdUFnV05Rf8aHz7BeqtYZT2zq+28OGbEwInDCuk1E6CRh5N7q7WqCnHsNCYXsQzx WjCTfd8smtUwU5yvjvaG3fP52p20Ox5SNhQnRVTj56QgmewwpZnSYNAK6rP+dNHaZrdu E/7Cs14fKfpGjOEUW0dqfb/vq8Y/seplweJaU= MIME-Version: 1.0 Received: by 10.229.222.208 with SMTP id ih16mr6700216qcb.55.1276084250123; Wed, 09 Jun 2010 04:50:50 -0700 (PDT) Received: by 10.229.44.133 with HTTP; Wed, 9 Jun 2010 04:50:50 -0700 (PDT) In-Reply-To: <4C0E7026.80805@linbit.com> References: <4C0E7026.80805@linbit.com> Date: Wed, 9 Jun 2010 08:50:50 -0300 Message-ID: X-ASG-Orig-Subj: Re: [Xen-API] XCP DRBD Integration Subject: Re: [Xen-API] XCP DRBD Integration From: "Sergio Charpinel Jr." To: Adam Gandelman X-Barracuda-Connect: mail-yw0-f172.google.com[209.85.211.172] X-Barracuda-Start-Time: 1276084253 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32048 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Cc: xen-api@lists.xensource.com X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0670058227==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0670058227== Content-Type: multipart/alternative; boundary=0016361e829e6e9c76048897841e --0016361e829e6e9c76048897841e Content-Type: text/plain; charset=ISO-8859-1 Adam, Actually, IMHO, DRBD works like a SR (Storage Repository) which each resource is attached to a VDI (LVM LV, hard drive partition, and any other block device) and manage them. That's what I have in mind. But of course, I'd like to get yours suggestions first. Thank you for your reply. Cheers. 2010/6/8 Adam Gandelman > Sergio Charpinel Jr. wrote: > > Hi, > > > > I'm student from GSoC project and I'm working in DRBD and XCP > > integration. I'd like to keep the community updated about the project, > > and to get some feedback from you. > > > > I was discussing with Dave some possibilites to handle DRBD config > > while creating the SR. One possibility was to use device-config to > > handle the configuration. But DRBD configuration is not so simple > > because we have resources, and inside resources we have nodes in > > configuration file. So, we have key pairs values for common section, > > resources section and for each node. > > And it should be easy to add new resources to DRBD. So I think it is a > > good idea to implement a separate plugin to manage DRBD resources > > (add, remove, edit, etc.) in a existing DRBDSR. But I'm still don't > > know at what point I can integrate this plugin with the existing SMAPI. > > > > It would be nice to have suggestions from you. > > > > Cheers. > > Hi- > > I've given this lots of thought in the past but have not had time to > familiarize myself with the API. I'm curious to know at which level you > plan on integrating the DRBD functionality. For example, one large DRBD > resource that ends up configured as entire SR or DRBD resources > configured as a sort of extension to already existing SRs (ie, resource > configured on top of an already existing LV virtual disk) The latter > would certainly increase complexity but allow for more flexibility in > terms of configuration, migration and performance tuning. I like the > idea of configuring a resource to be brought up initially in StandAlone, > waiting to be paired with another node/SR for initial synchronization, > failover, migration, etc.. I believe the ganeti project uses DRBD in > this way currently. > > There are certainly lots of different ways to insert DRBD into the mix. > I'm also interested to know what others think. > > -- > : Adam Gandelman > : LINBIT | Your Way to High Availability > : > : http://www.linbit.com > > -- Sergio Roberto Charpinel Jr. --0016361e829e6e9c76048897841e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Adam,

Actually, IMHO, DRBD works like a SR (Storage Repo= sitory) which each resource is attached to a VDI (LVM LV, hard drive partit= ion, and any other block device) and manage them. That's what I have in= mind.
But of course, I'd like to get yours suggestions first.
=
Thank you for your reply.=A0

Cheers= .

2010/6/8 Adam Gandelm= an <adam.= gandelman@linbit.com>
Sergio Ch= arpinel Jr. wrote:
> Hi,
>
> I'm student from GSoC project and I'm working in DRBD and XCP<= br> > integration. I'd like to keep the community updated about the proj= ect,
> and to get some feedback from you.
>
> I was discussing with Dave some possibilites to handle DRBD config
> while creating the SR. One possibility was to use device-config to
> handle the configuration. But DRBD configuration is not so simple
> because we have resources, and inside resources we have nodes in
> configuration file. So, we have key pairs values for common section, > resources section and for each node.
> And it should be easy to add new resources to DRBD. So I think it is a=
> good idea to implement a separate plugin to manage DRBD resources
> (add, remove, edit, etc.) in a existing DRBDSR. But I'm still don&= #39;t
> know at what point I can integrate this plugin with the existing SMAPI= .
>
> It would be nice to have suggestions from you.
>
> Cheers.

Hi-

I've given this lots of thought in the past but have not had time to familiarize myself with the API. =A0I'm curious to know at which level = you
plan on integrating the DRBD functionality. =A0For example, one large DRBD<= br> resource that ends up configured as entire SR or DRBD resources
configured as a sort of extension to already existing SRs (ie, resource
configured on top of an already existing LV virtual disk) =A0 =A0The latter=
would certainly increase complexity but allow for more flexibility in
terms of configuration, migration and performance tuning. =A0I like the
idea of configuring a resource to be brought up initially in StandAlone, waiting to be paired with another node/SR for initial synchronization,
failover, migration, etc.. =A0I believe the ganeti project uses DRBD in
this way currently.

There are certainly lots of different ways to insert DRBD into the mix.
I'm also interested to know what others think.

--
: Adam Gandelman
: LINBIT | Your Way to High Availability
:
: http://www.linbit.com=




--
Sergio Roberto C= harpinel Jr.
--0016361e829e6e9c76048897841e-- --===============0670058227== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0670058227==-- From xen-api-bounces@lists.xensource.com Wed Jun 09 05:01:54 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 09 Jun 2010 05:01:55 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJyj-0005R9-3s; Wed, 09 Jun 2010 05:01:53 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OMJwY-00055C-GH for xen-api@lists.xensource.com; Wed, 09 Jun 2010 04:59:39 -0700 X-ASG-Debug-ID: 1276084776-7a2000020000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mxs.selfmail.ru (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 072F02964A1 for ; Wed, 9 Jun 2010 04:59:37 -0700 (PDT) Received: from mxs.selfmail.ru (mxs.selfmail.ru [77.221.143.26]) by spam.xensource.com with ESMTP id XbvOGc96YqtA7U8v (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 09 Jun 2010 04:59:37 -0700 (PDT) X-Barracuda-Envelope-From: v.tolstov@selfip.ru DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=selfip.ru; s=dk; h=Content-Transfer-Encoding:Mime-Version:Message-ID:Date:Content-Type:References:In-Reply-To:Cc:To:Reply-To:From:Subject; bh=3QGQrj+cr4hZL0uThCZRPKU+jo9Rps5wgsEYy9XO6+Q=; b=VDuhNv4EO9aBAWsvIZoC9yfE88E/VnJEe9Wzf4+6zvz84PjLqSmtT6da4QXqTwUa/rAr9hcUGdOX9TidkNkrQszzquvYRpmgU/tfDUJHL5ez0oDZ1nUQ3m5QLlByU08m; X-ACL-SPF: Received: from [UNAVAILABLE] ([217.170.84.182]:57626 helo=[192.168.1.101]) by mxs.selfmail.ru with esmtpa (Exim 4.72) (envelope-from ) id 1OMJwU-0002Ta-7N; Wed, 09 Jun 2010 15:59:34 +0400 X-ASG-Orig-Subj: Re: [Xen-API] newbie question about xenapi (get la and free memory) Subject: Re: [Xen-API] newbie question about xenapi (get la and free memory) From: Vasiliy G Tolstov To: Jonathan Ludlam In-Reply-To: References: <1276066715.2399.7.camel@work.selfip.ru> <1276081977.2399.12.camel@work.selfip.ru> Content-Type: text/plain; charset="UTF-8" Organization: Selfip.Ru Date: Wed, 09 Jun 2010 15:59:21 +0400 Message-ID: <1276084761.2399.13.camel@work.selfip.ru> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-Barracuda-Connect: mxs.selfmail.ru[77.221.143.26] X-Barracuda-Start-Time: 1276084778 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32048 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words Content-Transfer-Encoding: quoted-printable Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: v.tolstov@selfip.ru List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com =D0=92 =D0=A1=D1=80=D0=B4, 09/06/2010 =D0=B2 12:22 +0100, Jonathan Ludlam= =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > It's not XMLRPC, it's a normal http handler. Just issue a 'GET' request= to the URIs mention in the wiki page. >=20 > I'm afraid I don't know PHP, so I can't help with the code! >=20 > Jon >=20 I'm use xen-3 when i'm try to GET needed page - i'm recive 404 error (not found for host_rrd and vm_rrd..) I'm use sles 11. Do i need some specific software installed to get it work? --=20 Vasiliy G Tolstov Selfip.Ru _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 09 22:54:21 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 09 Jun 2010 22:54:21 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OMaia-0004lj-MN; Wed, 09 Jun 2010 22:54:20 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OMaiP-0004jG-4i for xen-api@lists.xensource.com; Wed, 09 Jun 2010 22:54:09 -0700 X-ASG-Debug-ID: 1276149246-109d00200000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from n1a.bullet.mail.cnh.yahoo.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with SMTP id 0C572293060 for ; Wed, 9 Jun 2010 22:54:07 -0700 (PDT) Received: from n1a.bullet.mail.cnh.yahoo.com (n1a.bullet.mail.cnh.yahoo.com [203.209.250.182]) by spam.xensource.com with SMTP id 9aUYdT32QY8gETof for ; Wed, 09 Jun 2010 22:54:07 -0700 (PDT) X-Barracuda-Envelope-From: barrelfish1@yahoo.cn Received: from [203.209.250.223] by n1.bullet.mail.cnh.yahoo.com with NNFMP; 10 Jun 2010 05:54:06 -0000 Received: from [203.209.250.216] by t2.bullet.mail.cnh.yahoo.com with NNFMP; 10 Jun 2010 05:54:06 -0000 Received: from [127.0.0.1] by omp101.mail.cnh.yahoo.com with NNFMP; 10 Jun 2010 05:54:06 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 188109.38238.bm@omp101.mail.cnh.yahoo.com Received: (qmail 94915 invoked by uid 60001); 10 Jun 2010 05:54:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.cn; s=s1024; t=1276149246; bh=MNtjPg6tA2K+pkfHjbNjhzjFMr7lUzb5+dlITms3pvc=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=DA/gvaMsGDP6diLtqbVKUQLmIFGd2c347F9T6StMsaVVMZiIl5bQi9orXHp1dBHxL1iuRfNlFqvpPrK2mR8oDwGThGhfmeFuruJD3zlE2Io7E3UAjBXfkUSWznGSkLwLNFtHq1sY2th3EX3C9QFJ2LYhegs3ai5RzDn7fFCmXsU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.cn; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=nwTyicLr1z20uCDhvcLC1+GQvTEd6kzvf0f52Dlzoz2LgddLIYXzn9rFjH36ipbBZtfRaEanX9WypDqlqXZy1OpzpLH6iDC4sHFX1uTZH5EPnXTrZpSMrUB/i3W6qQOCFzYaXBYCmVaoJcWniVftAvahkIRfhlDS9N7t5nl3Y5k=; Message-ID: <52025.94715.qm@web92108.mail.cnh.yahoo.com> X-YMail-OSG: oo89vqAVM1ldFR.H1_gYbm.QXRFmP.I03W3pNZOA7cW9.kl QLO.gVTILROgSQgScSVVVWA.XMcDE6AB_izZ6e_4awV8YWtJm_.TFBtnNwVW epspkn7fuCh06u2lYu5yueS.K3UtuCil5Z_7e1eFvYsEJ0NJclPEdkHbC8OO tR5G5n.cyHzcYFwhEC7jQFp1UUazpd30AN4SwTCNKpvYfWbu107Q5SYCbnOt lrOe23IMzm6YWEGY- Received: from [10.114.50.5] by web92108.mail.cnh.yahoo.com via HTTP; Thu, 10 Jun 2010 13:54:05 CST X-Mailer: YahooMailClassic/11.1.3 YahooMailWebService/0.8.103.269680 Date: Thu, 10 Jun 2010 13:54:05 +0800 (CST) From: =?gb2312?B?wdm35yAg?= X-ASG-Orig-Subj: a question of xenstore watch To: xen-api@lists.xensource.com MIME-Version: 1.0 X-Barracuda-Connect: n1a.bullet.mail.cnh.yahoo.com[203.209.250.182] X-Barracuda-Start-Time: 1276149248 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32115 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Subject: [Xen-API] a question of xenstore watch X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1967329985==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1967329985== Content-Type: multipart/alternative; boundary="0-929175938-1276149245=:94715" --0-929175938-1276149245=:94715 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable Hi,I want to watch a xenstore =0Anode,when the value of the node is changed= I will be noticed. So I =0Ause the xswatch function. I use the python template of the =0Ahttp://wiki.xensource.com/xenwiki/XenSt= oreReference. However, it is =0Aweird that when the xenstore node changed, the call back = function is =0Anever called. Thanks!=0A=0A=0A --0-929175938-1276149245=:94715 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: quoted-printable
Hi,I want to watch a xenstore =0Anode,when th= e value of the node is changed I will be noticed.
So I =0Ause the xswatc= h function.
I use the python template of the =0Ahttp://wiki.xensource.co= m/xenwiki/XenStoreReference.
However, it is =0Aweird that when the xenst= ore node changed, the call back function is =0Anever called.
Thanks!

=0A=0A=0A=0A=0A=0A=0A   --0-929175938-1276149245=:94715-- --===============1967329985== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1967329985==-- From xen-api-bounces@lists.xensource.com Fri Jun 11 05:29:28 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 11 Jun 2010 05:29:28 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ON3MV-0005JM-MW; Fri, 11 Jun 2010 05:29:28 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ON3ML-0005Gv-3c for xen-api@lists.xensource.com; Fri, 11 Jun 2010 05:29:17 -0700 X-ASG-Debug-ID: 1276259354-527a005d0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 7A8F2297B38 for ; Fri, 11 Jun 2010 05:29:15 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id WN7SWFuBrNcVy4b0 (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 11 Jun 2010 05:29:15 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,403,1272844800"; d="scan'208";a="361259" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 11 Jun 2010 12:29:14 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 11 Jun 2010 13:29:14 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1ON3MI-0001D8-6l for xen-api@lists.xensource.com; Fri, 11 Jun 2010 13:29:14 +0100 Content-Type: multipart/mixed; boundary="===============8952863542393604134==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Update version number in API doc (PDF) From: Rob Hoes To: xen-api Message-ID: Date: Fri, 11 Jun 2010 13:29:14 +0100 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276259356 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32235 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Update version number in API doc (PDF) X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============8952863542393604134== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User Rob Hoes Update version number in API doc (PDF) Signed-off-by: Rob Hoes diff -r 3b7254656596 ocaml/idl/xenenterpriseapi-coversheet.tex --- a/ocaml/idl/xenenterpriseapi-coversheet.tex +++ b/ocaml/idl/xenenterpriseapi-coversheet.tex @@ -1,5 +1,5 @@ % -% Copyright (c) 2006-2008 Citrix Systems, Inc. +% Copyright (c) 2006-2010 Citrix Systems, Inc. % % All rights reserved. % @@ -12,14 +12,14 @@ \newcommand{\coversheetlogo}{citrix_logo_black.eps} %% Document date -\newcommand{\datestring}{1st September 2008} +\newcommand{\datestring}{21st May 2010} \newcommand{\releasestatement}{} %% Document revision -\newcommand{\revstring}{API Revision 1.3} +\newcommand{\revstring}{API Revision 1.7} %% Document authors \newcommand{\docauthors}{ } -\newcommand{\legalnotice}{Copyright \copyright{} 2006-2008 Citrix Systems, Inc. All Rights Reserved.} +\newcommand{\legalnotice}{Copyright \copyright{} 2006-2010 Citrix Systems, Inc. All Rights Reserved.} --===============8952863542393604134== Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="api-doc-version" IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFJvYiBIb2VzIDxyb2IuaG9lc0BjaXRyaXguY29t PgpVcGRhdGUgdmVyc2lvbiBudW1iZXIgaW4gQVBJIGRvYyAoUERGKQoKU2lnbmVkLW9mZi1ieTog Um9iIEhvZXMgPHJvYi5ob2VzQGNpdHJpeC5jb20+CgpkaWZmIC1yIDNiNzI1NDY1NjU5NiBvY2Ft bC9pZGwveGVuZW50ZXJwcmlzZWFwaS1jb3ZlcnNoZWV0LnRleAotLS0gYS9vY2FtbC9pZGwveGVu ZW50ZXJwcmlzZWFwaS1jb3ZlcnNoZWV0LnRleAorKysgYi9vY2FtbC9pZGwveGVuZW50ZXJwcmlz ZWFwaS1jb3ZlcnNoZWV0LnRleApAQCAtMSw1ICsxLDUgQEAKICUKLSUgQ29weXJpZ2h0IChjKSAy MDA2LTIwMDggQ2l0cml4IFN5c3RlbXMsIEluYy4KKyUgQ29weXJpZ2h0IChjKSAyMDA2LTIwMTAg Q2l0cml4IFN5c3RlbXMsIEluYy4KICUKICUgQWxsIHJpZ2h0cyByZXNlcnZlZC4KICUKQEAgLTEy LDE0ICsxMiwxNCBAQAogXG5ld2NvbW1hbmR7XGNvdmVyc2hlZXRsb2dvfXtjaXRyaXhfbG9nb19i bGFjay5lcHN9CiAKICUlIERvY3VtZW50IGRhdGUKLVxuZXdjb21tYW5ke1xkYXRlc3RyaW5nfXsx c3QgU2VwdGVtYmVyIDIwMDh9CitcbmV3Y29tbWFuZHtcZGF0ZXN0cmluZ317MjFzdCBNYXkgMjAx MH0KIAogXG5ld2NvbW1hbmR7XHJlbGVhc2VzdGF0ZW1lbnR9e30KIAogJSUgRG9jdW1lbnQgcmV2 aXNpb24KLVxuZXdjb21tYW5ke1xyZXZzdHJpbmd9e0FQSSBSZXZpc2lvbiAxLjN9CitcbmV3Y29t bWFuZHtccmV2c3RyaW5nfXtBUEkgUmV2aXNpb24gMS43fQogCiAlJSBEb2N1bWVudCBhdXRob3Jz CiBcbmV3Y29tbWFuZHtcZG9jYXV0aG9yc317CiB9Ci1cbmV3Y29tbWFuZHtcbGVnYWxub3RpY2V9 e0NvcHlyaWdodCBcY29weXJpZ2h0e30gMjAwNi0yMDA4IENpdHJpeCBTeXN0ZW1zLCBJbmMuIEFs bCBSaWdodHMgUmVzZXJ2ZWQufQorXG5ld2NvbW1hbmR7XGxlZ2Fsbm90aWNlfXtDb3B5cmlnaHQg XGNvcHlyaWdodHt9IDIwMDYtMjAxMCBDaXRyaXggU3lzdGVtcywgSW5jLiBBbGwgUmlnaHRzIFJl c2VydmVkLn0K --===============8952863542393604134== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============8952863542393604134==-- From xen-api-bounces@lists.xensource.com Fri Jun 11 05:29:48 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 11 Jun 2010 05:29:48 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ON3Mq-0005PY-Ae; Fri, 11 Jun 2010 05:29:48 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ON3Mf-0005MR-SJ for xen-api@lists.xensource.com; Fri, 11 Jun 2010 05:29:37 -0700 X-ASG-Debug-ID: 1276259375-529a00670000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 547C3297B5C for ; Fri, 11 Jun 2010 05:29:36 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id jo5UbUel2oE1hncO (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 11 Jun 2010 05:29:36 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,403,1272844800"; d="scan'208";a="361274" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 11 Jun 2010 12:29:35 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 11 Jun 2010 13:29:35 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1ON3Md-0001DB-65 for xen-api@lists.xensource.com; Fri, 11 Jun 2010 13:29:35 +0100 Content-Type: multipart/mixed; boundary="===============3577438388806510455==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] 'make doc' should also build PDF of API docs From: Rob Hoes To: xen-api Message-ID: Date: Fri, 11 Jun 2010 13:29:35 +0100 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276259377 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32235 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] 'make doc' should also build PDF of API docs X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============3577438388806510455== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User Rob Hoes 'make doc' should also build PDF of API docs Signed-off-by: Rob Hoes diff -r e489858e0824 ocaml/idl/OMakefile --- a/ocaml/idl/OMakefile +++ b/ocaml/idl/OMakefile @@ -139,6 +139,9 @@ lynx -dump sdk-README.html > $(SDK)/README.txt cp sdk-index.html $(SDK)/index.html +.PHONY: doc +doc: sdk-install + META: META.in sed 's/@VERSION@/$(PRODUCT_VERSION)/g' < $< > $@ --===============3577438388806510455== Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="make-pdf-doc" IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFJvYiBIb2VzIDxyb2IuaG9lc0BjaXRyaXguY29t PgonbWFrZSBkb2MnIHNob3VsZCBhbHNvIGJ1aWxkIFBERiBvZiBBUEkgZG9jcwoKU2lnbmVkLW9m Zi1ieTogUm9iIEhvZXMgPHJvYi5ob2VzQGNpdHJpeC5jb20+CgpkaWZmIC1yIGU0ODk4NThlMDgy NCBvY2FtbC9pZGwvT01ha2VmaWxlCi0tLSBhL29jYW1sL2lkbC9PTWFrZWZpbGUKKysrIGIvb2Nh bWwvaWRsL09NYWtlZmlsZQpAQCAtMTM5LDYgKzEzOSw5IEBACiAJbHlueCAtZHVtcCBzZGstUkVB RE1FLmh0bWwgPiAkKFNESykvUkVBRE1FLnR4dAogCWNwIHNkay1pbmRleC5odG1sICQoU0RLKS9p bmRleC5odG1sCiAKKy5QSE9OWTogZG9jCitkb2M6IHNkay1pbnN0YWxsCisKIAogTUVUQTogTUVU QS5pbgogCXNlZCAncy9AVkVSU0lPTkAvJChQUk9EVUNUX1ZFUlNJT04pL2cnIDwgJDwgPiAkQAo= --===============3577438388806510455== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============3577438388806510455==-- From xen-api-bounces@lists.xensource.com Fri Jun 11 13:27:52 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 11 Jun 2010 13:27:52 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ONApU-0008I7-9r; Fri, 11 Jun 2010 13:27:52 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ONApI-0008G3-JO for xen-api@lists.xensource.com; Fri, 11 Jun 2010 13:27:40 -0700 X-ASG-Debug-ID: 1276288056-1f8800050000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id B9897298016; Fri, 11 Jun 2010 13:27:37 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id t8DRS1MggIjBC38x (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Fri, 11 Jun 2010 13:27:37 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,404,1272844800"; d="scan'208";a="369380" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 11 Jun 2010 20:27:36 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX01.citrite.net ([10.30.224.162]) with mapi; Fri, 11 Jun 2010 21:27:36 +0100 From: Dave Scott To: "'xen-api@lists.xensource.com'" , "'xen-devel@lists.xensource.com'" , "'xen-users@lists.xensource.com'" Date: Fri, 11 Jun 2010 21:27:36 +0100 X-ASG-Orig-Subj: [XCP]: RC1 of XCP 0.5 available for testing Thread-Topic: [XCP]: RC1 of XCP 0.5 available for testing Thread-Index: AcsJpIcrHkfzvFFiQgSIbGTkzIZqEA== Message-ID: <81A73678E76EA642801C8F2E4823AD21807FFE696B@LONPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276288058 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32267 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: Subject: [Xen-API] [XCP]: RC1 of XCP 0.5 available for testing X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi everyone, The first release candidate of the Xen Cloud Platform (XCP) version 0.5 is= =20 now available for testing from: http://www.xen.org/products/cloud_source_0.5.html XCP-0.5 is intended to be a *stable* release, suitable for long-term produc= tion use. Please download this release candidate and give it a thorough workout! Cheers, Dave _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Fri Jun 11 13:35:08 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 11 Jun 2010 13:35:08 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ONAwV-00018h-FT; Fri, 11 Jun 2010 13:35:07 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ON3c9-0006lX-Qo for xen-api@lists.xensource.com; Fri, 11 Jun 2010 05:45:37 -0700 X-ASG-Debug-ID: 1276260335-527a00870000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 42149297A73 for ; Fri, 11 Jun 2010 05:45:36 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id lE9GE1u0YJWtpEiM (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 11 Jun 2010 05:45:36 -0700 (PDT) X-Barracuda-Envelope-From: rok.strnisa@citrix.com X-IronPort-AV: E=Sophos;i="4.53,403,1272844800"; d="scan'208";a="361682" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 11 Jun 2010 12:45:35 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 11 Jun 2010 13:45:35 +0100 Received: from dhcp-3-235.uk.xensource.com ([10.80.3.235] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1ON3c6-0001OI-SE for xen-api@lists.xensource.com; Fri, 11 Jun 2010 13:45:34 +0100 Content-Type: multipart/mixed; boundary="===============1173540829==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Fixed typo: tag -> tags. Improved indentation. Added documentation X-Mercurial-Node: aeba63846ef847beead153777e0ccd6c3fd6fc6a Message-ID: User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 11 Jun 2010 13:45:30 +0100 From: Rok Strnisa To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276260337 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32237 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Mailman-Approved-At: Fri, 11 Jun 2010 13:34:54 -0700 Subject: [Xen-API] [PATCH] Fixed typo: tag -> tags. Improved indentation. Added documentation X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1173540829== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit signed-off-by: Rok Strnisa mlvm/lv.ml | 35 ++++++++++++++++++----------------- 1 files changed, 18 insertions(+), 17 deletions(-) --===============1173540829== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User Rok Strnisa # Date 1276260248 -3600 # Node ID aeba63846ef847beead153777e0ccd6c3fd6fc6a # Parent a885e486b46a6cd55257bfa00887f38f88f092db Fixed typo: tag -> tags. Improved indentation. Added documentation. signed-off-by: Rok Strnisa diff --git a/mlvm/lv.ml b/mlvm/lv.ml --- a/mlvm/lv.ml +++ b/mlvm/lv.ml @@ -102,24 +102,25 @@ let segment_of_metadata name config = st_stripes=stripes} } +(** Builds a logical_volume structure out of a name and metadata. *) let of_metadata name config = - let id = expect_mapped_string "id" config in - let status = map_expected_mapped_array "status" - (fun a -> status_of_string (expect_string "status" a)) config in - let segments = filter_structs config in - let segments = List.map - (fun (a,_) -> - segment_of_metadata a (expect_mapped_struct a segments)) segments in - let tags = - if List.mem_assoc "tags" config - then map_expected_mapped_array "tags" (expect_string "tag") config - else [] - in - { name=name; - id=id; - status=status; - tags=tags; - segments=sort_segments segments } + let id = expect_mapped_string "id" config in + let status = map_expected_mapped_array "status" + (fun a -> status_of_string (expect_string "status" a)) config in + let tags = + List.map Tag.of_string + (if List.mem_assoc "tags" config + then map_expected_mapped_array "tags" (expect_string "tags") config + else []) in + let segments = filter_structs config in + let segments = List.map + (fun (a,_) -> + segment_of_metadata a (expect_mapped_struct a segments)) segments in + { name = name; + id = id; + status = status; + tags = tags; + segments = sort_segments segments } let allocation_of_segment s = match s.s_cls with --===============1173540829== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1173540829==-- From xen-api-bounces@lists.xensource.com Fri Jun 11 13:35:28 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 11 Jun 2010 13:35:28 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ONAwq-0001Ej-1o; Fri, 11 Jun 2010 13:35:28 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ON4X5-0003i0-R0 for xen-api@lists.xensource.com; Fri, 11 Jun 2010 06:44:28 -0700 X-ASG-Debug-ID: 1276263864-11e3004e0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 468AF297A77 for ; Fri, 11 Jun 2010 06:44:25 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id mfgkNo7hV0gWQtmR (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 11 Jun 2010 06:44:25 -0700 (PDT) X-Barracuda-Envelope-From: rok.strnisa@citrix.com X-IronPort-AV: E=Sophos;i="4.53,403,1272844800"; d="scan'208";a="363206" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 11 Jun 2010 13:44:23 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 11 Jun 2010 14:44:19 +0100 Received: from dhcp-3-235.uk.xensource.com ([10.80.3.235] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1ON4Wv-0001zL-TF for xen-api@lists.xensource.com; Fri, 11 Jun 2010 14:44:17 +0100 Content-Type: multipart/mixed; boundary="===============2035086975==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Added support for LV tags X-Mercurial-Node: 573cc0df65394981c61f66ec79488c263f68d1f0 Message-ID: <573cc0df65394981c61f.1276263837@rok-desktop> User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 11 Jun 2010 14:43:57 +0100 From: Rok Strnisa To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276263866 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32241 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Mailman-Approved-At: Fri, 11 Jun 2010 13:34:54 -0700 Subject: [Xen-API] [PATCH] Added support for LV tags X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============2035086975== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit This includes: - Tag.t type, which encapsulates tag strings; - use of Tag.t consistently throughout the repository; - a simplified mlvm/Makefile; - a simple unit test for checking Tag.is_valid. signed-off-by: Rok Strnisa mlvm/Makefile | 120 +++++++++++++++++++++------------------------ mlvm/lv.ml | 5 +- mlvm/redo.ml | 48 +++++++++--------- mlvm/tag.ml | 14 +++++ mlvm/tag.mli | 13 ++++ mlvm/tag_is_valid_test.ml | 13 ++++ mlvm/test_fragment.ml | 2 +- mlvm/vg.ml | 120 ++++++++++++++++++++++----------------------- 8 files changed, 183 insertions(+), 152 deletions(-) --===============2035086975== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User Rok Strnisa # Date 1276262857 -3600 # Node ID 573cc0df65394981c61f66ec79488c263f68d1f0 # Parent aeba63846ef847beead153777e0ccd6c3fd6fc6a Added support for LV tags. This includes: - Tag.t type, which encapsulates tag strings; - use of Tag.t consistently throughout the repository; - a simplified mlvm/Makefile; - a simple unit test for checking Tag.is_valid. signed-off-by: Rok Strnisa diff --git a/mlvm/Makefile b/mlvm/Makefile --- a/mlvm/Makefile +++ b/mlvm/Makefile @@ -1,75 +1,62 @@ - -CC = gcc -CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml -LDFLAGS = -cclib -L./ -VERSION = 0.1 - -PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma - -DESTDIR ?= / VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) -OCAMLABI := $(shell ocamlc -version) -OCAMLLIBDIR := $(shell ocamlc -where) -OCAMLDESTDIR ?= $(OCAMLLIBDIR) +OCAMLC = ocamlfind ocamlc -g +OCAMLOPT = ocamlfind ocamlopt +OCAMLYACC = ocamlyacc +OCAMLLEX = ocamllex +PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma +COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I ../rpc-light -for-pack Lvm -pp '${PP}' -LIBOBJS = constants lvm_uuid crc utils absty lvmconfigparser lvmconfiglex lvmmarshal allocator debug redo lv pv vg -INTF = $(foreach obj, $(LIBOBJS),$(obj).cmi) -CMDOBJS = messages.cmx mlvm.cmx -OCAMLC = ocamlfind ocamlc -g -OCAMLOPT = ocamlfind ocamlopt -COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -for-pack Lvm -pp '${PP}' -I ../rpc-light +LIBOBJS = constants lvm_uuid crc utils absty lvmconfigparser lvmconfiglex lvmmarshal allocator debug tag redo lv pv vg +LIBCMXS = $(foreach obj, $(LIBOBJS),$(obj).cmx) +LIBCMOS = $(foreach obj, $(LIBOBJS),$(obj).cmo) +LIBCMIS = $(foreach obj, $(LIBOBJS),$(obj).cmi) + +DESTDIR ?= +DOCDIR = /myrepos/xen-api-libs.hg/doc LIBS = lvm.cma lvm.cmxa -DOCDIR = /myrepos/xen-api-libs.hg/doc +default: $(LIBS) -default : $(LIBS) +lvm.cmx: $(LIBCMXS) + $(OCAMLOPT) -pack -g -o $@ $^ -test_allocator: default - $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I +kaputt unix.cmxa ../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa test_allocator.ml -o $@ - -lvm.cmx: $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmx) - -lvm.cmo: $(foreach obj,$(LIBOBJS),$(obj).cmo) - $(OCAMLC) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmo) +lvm.cmo: $(LIBCMOS) + $(OCAMLC) -pack -g -o $@ $^ lvm.cmxa: lvm.cmx - $(OCAMLOPT) -a -g -o $@ lvm.cmx + $(OCAMLOPT) -a -g -o $@ $^ lvm.cma: lvm.cmo - $(OCAMLC) -a -g -o $@ lvm.cmo + $(OCAMLC) -a -g -o $@ $^ + +lvmconfigparser.ml: lvmconfigparser.mly + $(OCAMLYACC) $< + $(OCAMLOPT) $(COMPFLAG) -c lvmconfigparser.mli + +lvmconfiglex.ml: lvmconfiglex.mll lvmconfigparser.mli + $(OCAMLLEX) $< META: META.in sed 's/@VERSION@/$(VERSION)/g' < $< > $@ -.PHONY: install +.PHONY: install uninstall doc clean install: $(LIBS) META ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore lvm META lvm.cmi lvm.cmxa lvm.cma lvm.a -.PHONY: uninstall uninstall: ocamlfind remove lvm -clean : - rm -f *.cmo *.cmi *.cmx *.o *~ *.annot lvmconfiglex.ml \ - lvmconfigparser.mli lvmconfigparser.ml - rm -f test_allocator test_fragment +doc: $(LIBCMIS) + python ../doc/doc.py $(DOCDIR) "mlvm" "package" "$(LIBOBJS)" "." "stdext,camldm,uuid,unix" "" -.PHONY: doc -doc: $(INTF) - python ../doc/doc.py $(DOCDIR) "mlvm" "package" "$(LIBOBJS)" "." "stdext,camldm,uuid,unix" "" - -lvmconfigparser.ml : lvmconfigparser.mly - ocamlyacc lvmconfigparser.mly - $(OCAMLOPT) $(COMPFLAG) -c lvmconfigparser.mli - -lvmconfiglex.ml : lvmconfiglex.mll lvmconfigparser.mli - ocamllex lvmconfiglex.mll +clean: + rm -f *.cm{o,i,x} *.{annot,o} *~ + rm -f lvmconfiglex.ml lvmconfigparser.ml{,i} + rm -f test_allocator test_fragment tag_is_valid_test .SUFFIXES: .ml .mli .cmo .cmi .cmx - .ml.cmo: $(OCAMLC) $(COMPFLAG) -c $< @@ -79,21 +66,28 @@ lvmconfiglex.ml : lvmconfiglex.mll lvmco .ml.cmx: $(OCAMLOPT) $(COMPFLAG) -c $< -.c.o: - $(OCAMLC) $(COMPFLAG) -c $< +lvmcmd.cmo: messages.cmo +lvmcmd.cmx: messages.cmx +lv.cmo: absty.cmo +lv.cmx: absty.cmx +mlvm.cmo: vg.cmo pv.cmo messages.cmo lv.cmo +mlvm.cmx: vg.cmx pv.cmx messages.cmx lv.cmx +pv.cmo: utils.cmo lvmmarshal.cmo lvm_uuid.cmo crc.cmo constants.cmo allocator.cmo absty.cmo +pv.cmx: utils.cmx lvmmarshal.cmx lvm_uuid.cmx crc.cmx constants.cmx allocator.cmx absty.cmx +vg.cmo: debug.cmo pv.cmo lvm_uuid.cmo lv.cmo allocator.cmo absty.cmo +vg.cmx: debug.cmx pv.cmx lvm_uuid.cmx lv.cmx allocator.cmx absty.cmx +redo.cmo: tag.cmi debug.cmo allocator.cmo +redo.cmx: tag.cmx debug.cmx allocator.cmx +tag.cmo: debug.cmo tag.cmi +tag.cmx: debug.cmx tag.cmi -lvmcmd.cmo: messages.cmo -lvmcmd.cmx: messages.cmx -lv.cmo: absty.cmo -lv.cmx: absty.cmx -mlvm.cmo: vg.cmo pv.cmo messages.cmo lv.cmo -mlvm.cmx: vg.cmx pv.cmx messages.cmx lv.cmx -pv.cmo: utils.cmo lvmmarshal.cmo lvm_uuid.cmo crc.cmo constants.cmo \ - allocator.cmo absty.cmo -pv.cmx: utils.cmx lvmmarshal.cmx lvm_uuid.cmx crc.cmx constants.cmx \ - allocator.cmx absty.cmx -vg.cmo: debug.cmo pv.cmo lvm_uuid.cmo lv.cmo allocator.cmo absty.cmo -vg.cmx: debug.cmx pv.cmx lvm_uuid.cmx lv.cmx allocator.cmx absty.cmx +test_allocator: default + $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I +kaputt $(INCLUDES) ./lvm.cmxa test_allocator.ml -o $@ -test_fragment: default $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid unix.cmxa ../rpc-light/rpc.cmx -I ../rpc-light ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa $(foreach obj,$(LIBOBJS),$(obj).cmx) test_fragment.ml -o $@ \ No newline at end of file +INCLUDES = unix.cmxa str.cmxa ../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa + +test_fragment: lvm.cmxa $(LIBCMXS) test_fragment.ml + $(OCAMLOPT) $(COMPFLAG) $(INCLUDES) $^ -o $@ + +tag_is_valid_test: $(LIBCMXS) tag.cmx tag_is_valid_test.ml + $(OCAMLOPT) $(COMPFLAG) $(INCLUDES) $^ -o $@ diff --git a/mlvm/lv.ml b/mlvm/lv.ml --- a/mlvm/lv.ml +++ b/mlvm/lv.ml @@ -1,4 +1,5 @@ open Absty +open Fun open Listext type stat = @@ -28,7 +29,7 @@ and segment = and logical_volume = { name : string; id : string; - tags : string list; + tags : Tag.t list; status : stat list; segments : segment list; } with rpc @@ -54,7 +55,7 @@ let write_to_buffer b lv = bprintf b "\n%s {\nid = \"%s\"\nstatus = [%s]\n" lv.name lv.id (String.concat ", " (List.map (o quote status_to_string) lv.status)); if List.length lv.tags > 0 then - bprintf b "tags = [%s]\n" (String.concat ", " (List.map quote lv.tags)); + bprintf b "tags = [%s]\n" (String.concat ", " (List.map (quote ++ Tag.string_of) lv.tags)); bprintf b "segment_count = %d\n\n" (List.length lv.segments); Listext.List.iteri (fun i s -> diff --git a/mlvm/redo.ml b/mlvm/redo.ml --- a/mlvm/redo.ml +++ b/mlvm/redo.ml @@ -1,3 +1,4 @@ +open Debug type lvcreate_t = { lvc_id : string; @@ -15,21 +16,21 @@ and lvreduce_t = { and lvexpand_t = { lvex_segments : Allocator.t; } - + +(** First string corresponds to the name of the LV. *) and operation = - | LvCreate of string * lvcreate_t - | LvReduce of string * lvreduce_t - | LvExpand of string * lvexpand_t - | LvRename of string * lvrename_t - | LvRemove of string + | LvCreate of string * lvcreate_t + | LvReduce of string * lvreduce_t + | LvExpand of string * lvexpand_t + | LvRename of string * lvrename_t + | LvRemove of string + | LvAddTag of string * Tag.t and sequenced_op = { so_seqno : int; so_op : operation } with rpc -open Debug - (** Marshal to and from a string *) let redo_to_string (l : sequenced_op) = let s = Marshal.to_string l [] in @@ -98,20 +99,19 @@ let read fd offset size = let reset fd offset = write_initial_pos fd offset (Int64.add offset 12L) - + +(** Converts the redo operation to a human-readable string. *) let redo_to_human_readable op = - let lvcreate_t_to_string l = - Printf.sprintf "{id:'%s', segments:[%s]}" l.lvc_id (Allocator.to_string l.lvc_segments) - in - let lvexpand_t_to_string l = - Printf.sprintf "[%s]" (Allocator.to_string l.lvex_segments) - in - let opstr = - match op.so_op with - | LvCreate (name,lvc) -> Printf.sprintf "LvCreate(%s,%s)" name (lvcreate_t_to_string lvc) - | LvRemove name -> Printf.sprintf "LvRemove(%s)" name - | LvReduce (name,lvrd) -> Printf.sprintf "LvReduce(%s,%Ld)" name lvrd.lvrd_new_extent_count - | LvExpand (name,lvex) -> Printf.sprintf "LvExpand(%s,%s)" name (lvexpand_t_to_string lvex) - | LvRename (name,lvmv) -> Printf.sprintf "LvRename(%s,%s)" name lvmv.lvmv_new_name - in - Printf.sprintf "{seqno=%d; op=%s}" op.so_seqno opstr + let lvcreate_t_to_string l = + Printf.sprintf "{id:'%s', segments:[%s]}" l.lvc_id (Allocator.to_string l.lvc_segments) in + let lvexpand_t_to_string l = + Printf.sprintf "[%s]" (Allocator.to_string l.lvex_segments) in + let opstr = + match op.so_op with + | LvCreate (name,lvc) -> Printf.sprintf "LvCreate(%s,%s)" name (lvcreate_t_to_string lvc) + | LvRemove name -> Printf.sprintf "LvRemove(%s)" name + | LvReduce (name,lvrd) -> Printf.sprintf "LvReduce(%s,%Ld)" name lvrd.lvrd_new_extent_count + | LvExpand (name,lvex) -> Printf.sprintf "LvExpand(%s,%s)" name (lvexpand_t_to_string lvex) + | LvRename (name,lvmv) -> Printf.sprintf "LvRename(%s,%s)" name lvmv.lvmv_new_name + | LvAddTag (name,tag) -> Printf.sprintf "LvAddTag(%s,%s)" name (Tag.string_of tag) in + Printf.sprintf "{seqno=%d; op=%s}" op.so_seqno opstr diff --git a/mlvm/tag.ml b/mlvm/tag.ml new file mode 100644 --- /dev/null +++ b/mlvm/tag.ml @@ -0,0 +1,14 @@ +open Str + +type t = string with rpc + +let tag_regexp = regexp "^[A-Za-z0-9_+.][A-Za-z0-9_+.-]*$" + +let is_valid s = + (String.length s <= 128) && (string_match tag_regexp s 0) + +let of_string s = + if is_valid s then s else failwith "Tag string does not conform to the rules." + +let string_of t = + t diff --git a/mlvm/tag.mli b/mlvm/tag.mli new file mode 100644 --- /dev/null +++ b/mlvm/tag.mli @@ -0,0 +1,13 @@ +type t + +val rpc_of_t : t -> Rpc.t +val t_of_rpc : Rpc.t -> t +(** Checks whether a string is a valid tag string. + Tag character set: A-Za-z0-9_+.- + Can't start with hyphen. Max length is 128. + Empty tags are currently not allowed. *) +val is_valid : string -> bool +(** Creates a tag from a string. Fails on non-conforming strings. *) +val of_string : string -> t +(** Converts a tag to a string. *) +val string_of : t -> string diff --git a/mlvm/tag_is_valid_test.ml b/mlvm/tag_is_valid_test.ml new file mode 100644 --- /dev/null +++ b/mlvm/tag_is_valid_test.ml @@ -0,0 +1,13 @@ +open Tag + +let test_tag_string (should_be_valid, s) = + let is_valid = is_valid s in + let is_valid_string = if is_valid then " VALID" else "INVALID" in + let result = if is_valid = should_be_valid then " CORRECT" else "INCORRECT" in + print_endline (result ^ " --- " ^ is_valid_string ^ " --- '" ^ s ^ "'") + +let test_strings = + [false, ""; true, "abc"; false, "----abc"; true, "abc-----"; false, "abc###"; + true, String.make 128 'y'; false, String.make 129 'n'; true, "_0m_3+3-3.X"] + +let _ = List.map test_tag_string test_strings diff --git a/mlvm/test_fragment.ml b/mlvm/test_fragment.ml --- a/mlvm/test_fragment.ml +++ b/mlvm/test_fragment.ml @@ -1,4 +1,4 @@ -Put them into a library? *) +(* Put them into a library? *) let pvs = "/usr/sbin/pvs" let pvcreate = "/usr/sbin/pvcreate" diff --git a/mlvm/vg.ml b/mlvm/vg.ml --- a/mlvm/vg.ml +++ b/mlvm/vg.ml @@ -74,65 +74,62 @@ let to_string vg = (*************************************************************) let do_op vg op = - (if vg.seqno <> op.so_seqno then failwith "Failing to do VG operation out-of-order"); - Unixext.write_string_to_file (Printf.sprintf "/tmp/redo_op.%d" op.so_seqno) (Redo.redo_to_human_readable op); - let rec createsegs ss lstart = - match ss with - | a::ss -> - let length = Allocator.get_size a in - let pv_name = Allocator.get_name a in - ({Lv.s_start_extent=lstart; s_extent_count=length; - s_cls=Lv.Linear {Lv.l_pv_name=pv_name; - l_pv_start_extent=Allocator.get_start a}})::createsegs ss (Int64.add lstart length) - | _ -> [] - in - let change_lv lv_name fn = - let lv,others = List.partition (fun lv -> lv.Lv.name=lv_name) vg.lvs in - match lv with - | [lv] -> - fn lv others - | _ -> failwith "Unknown LV" - in - let vg = {vg with seqno = vg.seqno + 1; ops=op::vg.ops} in - match op.so_op with - | LvCreate (name,l) -> - let new_free_space = Allocator.alloc_specified_areas vg.free_space l.lvc_segments in - let segments = Lv.sort_segments (createsegs l.lvc_segments 0L) in - let lv = { Lv.name=name; - id=l.lvc_id; - tags=[]; - status=[Lv.Read; Lv.Visible]; - segments=segments } + (if vg.seqno <> op.so_seqno then failwith "Failing to do VG operation out-of-order"); + Unixext.write_string_to_file (Printf.sprintf "/tmp/redo_op.%d" op.so_seqno) (Redo.redo_to_human_readable op); + let rec createsegs ss lstart = + match ss with + | a::ss -> + let length = Allocator.get_size a in + let pv_name = Allocator.get_name a in + ({Lv.s_start_extent = lstart; s_extent_count = length; + s_cls = Lv.Linear {Lv.l_pv_name = pv_name; + l_pv_start_extent=Allocator.get_start a}})::createsegs ss (Int64.add lstart length) + | _ -> [] in - { vg with - lvs = lv::vg.lvs; - free_space=new_free_space } - | LvExpand (name,l) -> - change_lv name (fun lv others -> - let old_size = Lv.size_in_extents lv in - let free_space = Allocator.alloc_specified_areas vg.free_space l.lvex_segments in - let segments = createsegs l.lvex_segments old_size in - let lv = { lv with Lv.segments = Lv.sort_segments (segments @ lv.Lv.segments) } in - { vg with - lvs = lv::others; free_space=free_space}) - | LvReduce (name,l) -> - change_lv name (fun lv others -> - let allocation = Lv.allocation_of_lv lv in - let lv = Lv.reduce_size_to lv l.lvrd_new_extent_count in - let new_allocation = Lv.allocation_of_lv lv in - let free_space = Allocator.alloc_specified_areas (Allocator.free vg.free_space allocation) new_allocation in - {vg with - lvs = lv::others; free_space=free_space}) - | LvRemove name -> - change_lv name (fun lv others -> - let allocation = Lv.allocation_of_lv lv in - { vg with - lvs = others; - free_space = Allocator.free vg.free_space allocation }) - | LvRename (name,l) -> - change_lv name (fun lv others -> - { vg with - lvs = {lv with Lv.name=l.lvmv_new_name}::others }) + let change_lv lv_name fn = + let lv,others = List.partition (fun lv -> lv.Lv.name=lv_name) vg.lvs in + match lv with + | [lv] -> + fn lv others + | _ -> failwith "Unknown LV" + in + let vg = {vg with seqno = vg.seqno + 1; ops=op::vg.ops} in + match op.so_op with + | LvCreate (name,l) -> + let new_free_space = Allocator.alloc_specified_areas vg.free_space l.lvc_segments in + let segments = Lv.sort_segments (createsegs l.lvc_segments 0L) in + let lv = + { Lv.name = name; id = l.lvc_id; tags = []; + status = [Lv.Read; Lv.Visible]; segments = segments } in + {vg with lvs = lv::vg.lvs; free_space = new_free_space} + | LvExpand (name,l) -> + change_lv name (fun lv others -> + let old_size = Lv.size_in_extents lv in + let free_space = Allocator.alloc_specified_areas vg.free_space l.lvex_segments in + let segments = createsegs l.lvex_segments old_size in + let lv = {lv with Lv.segments = Lv.sort_segments (segments @ lv.Lv.segments)} in + {vg with lvs = lv::others; free_space=free_space}) + | LvReduce (name,l) -> + change_lv name (fun lv others -> + let allocation = Lv.allocation_of_lv lv in + let lv = Lv.reduce_size_to lv l.lvrd_new_extent_count in + let new_allocation = Lv.allocation_of_lv lv in + let free_space = Allocator.alloc_specified_areas (Allocator.free vg.free_space allocation) new_allocation in + {vg with + lvs = lv::others; free_space=free_space}) + | LvRemove name -> + change_lv name (fun lv others -> + let allocation = Lv.allocation_of_lv lv in + {vg with lvs = others; free_space = Allocator.free vg.free_space allocation }) + | LvRename (name,l) -> + change_lv name (fun lv others -> + {vg with lvs = {lv with Lv.name=l.lvmv_new_name}::others }) + | LvAddTag (name, tag) -> + change_lv name (fun lv others -> + let tags = lv.Lv.tags in + let lv' = {lv with Lv.tags = if List.mem tag tags then tags else tag::tags} in + {vg with lvs = lv'::others}) + let create_lv vg name size = let id = Lvm_uuid.create () in @@ -159,12 +156,11 @@ let resize_lv vg name new_size = let remove_lv vg name = do_op vg {so_seqno=vg.seqno; so_op=LvRemove name} +let add_tag_lv vg name tag = + do_op vg {so_seqno = vg.seqno; so_op = LvAddTag (name, tag)} + (******************************************************************************) - - - - let human_readable vg = let pv_strings = List.map Pv.human_readable vg.pvs in String.concat "\n" pv_strings --===============2035086975== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============2035086975==-- From xen-api-bounces@lists.xensource.com Sat Jun 12 14:13:35 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Sat, 12 Jun 2010 14:13:35 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ONY1F-0006jb-FL; Sat, 12 Jun 2010 14:13:33 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ONY12-0006hj-GS for xen-api@lists.xensource.com; Sat, 12 Jun 2010 14:13:20 -0700 X-ASG-Debug-ID: 1276377196-025300230000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from mail-vw0-f43.google.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 9135C298396; Sat, 12 Jun 2010 14:13:16 -0700 (PDT) Received: from mail-vw0-f43.google.com (mail-vw0-f43.google.com [209.85.212.43]) by spam.xensource.com with ESMTP id gz7ayZYjxEMtlLxZ; Sat, 12 Jun 2010 14:13:16 -0700 (PDT) X-Barracuda-Envelope-From: msinhore@gmail.com Received: by vws2 with SMTP id 2so50736vws.30 for ; Sat, 12 Jun 2010 14:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=DHMlG8kBO/vCliVZU5K1byO1G9MyQh5unxAYi8B1eY8=; b=D/13ELjmzJenZF/pXPXYG6Vel5X5FMxRzOKmp/AoXGqsHdSBC+Khu7MVXVrB740tJO HlYh+EZh0tH9n3NsX2tb9yyAUQOo0tMKX9SB2mEUrqRVSGSvCKQI42wnDoD6/nnlMovd sU2TQZ7VM/hUY6Sn1U3eb/1QDBvaZNV/KFP5U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=dMIyhStu4adD+Jmqt/M7punttZY+o+NGu21g0kp+pa9B2TVgBQK30qdO39sCk5U57i 4laNFRFmXTyFnXcAnAhrcoW9hhg6lEZsnSPPEXql4oHLQ8lXew6iBlw/X9fHPumK+v+G JU41n8TYLzbxLrx/pC9s9SA+hTiKDsEe41QNE= MIME-Version: 1.0 Received: by 10.220.121.204 with SMTP id i12mr1162583vcr.22.1276377195765; Sat, 12 Jun 2010 14:13:15 -0700 (PDT) Received: by 10.220.170.146 with HTTP; Sat, 12 Jun 2010 14:13:15 -0700 (PDT) In-Reply-To: <81A73678E76EA642801C8F2E4823AD21807FFE696B@LONPMAILBOX01.citrite.net> References: <81A73678E76EA642801C8F2E4823AD21807FFE696B@LONPMAILBOX01.citrite.net> Date: Sat, 12 Jun 2010 18:13:15 -0300 Message-ID: X-ASG-Orig-Subj: Re: [Xen-API] [XCP]: RC1 of XCP 0.5 available for testing Subject: Re: [Xen-API] [XCP]: RC1 of XCP 0.5 available for testing From: Marco Sinhoreli To: Dave Scott Content-Type: text/plain; charset=UTF-8 X-Barracuda-Connect: mail-vw0-f43.google.com[209.85.212.43] X-Barracuda-Start-Time: 1276377198 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32360 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: "xen-devel@lists.xensource.com" , "xen-users@lists.xensource.com" , "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi Dave, What are the features and the bugfixes in this new release? Cheers! On Fri, Jun 11, 2010 at 5:27 PM, Dave Scott wrote: > Hi everyone, > > The first release candidate of the Xen Cloud Platform (XCP) version 0.5 is > now available for testing from: > > http://www.xen.org/products/cloud_source_0.5.html > > XCP-0.5 is intended to be a *stable* release, suitable for long-term production use. > Please download this release candidate and give it a thorough workout! > > Cheers, > Dave > > _______________________________________________ > xen-api mailing list > xen-api@lists.xensource.com > http://lists.xensource.com/mailman/listinfo/xen-api > -- Marco Sinhoreli _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-users-bounces@lists.xensource.com Sun Jun 13 12:59:41 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Sun, 13 Jun 2010 12:59:41 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ONtLI-0004D9-SM; Sun, 13 Jun 2010 12:59:40 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ONtJI-0003rG-Ju for xen-users@lists.xensource.com; Sun, 13 Jun 2010 12:57:37 -0700 X-ASG-Debug-ID: 1276459052-49ce00100000-xM1yvO X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 9DD30298946; Sun, 13 Jun 2010 12:57:33 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id VLGPCdDC3Xz3HeVK (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Sun, 13 Jun 2010 12:57:33 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,411,1272844800"; d="scan'208";a="382472" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 13 Jun 2010 19:57:32 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Sun, 13 Jun 2010 20:57:31 +0100 From: Dave Scott To: 'Marco Sinhoreli' Date: Sun, 13 Jun 2010 20:57:32 +0100 X-ASG-Orig-Subj: RE: [Xen-API] [XCP]: RC1 of XCP 0.5 available for testing Thread-Topic: [Xen-API] [XCP]: RC1 of XCP 0.5 available for testing Thread-Index: AcsKdBT+ZAV/IHfsRCi6nroev41Q7gAvZjmw Message-ID: <81A73678E76EA642801C8F2E4823AD21807FFE696E@LONPMAILBOX01.citrite.net> References: <81A73678E76EA642801C8F2E4823AD21807FFE696B@LONPMAILBOX01.citrite.net> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276459054 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32448 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: "xen-devel@lists.xensource.com" , "xen-users@lists.xensource.com" , "xen-api@lists.xensource.com" Subject: [Xen-users] RE: [Xen-API] [XCP]: RC1 of XCP 0.5 available for testing X-BeenThere: xen-users@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Xen user discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1567607378==" Sender: xen-users-bounces@lists.xensource.com Errors-To: xen-users-bounces@lists.xensource.com --===============1567607378== Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgTWFyY28sDQoNClhDUCAwLjUgaXMgcHJpbWFyaWx5IGludGVuZGVkIHRvIGJlIGEgYnVnZml4 IHJlbGVhc2UuIEhvd2V2ZXIgaXQgZG9lcyBoYXZlIDIgbmV3IGZlYXR1cmVzOg0KDQoxLiBDUFUg ZmVhdHVyZSBtYXNraW5nICh2aWEgSW50ZWwgRmxleE1pZ3JhdGlvbiBhbmQgQU1ELVYgRXh0ZW5k ZWQgTWlncmF0aW9uKQ0KICAgLS0gdGhpcyBhbGxvd3MgeW91IHRvIChlZykgImRvd24tbGV2ZWwi IGEgbmV3IHNlcnZlciB0byBtYWtlIGl0IGxvb2sgdGhlIHNhbWUgYXMgYW4gb2xkIHNlcnZlci4g VGhlIG1hY2hpbmVzIGNhbiB0aGVuIGJlIGpvaW5lZCB0byB0aGUgc2FtZSBwb29sIGFuZCB5b3Ug Y2FuIGJlIHN1cmUgdGhhdCBsaXZlIG1pZ3JhdGlvbnMgd2lsbCB3b3JrIGZpbmUuDQoNCjIuIHRo ZSBhYmlsaXR5IHRvIGNyZWF0ZSBhbmQgdXBsb2FkIElTTyBpbWFnZXMgKHByb3ZpZGVkIHRoZSB1 bmRlcmx5aW5nIFNSIGlzIGl0c2VsZiB3cml0YWJsZSkNCg0KSGVyZSdzIGEgc2hvcnQgc3VtbWFy eSBvZiB0aGUgYnVnZml4ZXMsIHBlciBhcmVhLCBzaW5jZSAwLjEuMToNCg0KVG9vbHN0YWNrOg0K DQpmaXggYSByYWNlIGluIHRoZSBIb3N0X3BhdGNoIHJlY29yZCB1cGRhdGUgbG9naWMNClJldmVy dCBjL3MgNTk0OjQxNTAxYmI4M2IxOCAoc2Vzc2lvbiBjYWNoaW5nIHN0dWZmKQ0KRml4IFhlbkFQ SSBwZXJmb3JtYW5jZSBkZWdyYWRhdGlvbiBjYXVzZWQgYnkgUkJBQw0KU3VwcG9ydCBmb3IgbGlr ZXdpc2UgNS4zIGVycm9yIGNvZGVzDQpBZGQgZmlyc3QtY2xhc3MgZmllbGQgZm9yIG9wZW52c3dp dGNoIGRpc3RyaWJ1dGVkIGNvbnRyb2xsZXINCkZpeCBQSUZfbWV0cmljcyBnbGl0Y2ggd2hlbiB4 YXBpIGlzIHJlc3RhcnRlZA0KRml4IGJhbGxvb25pbmcgYnVnIHdoZXJlIGEgZG9tYWluJ3MgbWF4 bWVtIGdldHMgb3V0IG9mIHN5bmMgaW4gdGhlIG5vIGJhbGxvb25pbmcgcmVxdWlyZWQgY2FzZSAo aWUgZHluYW1pY19taW4gPSBkeW5hbWljX21heCkNCkZpeCB0ZXJyaWJsZSBlcnJvciBtZXNzYWdl IHdoZW4gYSAncmhsaWtlJyBndWVzdCAoZWcgQ2VudE9TKSBjYW5ub3QgYmUgaW5zdGFsbGVkIGJl Y2F1c2Ugb2YgYSBtaXNzaW5nIGZpbGUNClJlYWQtb25seSBSQkFDIHJvbGVzIGNhbiBjYWxsIHBv b2wuaGFfY29tcHV0ZV9oeXBvdGhldGljYWxfbWF4X2ZhaWx1cmVzX3RvX3RvbGVyYXRlDQp2c3dp dGNoOiB0aGUgTUFYIGFkZHJlc3Mgb2YgdGhlIHRhZ2dlZCBQSUYgZm9yIFZMQU4gZmFrZS1icmlk Z2UNCmFueSBQQU0gdXNlciBzaG91bGQgYmUgYWJsZSB0byBsb2ctaW4gd2hlbiBleHRlcm5hbCBh dXRoIGlzIGRpc2FibGVkDQpyb2J1c3RpZnkgVkJEIHVucGF1c2UgaW4gdGhlIGNhc2Ugd2hlbiB0 aGUgZGV2aWNlIGRpc2FwcGVhcnMNCk1ha2Ugc3VyZSB3ZSBjYW4ndCBWQkQucGx1ZyB3aGlsZSBs dmhkX3N0b3BfdXNpbmdfdGhlc2VfdmRpcyBpcyBpbiBwcm9ncmVzcw0KTWFrZSBpdCBwb3NzaWJs ZSB0byB1c2UgbmV3IG1lbW9yeSBBUElzIG9uIHRlbXBsYXRlcyBhcyB3ZWxsIGFzIFZNcw0KQWx3 YXlzIGFsbG93IGRvbTAgdG8gYmUgYmFsbG9vbmVkIGV2ZW4gaWYgb3RoZXIgZG9tVXMgY2Fubm90 IGJlIGJhbGxvb25lZA0KUmVzeW5jIEhvc3RfY3B1IHRhYmxlcyB3aXRoIHBoeXNpY2FsIGgvdyBv biByZXN0YXJ0DQpGaXggbWVtb3J5IGdsaXRjaCB3aGVuIGEgZG9tYWluIGlzIHBhdXNlZCAoZWcg d2hpbGUgYmVpbmcgcmVzdW1lZCkNCkZpeCBhIGRlYWRsb2NrIGluIHRoZSBSUkQgY29kZQ0KRml4 IGEgZ2xpdGNoIHdoZXJlIHhhcGkgd291bGQgc2V0IFBWLWRyaXZlcnMtdXAtdG8tZGF0ZSB0byBm YWxzZSBvbiByZXN0YXJ0DQpFeHRlbmQgVk0uY2xvbmUgYW5kIFZNLmNvcHkgdG8gd29yayBvbiBz bmFwc2hvdHMgYW5kIGNoZWNrcG9pbnRzDQpBZGQgIlhlbiBBUEkgU0RLIiB0ZW1wbGF0ZTogdXNp bmcgdGhpcyB0byBpbnN0YWxsIGZyb20gdGhlIG1haW4gQ0Qgc2hvdWxkIHJlc3VsdCBpbiBhIHNp bXVsYXRvcg0KV29yayBhcm91bmQgYnJva2VuIHZlbmRvciBrZXJuZWxzIGJ5IGZvcmNpbmcgYWxs IFBWIGd1ZXN0cyB0byB1c2Ugc2xvdyByZXN1bWUgZHVyaW5nIGNoZWNrcG9pbnQgb3BlcmF0aW9u cw0KRml4IHBlcmlvZGljIGJhY2t1cCBvZiBSUkQgZGF0YTogYnJva2VuIGJ5IGZvcmsvZXhlYyBk YWVtb24NCkZpeCBvY2Nhc2lvbmFsIEhUVFAgcmVxdWVzdCBmYWlsdXJlIGNhdXNlZCBieSBmYWls aW5nIHRvIHJlYWQgYWxsIHJlcXVlc3QgaGVhZGVycyBmcm9tIGFuIEhUVFAgUFVUDQpJbXByb3Zl IHRoZSBSUkQgYmVoYXZpb3VyIHdoZW4gdGhlIHN5c3RlbSBjbG9jayBtb3ZlcyBiYWNrd2FyZHMN CldoZW4gaW1wb3J0aW5nIFZNIG1ldGFkYXRhLCBpZiB0aGUgVk0gd2FzIFJ1bm5pbmcgdGhlbiB0 aGUgbmV3IHN0YXRlIHNob3VsZCBiZSBIYWx0ZWQgKG5vdCBSdW5uaW5nKQ0KdnN3aXRjaDogZml4 IGJyaW5naW5nIHVwIFZMQU4gUElGcw0KV2hlbiBkZWNpZGluZyB3aGljaCBob3N0IHRvIGZvcndh cmQgYSBWREkuY29weSB0byAoZWcgd2hlbiBpbnN0YWxsaW5nIGEgVk0gdG8gYSBkaWZmZXJlbnQg U1IpLCB0YWtlIGludG8gYWNjb3VudCBob3N0IGxpdmVuZXNzDQpTUklPVjogb24gcmVib290LCBh bHdheXMgaG90cGx1ZyBQQ0kgZGV2aWNlcyBpbnRvIGd1ZXN0cyBpbiB0aGUgb3JkZXIgc3BlY2lm aWVkIGluIHRoZSAob3JpZ2luYWwpIG90aGVyLWNvbmZpZyBrZXkNCkZpeCBidWcgd2hlcmUgJ3hl IHBpZi1zY2FuJyBjb3VsZCBwaWNrIHVwIG5vbi1waHlzaWNhbCBpbnRlcmZhY2VzIHN1Y2ggYXMg dmlmIGJhY2tlbmRzICghKQ0KQXZvaWQgbGVha2luZyBhIGRvbWFpbiBpbiB0aGUgY2FzZSB3aGVy ZSBhIHN0b3JhZ2UgYmFja2VuZCBmYWlscyBkdXJpbmcgcmVzdW1lDQpBbGxvdyBWQ1BVIHNldHRp bmdzIHRvIGJlIGNoYW5nZWQgb24gYSB0ZW1wbGF0ZQ0KQWxsb3cgdGhlIENMSSB0byBjaGFuZ2Ug YSBIb3N0J3MgbmFtZS1kZXNjcmlwdGlvbg0KV29yayBhcm91bmQgZmlyZXdhbGxzIHdoaWNoIGtp bGwgaWRsZSBUQ1AgY29ubmVjdGlvbnMgYnkgaW5zZXJ0aW5nIGVtcHR5IGJsb2NrcyBldmVyeSA1 cyBvciBzbw0KRml4IHNlZ2ZhdWx0IGluIGZvcmsvZXhlYyBkYWVtb24NCkFjY2VwdCBJU084NjAx IGRhdGVzIHdpdGhvdXQgYSB0aW1lem9uZSwgYXNzdW1lIFVUQyAoWE1MUlBDIHNwZWMgcHJvYmxl bXMpDQoNCkRvbTAga2VybmVsOg0KDQpGaXggZGVhZGxvY2sgaW4gc29mdHdhcmUgcmFpZCBieSBp bXBvcnRpbmcgdXBzdHJlYW0gZml4ZXMuDQpFbmFibGUgQ09ORklHX05FVF9TQ0hfSU5HUkVTUw0K ZW5zdXJlIGdyYXR1aXRvdXMgZnJhbWVzIHNlbnQgb24gYm9uZCBsaW5rIGZhaWx1cmUgYXJlIHRy dWx5IGJlbmlnbg0KQWxsb3cgbGFyZ2UgTVRVIHRvIGJlIGNvbmZpZ3VyZWQgb24gbmV0YmFjayB2 aWYgZGV2aWNlIGZyb20gaG90cGx1ZyBzY3JpcHQuDQpwY2liYWNrOiBmaXhlcyBmb3IgU1ItSU9W IHBhc3N0aHJvdWdoIHRvIFBWIGd1ZXN0cy4NCkZpeCBpU0NTSSBsYXN0X3JlY3YgdGltZXN0YW1w IGhpamFja2luZyBpbiBpc2NzaV94bWl0Lg0KUHJldmVudCBpU0NTSSB0cmFuc3BvcnQgdGltZW91 dCBjaGVja3MgZnJvbSBzcGlubmluZy4NClJlZnJlc2ggSW50ZWwgTklDIGRyaXZlcnMgZnJvbSBo dHRwOi8vZTEwMDAuc2YubmV0DQpEbyBub3QgcmVzdHJpY3QgbmV0YmFjayB0byB0aGUgZmlyc3Qg Mmsgb2YgZWFjaCBSWCBidWZmZXIuDQpCYWNrcG9ydCB4ZW5idXNfd2F0Y2hfcGF0aGZtdCB3aGlj aCBpcyB1c2VkIGluIHBsYWNlIG9mIHhlbmJ1c193YXRjaF9wYXRoMiBpbiBwdm9wcyBrZXJuZWxz Lg0KY29tcGlsZSBwY2liYWNrIGluIHRoZSBrZXJuZWwgKG5vdCBhcyBhIG1vZHVsZSkNCg0KeGVu ICgzLjQuMik6DQoNCkVQVC9Qb0QgbG9ja2luZyBmaXggDQpCYWNrcG9ydCB1cHN0cmVhbSBwYXRj aCB0byBzdXBwb3J0IHN5c2xpbnV4IGNvbmZpZ3VyYXRpb24gZmlsZXMgaW4gcHlncnViLg0KYWRk IEFFUyB0byB0aGUgSFZNIENQVUlEIHdoaXRlbGlzdC4NCkltcG9ydCB1cHN0cmVhbSBwYXRjaCB0 byBpbXByb3ZlIHB5Z3J1YiBjb21wYXRpYmlsaXR5IHdpdGggZ3J1YjIuDQpVcGdyYWRlIGdQWEUg dG8gMS4wLjANCmRvbid0IGNvbXBsYWluIHRvbyBsb3VkbHkgYWJvdXQgbWl4ZWQtQ1BVIG1pZ3Jh dGlvbnMuDQpuZXcgYnlwZXJjYWxsIHRvIGdldCB0aGUgdW5tYXNrZWQgQ1BVSUQgZmVhdHVyZSBi aXRzDQpNYXNrIENQVUlEIG1hc2tzIHdpdGggdW5tYXNrZWQgQ1BVSUQgcmVzcG9uc2VzLg0KZHJv cCBDUkMgYnl0ZXMgZnJvbSBSWCBmcmFtZXMgaW4gdGhlIGdQWEUgcnRsODEzOSBkcml2ZXIuDQpo dm06IGNvcnJlY3QgdGltZSBvZmZzZXQgdXBkYXRlIGluIFJUQyB3cml0ZSBlbXVsYXRpb24NCklt cG9ydCB4ZW50cmFjZSBwYXRjaGVzIGZyb20gdW5zdGFibGUsIHJldHJ5DQpweWdydWI6IEZpeCBn cnViMiBzdXBwb3J0IHdoZW4gY29uZmlnIGlzIG9uIGEgc2VwYXJhdGUgL2Jvb3QgcGFydGl0DQpB ZGRlZCBwYXRjaCB0byBmaXggbmV0d29yayBib290aW5nIGZyb20gQm9vdGl4IHNlcnZlcmlvbg0K cXVpZXRlbiBwZXItY3B1IGxvZ2dpbmcgYW5kIGluY3JlYXNlIGRtZXNnIGJ1ZmZlciBzaXplLg0K aW1wb3J0IEludGVsIGNoYW5nZXMgdG8gRmxleE1pZ3JhdGlvbg0KdHJhY2UgcG9zc2libGUgaW5j b3JyZWN0IHVzZSBvZiBTUElOX0xPQ0tfVU5MT0NLRUQNCldpdGggT09TIGVuYWJsZWQsIGNoZWNr IGwxIGFuZCByZXdhbGsgaWYgaXQncyBjaGFuZ2VkIGp1c3QgYmVmb3JlIHByb3BhZ2F0aW9uLg0K aW1wcm92ZSBzdXBwb3J0IGZvciBncnViMiBhbmQgcmVpc2VyZnMvZXh0NA0KQ0EtNDA3ODI6IFNv cnQgb3V0IGludGVyYWN0aW9ucyBiZXR3ZWVuIFBvRCBhbmQgbG9nLWRpcnR5IG9uIEVQVC4NCnB5 Z3J1YjogRml4IEdydWIyIHN1cHBvcnQgZm9yIFVidW50dSAxMC4wNA0KDQpzdG9yYWdlIHBsdWdp bnMNCg0KRml4IFNBUyBkeW5hbWljIGRldmljZSByZW1vdmFsL2FkZGl0aW9uIGJlaGF2aW91cg0K Rml4IHJhY2UgaW4gd2FpdGluZyBmb3IgTFVOcyB0byBhcHBlYXIuIA0KaWYgd2UgZmFpbCB0byBy ZW1vdmUgYSBkZXZtYXBwZXIgbm9kZSwgbGVhdmUgdGhlIExWIHN5bWxpbmsNCnJldHJ5IG9uIGZh aWx1cmVzIGR1cmluZyAiZG1zZXR1cCByZW1vdmUiIChzaW5jZSBtb3N0IG9mIHRob3NlIGFyZSB0 cmFuc2llbnQpDQpSdW4gTkZTIHNsYXZlIGNhbGxvdXQgYmVmb3JlIHVubGlua2luZyBwYXJlbnQg VkhELg0KQWN0aXZhdGUgdGhlIGRtLW11bHRpcGF0aCBub2RlIGJlZm9yZSBjYWxsaW5nIHZkaV9h dHRhY2gNCmVuYWJsZSBzaW5nbGUgc25hcHNob3RzICgxIGxlYWYgaW5zdGVhZCBvZiAyKSwgd2hp Y2ggd291bGQgaGF2ZSBiZWVuIG5lZWRlZCBmb3Igb25saW5lIGxlYWYtY29hbGVzY2UNCk1ha2Ug VkRJLmludHJvZHVjZSBvbiBMVU4tcGVyLVZESSBiYWNrZW5kcyBzZXQgbWFuYWdlZD10cnVlIG9u IHRoZSAgVkRJLg0KQWRkIE11bHRpLUlRTiB3aWxkY2FyZCBzdXBwb3J0IHRvIHRoZSBpU0NTSSB0 YXJnZXQgZGlzY292ZXJ5IGZ1bmN0aW9uYWxpdHkuDQpmaXggYSBqb3VybmFsIGZpbGUgcmFjZQ0K dXNlIHRoZSBCQVQgaW5mb3JtYXRpb24gdG8gbWluaW1pemUgdGhlIHNwYWNlIHJlcXVpcmVtZW50 cyBvZiBjb2FsZXNjZQ0KZml4IHRoZSBzcGFjZSByZXF1aXJlbWVudCBjYWxjdWxhdGlvbiBpbiB2 ZGlfc25hcHNob3QNCm1ha2UgdmhkLXV0aWwgbG9nIGVycm9ycyB0byBzeXNsb2cgKGV4Y2VwdCBm b3IgdmhkLXV0aWwgc2NhbikuDQpsb2cgc29tZSBkaWFnbm9zdGljIGluZm8gd2hlbiBMViBmYWls cyB0byBnZXQgYWN0aXZhdGVkDQpmaXggdGhlIGNsb25lIHJvbGxiYWNrIGNhbGwgcGFyYW1zDQpF bnN1cmUgdGhhdCByb290IGRldiBkb2VzIG5vdCBnZXQgcmUtcHJvYmVkIHdoZW4gcmVmcmVzaGlu ZyB0aGUgU0NTSSBob3N0IGJ1cy4NClJlcG9ydCB0aGUgY29ycmVjdCBudW1iZXIgb2YgaVNDU0kg c2Vzc2lvbnMgd2hlbiB0aGUgTXVsdGlJUU4gd2lsZGNhcmQgaXMgYmVpbmcgdXNlZC4NCmRvbid0 IHRydXN0IExWTSB3aGVuIGl0IHNheXMgYSBMViBkb2Vzbid0IGV4aXN0OiBzdGlsbCBjaGVjayBp ZiB0aGUgZGV2bWFwcGVyIG5vZGUgYW5kL29yIHN5bWxpbmsgZG8gZXhpc3QgYW5kIGRlbGV0ZSB0 aGVtIG1hbnVhbGx5DQpSZXN0b3JlIHNldF9zY2hlZHVsZXIgZGV2aWNlIG5hbWUgZm9yIG11bHRp cGF0aGVkIG5vZGVzLg0KVk0gdGVtcGxhdGUgc2hvdWxkIG9ubHkgYmUgY3JlYXRlZCB3aGVuIHNu YXBzaG90dGluZyB2aWEgdm0tc25hcHNob3Qtd2l0aC1xdWllc2NlLg0KemVybyBvdXQgdGhlIGZv b3RlciBhcmVhIG9mIHRoZSBMViB3aGVuIHJvbGxpbmcgYmFjayBpbmZsYXRlcw0KDQpDaGVlcnMs DQpEYXZlDQoNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBNYXJjbyBT aW5ob3JlbGkgW21haWx0bzptc2luaG9yZUBnbWFpbC5jb21dDQo+IFNlbnQ6IDEyIEp1bmUgMjAx MCAyMjoxMw0KPiBUbzogRGF2ZSBTY290dA0KPiBDYzogeGVuLWFwaUBsaXN0cy54ZW5zb3VyY2Uu Y29tOyB4ZW4tZGV2ZWxAbGlzdHMueGVuc291cmNlLmNvbTsgeGVuLQ0KPiB1c2Vyc0BsaXN0cy54 ZW5zb3VyY2UuY29tDQo+IFN1YmplY3Q6IFJlOiBbWGVuLUFQSV0gW1hDUF06IFJDMSBvZiBYQ1Ag MC41IGF2YWlsYWJsZSBmb3IgdGVzdGluZw0KPiANCj4gSGkgRGF2ZSwNCj4gDQo+IFdoYXQgYXJl IHRoZSBmZWF0dXJlcyBhbmQgdGhlIGJ1Z2ZpeGVzIGluIHRoaXMgbmV3IHJlbGVhc2U/DQo+IA0K PiBDaGVlcnMhDQo+IA0KPiBPbiBGcmksIEp1biAxMSwgMjAxMCBhdCA1OjI3IFBNLCBEYXZlIFNj b3R0IDxEYXZlLlNjb3R0QGV1LmNpdHJpeC5jb20+DQo+IHdyb3RlOg0KPiA+IEhpIGV2ZXJ5b25l LA0KPiA+DQo+ID4gVGhlIGZpcnN0IHJlbGVhc2UgY2FuZGlkYXRlIG9mIHRoZSBYZW4gQ2xvdWQg UGxhdGZvcm0gKFhDUCkgdmVyc2lvbg0KPiAwLjUgaXMNCj4gPiBub3cgYXZhaWxhYmxlIGZvciB0 ZXN0aW5nIGZyb206DQo+ID4NCj4gPiBodHRwOi8vd3d3Lnhlbi5vcmcvcHJvZHVjdHMvY2xvdWRf c291cmNlXzAuNS5odG1sDQo+ID4NCj4gPiBYQ1AtMC41IGlzIGludGVuZGVkIHRvIGJlIGEgKnN0 YWJsZSogcmVsZWFzZSwgc3VpdGFibGUgZm9yIGxvbmctdGVybQ0KPiBwcm9kdWN0aW9uIHVzZS4N Cj4gPiBQbGVhc2UgZG93bmxvYWQgdGhpcyByZWxlYXNlIGNhbmRpZGF0ZSBhbmQgZ2l2ZSBpdCBh IHRob3JvdWdoIHdvcmtvdXQhDQo+ID4NCj4gPiBDaGVlcnMsDQo+ID4gRGF2ZQ0KPiA+DQo+ID4g X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCj4gPiB4ZW4t YXBpIG1haWxpbmcgbGlzdA0KPiA+IHhlbi1hcGlAbGlzdHMueGVuc291cmNlLmNvbQ0KPiA+IGh0 dHA6Ly9saXN0cy54ZW5zb3VyY2UuY29tL21haWxtYW4vbGlzdGluZm8veGVuLWFwaQ0KPiA+DQo+ IA0KPiANCj4gDQo+IC0tDQo+IE1hcmNvIFNpbmhvcmVsaQ0K --===============1567607378== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users --===============1567607378==-- From xen-api-bounces@lists.xensource.com Mon Jun 14 03:24:58 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 14 Jun 2010 03:24:58 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OO6qg-0007ms-GY; Mon, 14 Jun 2010 03:24:58 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OO6pO-0007Lm-2D for xen-api@lists.xensource.com; Mon, 14 Jun 2010 03:23:38 -0700 X-ASG-Debug-ID: 1276511014-4f0800160000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 0F8382982A8 for ; Mon, 14 Jun 2010 03:23:35 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id G9DJEXn7N7Hktjun (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 14 Jun 2010 03:23:35 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,413,1272844800"; d="scan'208";a="390814" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 14 Jun 2010 10:23:34 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Mon, 14 Jun 2010 11:23:34 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OO6pK-0003Ow-2Q for xen-api@lists.xensource.com; Mon, 14 Jun 2010 11:23:34 +0100 Content-Type: multipart/mixed; boundary="===============7640177942487659796==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Require lifecycle specification for APIs From: Rob Hoes To: xen-api Message-ID: Date: Mon, 14 Jun 2010 11:23:34 +0100 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276511017 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32506 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Require lifecycle specification for APIs X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============7640177942487659796== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User Rob Hoes Require lifecycle specification for APIs Another step in the transition to better lifecycle information in the API. Each API in the datamodel.ml should have an explicit lifecycle description attached to it (which may be [] for prototypes). Specifying 'in_product_since' is still allowed for backwards compatibility, but should no longer be used! Signed-off-by: Rob Hoes diff -r 2fac409dc86f ocaml/idl/datamodel.ml --- a/ocaml/idl/datamodel.ml +++ b/ocaml/idl/datamodel.ml @@ -185,7 +185,19 @@ ; internal_deprecated_since=None } -let call ~name ?(doc="") ?(in_oss_since=Some "3.0.3") ~in_product_since ?internal_deprecated_since +let get_published lifecycle = + try + let _, published, _ = List.find (fun (t, _, _) -> t = Published) lifecycle in + Some published + with Not_found -> None + +let get_deprecated lifecycle = + try + let _, deprecated, _ = List.find (fun (t, _, _) -> t = Deprecated) lifecycle in + Some deprecated + with Not_found -> None + +let call ~name ?(doc="") ?(in_oss_since=Some "3.0.3") ?in_product_since ?internal_deprecated_since ?result ?(flags=[`Session;`Async]) ?(effect=true) ?(tag=Custom) ?(errs=[]) ?(custom_marshaller=false) ?(db_only=false) ?(no_current_operations=false) ?(secret=false) ?(hide_from_docs=false) @@ -196,20 +208,30 @@ (* if you specify versioned_params then these get put in the params field of the message record; * otherwise params go in with no default values and param_release=call_release... *) - let call_release = {internal=get_product_releases in_product_since; - opensource=get_oss_releases in_oss_since; - internal_deprecated_since = internal_deprecated_since; - } in + if lifecycle = None && in_product_since = None then + failwith ("Lifecycle for message '" ^ name ^ "' not specified"); let lifecycle = match lifecycle with | None -> - let publish = [Published, in_product_since, doc] in + let published = match in_product_since with + | None -> [] + | Some rel -> [Published, rel, doc] + in let deprecated = match internal_deprecated_since with | None -> [] | Some rel -> [Deprecated, rel, ""] in - publish @ deprecated + published @ deprecated | Some l -> l in + let call_release = + { + internal = (match get_published lifecycle with + | Some published -> get_product_releases published + | None -> ["closed"]); + opensource = get_oss_releases in_oss_since; + internal_deprecated_since = get_deprecated lifecycle; + } + in { msg_name = name; msg_params = @@ -2637,28 +2659,40 @@ (** Make an object field record *) -let field ?(in_oss_since = Some "3.0.3") ?(in_product_since = rel_rio) ?(internal_only = false) +let field ?(in_oss_since = Some "3.0.3") ?in_product_since ?(internal_only = false) ?internal_deprecated_since ?(ignore_foreign_key = false) ?(writer_roles=None) ?(reader_roles=None) ?(qualifier = RW) ?(ty = String) ?(effect = false) ?(default_value = None) ?(persist = true) ?(map_keys_roles=[]) (* list of (key_name,(writer_roles)) for a map field *) ?lifecycle name desc = - + (* in_product_since currently defaults to 'Some rel_rio', for backwards compatibility. + * This should eventually become 'None'. *) + let in_product_since = match in_product_since with None -> Some rel_rio | x -> x in + if lifecycle = None && in_product_since = None then + failwith ("Lifecycle for field '" ^ name ^ "' not specified"); let lifecycle = match lifecycle with - | None -> - let publish = [Published, in_product_since, desc] in - let deprecated = match internal_deprecated_since with - | None -> [] - | Some rel -> [Deprecated, rel, ""] - in - publish @ deprecated - | Some l -> l + | None -> + let published = match in_product_since with + | None -> [] + | Some rel -> [Published, rel, desc] + in + let deprecated = match internal_deprecated_since with + | None -> [] + | Some rel -> [Deprecated, rel, ""] + in + published @ deprecated + | Some l -> l + in + let release = + { + internal = (match get_published lifecycle with + | Some published -> get_product_releases published + | None -> ["closed"]); + opensource = get_oss_releases in_oss_since; + internal_deprecated_since = get_deprecated lifecycle; + } in Field { - release = { - internal=get_product_releases in_product_since; - opensource=(get_oss_releases in_oss_since); - internal_deprecated_since=internal_deprecated_since; - }; + release = release; lifecycle=lifecycle; qualifier=qualifier; ty=ty; internal_only = internal_only; default_value = default_value; field_name=name; @@ -2704,7 +2738,7 @@ let default_field_writer_roles = _R_POOL_ADMIN (* by default, only root can write to them *) (** Create an object and map the object name into the messages *) -let create_obj ?lifecycle ~in_oss_since ~in_product_since ~internal_deprecated_since ~gen_constructor_destructor ~gen_events ~persist ~name ~descr ~doccomments ~contents ~messages ~in_db +let create_obj ?lifecycle ~in_oss_since ?in_product_since ?(internal_deprecated_since=None) ~gen_constructor_destructor ~gen_events ~persist ~name ~descr ~doccomments ~contents ~messages ~in_db ?(contents_default_reader_roles=default_field_reader_roles) ?(contents_default_writer_roles=None) ?(implicit_messages_allowed_roles=_R_ALL) (* used in implicit obj msgs (get_all, etc) *) ?force_custom_actions:(force_custom_actions=None) (* None,Some(RW),Some(StaticRO) *) @@ -2719,20 +2753,34 @@ | Field f->Field{f with field_setter_roles=get_field_writer_roles f.field_setter_roles; field_getter_roles=get_field_reader_roles f.field_getter_roles} ) contents in + if lifecycle = None && in_product_since = None then + failwith ("Lifecycle for class '" ^ name ^ "' not specified"); let lifecycle = match lifecycle with | None -> - let publish = [Published, in_product_since, descr] in + let published = match in_product_since with + | None -> [] + | Some rel -> [Published, rel, descr] + in let deprecated = match internal_deprecated_since with | None -> [] | Some rel -> [Deprecated, rel, ""] in - publish @ deprecated + published @ deprecated | Some l -> l + in + let release = + { + internal = (match get_published lifecycle with + | Some published -> get_product_releases published + | None -> ["closed"]); + opensource = get_oss_releases in_oss_since; + internal_deprecated_since = get_deprecated lifecycle; + } in let msgs = List.map (fun m -> {m with msg_obj_name=name;msg_allowed_roles=get_msg_allowed_roles m.msg_allowed_roles}) messages in { name = name; description = descr; obj_lifecycle = lifecycle; messages = msgs; contents = contents; doccomments = doccomments; gen_constructor_destructor = gen_constructor_destructor; force_custom_actions = force_custom_actions; - persist = persist; gen_events = gen_events; obj_release = {internal=get_product_releases in_product_since; opensource=get_oss_releases in_oss_since; internal_deprecated_since = internal_deprecated_since}; + persist = persist; gen_events = gen_events; obj_release = release; in_database=in_db; obj_allowed_roles = messages_default_allowed_roles; obj_implicit_msg_allowed_roles = implicit_messages_allowed_roles; } --===============7640177942487659796== Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="api-require-lifecycle" IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFJvYiBIb2VzIDxyb2IuaG9lc0BjaXRyaXguY29t PgpSZXF1aXJlIGxpZmVjeWNsZSBzcGVjaWZpY2F0aW9uIGZvciBBUElzCgpBbm90aGVyIHN0ZXAg aW4gdGhlIHRyYW5zaXRpb24gdG8gYmV0dGVyIGxpZmVjeWNsZSBpbmZvcm1hdGlvbiBpbiB0aGUg QVBJLgpFYWNoIEFQSSBpbiB0aGUgZGF0YW1vZGVsLm1sIHNob3VsZCBoYXZlIGFuIGV4cGxpY2l0 IGxpZmVjeWNsZSBkZXNjcmlwdGlvbiBhdHRhY2hlZCB0byBpdCAod2hpY2ggbWF5IGJlIFtdIGZv ciBwcm90b3R5cGVzKS4gU3BlY2lmeWluZyAnaW5fcHJvZHVjdF9zaW5jZScgaXMgc3RpbGwgYWxs b3dlZCBmb3IgYmFja3dhcmRzIGNvbXBhdGliaWxpdHksIGJ1dCBzaG91bGQgbm8gbG9uZ2VyIGJl IHVzZWQhCgpTaWduZWQtb2ZmLWJ5OiBSb2IgSG9lcyA8cm9iLmhvZXNAY2l0cml4LmNvbT4KCmRp ZmYgLXIgMmZhYzQwOWRjODZmIG9jYW1sL2lkbC9kYXRhbW9kZWwubWwKLS0tIGEvb2NhbWwvaWRs L2RhdGFtb2RlbC5tbAorKysgYi9vY2FtbC9pZGwvZGF0YW1vZGVsLm1sCkBAIC0xODUsNyArMTg1 LDE5IEBACiAJOyBpbnRlcm5hbF9kZXByZWNhdGVkX3NpbmNlPU5vbmUKIAl9CiAKLWxldCBjYWxs IH5uYW1lID8oZG9jPSIiKSA/KGluX29zc19zaW5jZT1Tb21lICIzLjAuMyIpIH5pbl9wcm9kdWN0 X3NpbmNlID9pbnRlcm5hbF9kZXByZWNhdGVkX3NpbmNlCitsZXQgZ2V0X3B1Ymxpc2hlZCBsaWZl Y3ljbGUgPQorCXRyeQorCQlsZXQgXywgcHVibGlzaGVkLCBfID0gTGlzdC5maW5kIChmdW4gKHQs IF8sIF8pIC0+IHQgPSBQdWJsaXNoZWQpIGxpZmVjeWNsZSBpbgorCQlTb21lIHB1Ymxpc2hlZAor CXdpdGggTm90X2ZvdW5kIC0+IE5vbmUKKworbGV0IGdldF9kZXByZWNhdGVkIGxpZmVjeWNsZSA9 CisJdHJ5CisJCWxldCBfLCBkZXByZWNhdGVkLCBfID0gTGlzdC5maW5kIChmdW4gKHQsIF8sIF8p IC0+IHQgPSBEZXByZWNhdGVkKSBsaWZlY3ljbGUgaW4KKwkJU29tZSBkZXByZWNhdGVkCisJd2l0 aCBOb3RfZm91bmQgLT4gTm9uZQorCitsZXQgY2FsbCB+bmFtZSA/KGRvYz0iIikgPyhpbl9vc3Nf c2luY2U9U29tZSAiMy4wLjMiKSA/aW5fcHJvZHVjdF9zaW5jZSA/aW50ZXJuYWxfZGVwcmVjYXRl ZF9zaW5jZQogCT9yZXN1bHQgPyhmbGFncz1bYFNlc3Npb247YEFzeW5jXSkKIAk/KGVmZmVjdD10 cnVlKSA/KHRhZz1DdXN0b20pID8oZXJycz1bXSkgPyhjdXN0b21fbWFyc2hhbGxlcj1mYWxzZSkg PyhkYl9vbmx5PWZhbHNlKQogCT8obm9fY3VycmVudF9vcGVyYXRpb25zPWZhbHNlKSA/KHNlY3Jl dD1mYWxzZSkgPyhoaWRlX2Zyb21fZG9jcz1mYWxzZSkKQEAgLTE5NiwyMCArMjA4LDMwIEBACiAJ KCogaWYgeW91IHNwZWNpZnkgdmVyc2lvbmVkX3BhcmFtcyB0aGVuIHRoZXNlIGdldCBwdXQgaW4g dGhlIHBhcmFtcyBmaWVsZCBvZiB0aGUgbWVzc2FnZSByZWNvcmQ7CiAJICogb3RoZXJ3aXNlIHBh cmFtcyBnbyBpbiB3aXRoIG5vIGRlZmF1bHQgdmFsdWVzIGFuZCBwYXJhbV9yZWxlYXNlPWNhbGxf cmVsZWFzZS4uLgogCSAqKQotCWxldCBjYWxsX3JlbGVhc2UgPSB7aW50ZXJuYWw9Z2V0X3Byb2R1 Y3RfcmVsZWFzZXMgaW5fcHJvZHVjdF9zaW5jZTsgCi0JCW9wZW5zb3VyY2U9Z2V0X29zc19yZWxl YXNlcyBpbl9vc3Nfc2luY2U7Ci0JCWludGVybmFsX2RlcHJlY2F0ZWRfc2luY2UgPSBpbnRlcm5h bF9kZXByZWNhdGVkX3NpbmNlOwotCX0gaW4KKwlpZiBsaWZlY3ljbGUgPSBOb25lICYmIGluX3By b2R1Y3Rfc2luY2UgPSBOb25lIHRoZW4KKwkJZmFpbHdpdGggKCJMaWZlY3ljbGUgZm9yIG1lc3Nh Z2UgJyIgXiBuYW1lIF4gIicgbm90IHNwZWNpZmllZCIpOwogCWxldCBsaWZlY3ljbGUgPSBtYXRj aCBsaWZlY3ljbGUgd2l0aAogCQl8IE5vbmUgLT4KLQkJCWxldCBwdWJsaXNoID0gW1B1Ymxpc2hl ZCwgaW5fcHJvZHVjdF9zaW5jZSwgZG9jXSBpbgorCQkJbGV0IHB1Ymxpc2hlZCA9IG1hdGNoIGlu X3Byb2R1Y3Rfc2luY2Ugd2l0aAorCQkJCXwgTm9uZSAtPiBbXQorCQkJCXwgU29tZSByZWwgLT4g W1B1Ymxpc2hlZCwgcmVsLCBkb2NdCisJCQlpbgogCQkJbGV0IGRlcHJlY2F0ZWQgPSBtYXRjaCBp bnRlcm5hbF9kZXByZWNhdGVkX3NpbmNlIHdpdGgKIAkJCQl8IE5vbmUgLT4gW10KIAkJCQl8IFNv bWUgcmVsIC0+IFtEZXByZWNhdGVkLCByZWwsICIiXQogCQkJaW4KLQkJCXB1Ymxpc2ggQCBkZXBy ZWNhdGVkCisJCQlwdWJsaXNoZWQgQCBkZXByZWNhdGVkCiAJCXwgU29tZSBsIC0+IGwKIAlpbgor CWxldCBjYWxsX3JlbGVhc2UgPQorCQl7CisJCQlpbnRlcm5hbCA9IChtYXRjaCBnZXRfcHVibGlz aGVkIGxpZmVjeWNsZSB3aXRoIAorCQkJCXwgU29tZSBwdWJsaXNoZWQgLT4gZ2V0X3Byb2R1Y3Rf cmVsZWFzZXMgcHVibGlzaGVkCisJCQkJfCBOb25lIC0+IFsiY2xvc2VkIl0pOworCQkJb3BlbnNv dXJjZSA9IGdldF9vc3NfcmVsZWFzZXMgaW5fb3NzX3NpbmNlOworCQkJaW50ZXJuYWxfZGVwcmVj YXRlZF9zaW5jZSA9IGdldF9kZXByZWNhdGVkIGxpZmVjeWNsZTsKKwkJfQorCWluCiAJeyAKIAkJ bXNnX25hbWUgPSBuYW1lOwogCQltc2dfcGFyYW1zID0KQEAgLTI2MzcsMjggKzI2NTksNDAgQEAK IAogCiAoKiogTWFrZSBhbiBvYmplY3QgZmllbGQgcmVjb3JkICopCi1sZXQgZmllbGQgPyhpbl9v c3Nfc2luY2UgPSBTb21lICIzLjAuMyIpID8oaW5fcHJvZHVjdF9zaW5jZSA9IHJlbF9yaW8pID8o aW50ZXJuYWxfb25seSA9IGZhbHNlKQorbGV0IGZpZWxkID8oaW5fb3NzX3NpbmNlID0gU29tZSAi My4wLjMiKSA/aW5fcHJvZHVjdF9zaW5jZSA/KGludGVybmFsX29ubHkgPSBmYWxzZSkKIAk/aW50 ZXJuYWxfZGVwcmVjYXRlZF9zaW5jZSA/KGlnbm9yZV9mb3JlaWduX2tleSA9IGZhbHNlKSA/KHdy aXRlcl9yb2xlcz1Ob25lKSA/KHJlYWRlcl9yb2xlcz1Ob25lKQogCT8ocXVhbGlmaWVyID0gUlcp ID8odHkgPSBTdHJpbmcpID8oZWZmZWN0ID0gZmFsc2UpID8oZGVmYXVsdF92YWx1ZSA9IE5vbmUp ID8ocGVyc2lzdCA9IHRydWUpCiAJPyhtYXBfa2V5c19yb2xlcz1bXSkgKCogbGlzdCBvZiAoa2V5 X25hbWUsKHdyaXRlcl9yb2xlcykpIGZvciBhIG1hcCBmaWVsZCAqKQogCT9saWZlY3ljbGUgbmFt ZSBkZXNjID0KLQkKKwkoKiBpbl9wcm9kdWN0X3NpbmNlIGN1cnJlbnRseSBkZWZhdWx0cyB0byAn U29tZSByZWxfcmlvJywgZm9yIGJhY2t3YXJkcyBjb21wYXRpYmlsaXR5LgorCSAqIFRoaXMgc2hv dWxkIGV2ZW50dWFsbHkgYmVjb21lICdOb25lJy4gKikKKwlsZXQgaW5fcHJvZHVjdF9zaW5jZSA9 IG1hdGNoIGluX3Byb2R1Y3Rfc2luY2Ugd2l0aCBOb25lIC0+IFNvbWUgcmVsX3JpbyB8IHggLT4g eCBpbgorCWlmIGxpZmVjeWNsZSA9IE5vbmUgJiYgaW5fcHJvZHVjdF9zaW5jZSA9IE5vbmUgdGhl bgorCQlmYWlsd2l0aCAoIkxpZmVjeWNsZSBmb3IgZmllbGQgJyIgXiBuYW1lIF4gIicgbm90IHNw ZWNpZmllZCIpOwogCWxldCBsaWZlY3ljbGUgPSBtYXRjaCBsaWZlY3ljbGUgd2l0aAotCXwgTm9u ZSAtPgotCQlsZXQgcHVibGlzaCA9IFtQdWJsaXNoZWQsIGluX3Byb2R1Y3Rfc2luY2UsIGRlc2Nd IGluCi0JCWxldCBkZXByZWNhdGVkID0gbWF0Y2ggaW50ZXJuYWxfZGVwcmVjYXRlZF9zaW5jZSB3 aXRoCi0JCQl8IE5vbmUgLT4gW10KLQkJCXwgU29tZSByZWwgLT4gW0RlcHJlY2F0ZWQsIHJlbCwg IiJdCi0JCWluCi0JCXB1Ymxpc2ggQCBkZXByZWNhdGVkCi0JfCBTb21lIGwgLT4gbAorCQl8IE5v bmUgLT4KKwkJCWxldCBwdWJsaXNoZWQgPSBtYXRjaCBpbl9wcm9kdWN0X3NpbmNlIHdpdGgKKwkJ CQl8IE5vbmUgLT4gW10KKwkJCQl8IFNvbWUgcmVsIC0+IFtQdWJsaXNoZWQsIHJlbCwgZGVzY10K KwkJCWluCisJCQlsZXQgZGVwcmVjYXRlZCA9IG1hdGNoIGludGVybmFsX2RlcHJlY2F0ZWRfc2lu Y2Ugd2l0aAorCQkJCXwgTm9uZSAtPiBbXQorCQkJCXwgU29tZSByZWwgLT4gW0RlcHJlY2F0ZWQs IHJlbCwgIiJdCisJCQlpbgorCQkJcHVibGlzaGVkIEAgZGVwcmVjYXRlZAorCQl8IFNvbWUgbCAt PiBsCisJaW4KKwlsZXQgcmVsZWFzZSA9CisJCXsKKwkJCWludGVybmFsID0gKG1hdGNoIGdldF9w dWJsaXNoZWQgbGlmZWN5Y2xlIHdpdGggCisJCQkJfCBTb21lIHB1Ymxpc2hlZCAtPiBnZXRfcHJv ZHVjdF9yZWxlYXNlcyBwdWJsaXNoZWQKKwkJCQl8IE5vbmUgLT4gWyJjbG9zZWQiXSk7CisJCQlv cGVuc291cmNlID0gZ2V0X29zc19yZWxlYXNlcyBpbl9vc3Nfc2luY2U7CisJCQlpbnRlcm5hbF9k ZXByZWNhdGVkX3NpbmNlID0gZ2V0X2RlcHJlY2F0ZWQgbGlmZWN5Y2xlOworCQl9CiAJaW4KIAlG aWVsZCB7Ci0JCXJlbGVhc2UgPSB7Ci0JCQlpbnRlcm5hbD1nZXRfcHJvZHVjdF9yZWxlYXNlcyBp bl9wcm9kdWN0X3NpbmNlOyAKLQkJCW9wZW5zb3VyY2U9KGdldF9vc3NfcmVsZWFzZXMgaW5fb3Nz X3NpbmNlKTsKLQkJCWludGVybmFsX2RlcHJlY2F0ZWRfc2luY2U9aW50ZXJuYWxfZGVwcmVjYXRl ZF9zaW5jZTsKLQkJfTsKKwkJcmVsZWFzZSA9IHJlbGVhc2U7CiAJCWxpZmVjeWNsZT1saWZlY3lj bGU7CiAJCXF1YWxpZmllcj1xdWFsaWZpZXI7IHR5PXR5OyBpbnRlcm5hbF9vbmx5ID0gaW50ZXJu YWxfb25seTsgZGVmYXVsdF92YWx1ZSA9IGRlZmF1bHRfdmFsdWU7CiAJCWZpZWxkX25hbWU9bmFt ZTsgCkBAIC0yNzA0LDcgKzI3MzgsNyBAQAogbGV0IGRlZmF1bHRfZmllbGRfd3JpdGVyX3JvbGVz ID0gX1JfUE9PTF9BRE1JTiAoKiBieSBkZWZhdWx0LCBvbmx5IHJvb3QgY2FuIHdyaXRlIHRvIHRo ZW0gKikKIAogKCoqIENyZWF0ZSBhbiBvYmplY3QgYW5kIG1hcCB0aGUgb2JqZWN0IG5hbWUgaW50 byB0aGUgbWVzc2FnZXMgKikKLWxldCBjcmVhdGVfb2JqID9saWZlY3ljbGUgfmluX29zc19zaW5j ZSB+aW5fcHJvZHVjdF9zaW5jZSB+aW50ZXJuYWxfZGVwcmVjYXRlZF9zaW5jZSB+Z2VuX2NvbnN0 cnVjdG9yX2Rlc3RydWN0b3Igfmdlbl9ldmVudHMgfnBlcnNpc3Qgfm5hbWUgfmRlc2NyIH5kb2Nj b21tZW50cyB+Y29udGVudHMgfm1lc3NhZ2VzIH5pbl9kYgorbGV0IGNyZWF0ZV9vYmogP2xpZmVj eWNsZSB+aW5fb3NzX3NpbmNlID9pbl9wcm9kdWN0X3NpbmNlID8oaW50ZXJuYWxfZGVwcmVjYXRl ZF9zaW5jZT1Ob25lKSB+Z2VuX2NvbnN0cnVjdG9yX2Rlc3RydWN0b3Igfmdlbl9ldmVudHMgfnBl cnNpc3Qgfm5hbWUgfmRlc2NyIH5kb2Njb21tZW50cyB+Y29udGVudHMgfm1lc3NhZ2VzIH5pbl9k YgogCT8oY29udGVudHNfZGVmYXVsdF9yZWFkZXJfcm9sZXM9ZGVmYXVsdF9maWVsZF9yZWFkZXJf cm9sZXMpID8oY29udGVudHNfZGVmYXVsdF93cml0ZXJfcm9sZXM9Tm9uZSkKIAk/KGltcGxpY2l0 X21lc3NhZ2VzX2FsbG93ZWRfcm9sZXM9X1JfQUxMKSAoKiB1c2VkIGluIGltcGxpY2l0IG9iaiBt c2dzIChnZXRfYWxsLCBldGMpICopCiAJP2ZvcmNlX2N1c3RvbV9hY3Rpb25zOihmb3JjZV9jdXN0 b21fYWN0aW9ucz1Ob25lKSAoKiBOb25lLFNvbWUoUlcpLFNvbWUoU3RhdGljUk8pICopCkBAIC0y NzE5LDIwICsyNzUzLDM0IEBACiAJCXwgRmllbGQgZi0+RmllbGR7ZiB3aXRoIGZpZWxkX3NldHRl cl9yb2xlcz1nZXRfZmllbGRfd3JpdGVyX3JvbGVzIGYuZmllbGRfc2V0dGVyX3JvbGVzOwogCQkJ ZmllbGRfZ2V0dGVyX3JvbGVzPWdldF9maWVsZF9yZWFkZXJfcm9sZXMgZi5maWVsZF9nZXR0ZXJf cm9sZXN9CiAJCSkgY29udGVudHMgaW4KKwlpZiBsaWZlY3ljbGUgPSBOb25lICYmIGluX3Byb2R1 Y3Rfc2luY2UgPSBOb25lIHRoZW4KKwkJZmFpbHdpdGggKCJMaWZlY3ljbGUgZm9yIGNsYXNzICci IF4gbmFtZSBeICInIG5vdCBzcGVjaWZpZWQiKTsKIAlsZXQgbGlmZWN5Y2xlID0gbWF0Y2ggbGlm ZWN5Y2xlIHdpdGgKIAkJfCBOb25lIC0+Ci0JCQlsZXQgcHVibGlzaCA9IFtQdWJsaXNoZWQsIGlu X3Byb2R1Y3Rfc2luY2UsIGRlc2NyXSBpbgorCQkJbGV0IHB1Ymxpc2hlZCA9IG1hdGNoIGluX3By b2R1Y3Rfc2luY2Ugd2l0aAorCQkJCXwgTm9uZSAtPiBbXQorCQkJCXwgU29tZSByZWwgLT4gW1B1 Ymxpc2hlZCwgcmVsLCBkZXNjcl0KKwkJCWluCiAJCQlsZXQgZGVwcmVjYXRlZCA9IG1hdGNoIGlu dGVybmFsX2RlcHJlY2F0ZWRfc2luY2Ugd2l0aAogCQkJCXwgTm9uZSAtPiBbXQogCQkJCXwgU29t ZSByZWwgLT4gW0RlcHJlY2F0ZWQsIHJlbCwgIiJdCiAJCQlpbgotCQkJcHVibGlzaCBAIGRlcHJl Y2F0ZWQKKwkJCXB1Ymxpc2hlZCBAIGRlcHJlY2F0ZWQKIAkJfCBTb21lIGwgLT4gbAorCWluCQor CWxldCByZWxlYXNlID0KKwkJeworCQkJaW50ZXJuYWwgPSAobWF0Y2ggZ2V0X3B1Ymxpc2hlZCBs aWZlY3ljbGUgd2l0aCAKKwkJCQl8IFNvbWUgcHVibGlzaGVkIC0+IGdldF9wcm9kdWN0X3JlbGVh c2VzIHB1Ymxpc2hlZAorCQkJCXwgTm9uZSAtPiBbImNsb3NlZCJdKTsKKwkJCW9wZW5zb3VyY2Ug PSBnZXRfb3NzX3JlbGVhc2VzIGluX29zc19zaW5jZTsKKwkJCWludGVybmFsX2RlcHJlY2F0ZWRf c2luY2UgPSBnZXRfZGVwcmVjYXRlZCBsaWZlY3ljbGU7CisJCX0KIAlpbgogCWxldCBtc2dzID0g TGlzdC5tYXAgKGZ1biBtIC0+IHttIHdpdGggbXNnX29ial9uYW1lPW5hbWU7bXNnX2FsbG93ZWRf cm9sZXM9Z2V0X21zZ19hbGxvd2VkX3JvbGVzIG0ubXNnX2FsbG93ZWRfcm9sZXN9KSBtZXNzYWdl cyBpbgogCXsgbmFtZSA9IG5hbWU7IGRlc2NyaXB0aW9uID0gZGVzY3I7IG9ial9saWZlY3ljbGUg PSBsaWZlY3ljbGU7IG1lc3NhZ2VzID0gbXNnczsgY29udGVudHMgPSBjb250ZW50czsKIAkJZG9j Y29tbWVudHMgPSBkb2Njb21tZW50czsgZ2VuX2NvbnN0cnVjdG9yX2Rlc3RydWN0b3IgPSBnZW5f Y29uc3RydWN0b3JfZGVzdHJ1Y3RvcjsgZm9yY2VfY3VzdG9tX2FjdGlvbnMgPSBmb3JjZV9jdXN0 b21fYWN0aW9uczsKLQkJcGVyc2lzdCA9IHBlcnNpc3Q7IGdlbl9ldmVudHMgPSBnZW5fZXZlbnRz OyBvYmpfcmVsZWFzZSA9IHtpbnRlcm5hbD1nZXRfcHJvZHVjdF9yZWxlYXNlcyBpbl9wcm9kdWN0 X3NpbmNlOyBvcGVuc291cmNlPWdldF9vc3NfcmVsZWFzZXMgaW5fb3NzX3NpbmNlOyBpbnRlcm5h bF9kZXByZWNhdGVkX3NpbmNlID0gaW50ZXJuYWxfZGVwcmVjYXRlZF9zaW5jZX07CisJCXBlcnNp c3QgPSBwZXJzaXN0OyBnZW5fZXZlbnRzID0gZ2VuX2V2ZW50czsgb2JqX3JlbGVhc2UgPSByZWxl YXNlOwogCQlpbl9kYXRhYmFzZT1pbl9kYjsgb2JqX2FsbG93ZWRfcm9sZXMgPSBtZXNzYWdlc19k ZWZhdWx0X2FsbG93ZWRfcm9sZXM7IG9ial9pbXBsaWNpdF9tc2dfYWxsb3dlZF9yb2xlcyA9IGlt cGxpY2l0X21lc3NhZ2VzX2FsbG93ZWRfcm9sZXM7CiAJfQogCg== --===============7640177942487659796== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============7640177942487659796==-- From xen-api-bounces@lists.xensource.com Mon Jun 14 04:07:25 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 14 Jun 2010 04:07:25 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OO7Vj-0002ue-Ro; Mon, 14 Jun 2010 04:07:24 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OO7UV-0002TT-Si for xen-api@lists.xensource.com; Mon, 14 Jun 2010 04:06:08 -0700 X-ASG-Debug-ID: 1276513564-61e1002f0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id BA92C298E5F for ; Mon, 14 Jun 2010 04:06:05 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id yL6fg9qAzY6XzK8p (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 14 Jun 2010 04:06:05 -0700 (PDT) X-Barracuda-Envelope-From: rok.strnisa@citrix.com X-IronPort-AV: E=Sophos;i="4.53,414,1272844800"; d="scan'208";a="391837" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 14 Jun 2010 11:06:04 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Mon, 14 Jun 2010 12:06:04 +0100 Received: from dhcp-3-235.uk.xensource.com ([10.80.3.235] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OO7UP-0003sv-1B for xen-api@lists.xensource.com; Mon, 14 Jun 2010 12:06:01 +0100 Content-Type: multipart/mixed; boundary="===============0718874716==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Added support for LV tags X-Mercurial-Node: f4195e75ce97d744330cdd2e82b39ce668b34913 Message-ID: User-Agent: Mercurial-patchbomb/1.4.3 Date: Mon, 14 Jun 2010 12:03:56 +0100 From: Rok Strnisa To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276513566 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32506 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Added support for LV tags X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0718874716== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit This includes: - Tag.t type, which encapsulates tag strings; - use of Tag.t consistently throughout the repository; - a simplified mlvm/Makefile; - a simple unit test for checking Tag.is_valid. signed-off-by: Rok Strnisa mlvm/Makefile | 122 +++++++++++++++++++++------------------------ mlvm/clue.ml | 21 ------- mlvm/lv.ml | 5 +- mlvm/redo.ml | 48 +++++++++--------- mlvm/tag.ml | 14 +++++ mlvm/tag.mli | 13 ++++ mlvm/tag_is_valid_test.ml | 13 ++++ mlvm/test_fragment.ml | 3 +- mlvm/vg.ml | 120 +++++++++++++++++++++----------------------- 9 files changed, 182 insertions(+), 177 deletions(-) --===============0718874716== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User Rok Strnisa # Date 1276513210 -3600 # Node ID f4195e75ce97d744330cdd2e82b39ce668b34913 # Parent 786b12c29899fe5c290c64511f61747f54658e5e Added support for LV tags. This includes: - Tag.t type, which encapsulates tag strings; - use of Tag.t consistently throughout the repository; - a simplified mlvm/Makefile; - a simple unit test for checking Tag.is_valid. signed-off-by: Rok Strnisa diff --git a/mlvm/Makefile b/mlvm/Makefile --- a/mlvm/Makefile +++ b/mlvm/Makefile @@ -1,75 +1,62 @@ - -CC = gcc -CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml -LDFLAGS = -cclib -L./ -VERSION = 0.1 - -PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma - -DESTDIR ?= / VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) -OCAMLABI := $(shell ocamlc -version) -OCAMLLIBDIR := $(shell ocamlc -where) -OCAMLDESTDIR ?= $(OCAMLLIBDIR) +OCAMLC = ocamlfind ocamlc -g +OCAMLOPT = ocamlfind ocamlopt +OCAMLYACC = ocamlyacc +OCAMLLEX = ocamllex +PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma +COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I ../rpc-light -for-pack Lvm -pp '${PP}' -LIBOBJS = constants lvm_uuid crc utils absty lvmconfigparser lvmconfiglex lvmmarshal allocator debug redo lv pv vg -INTF = $(foreach obj, $(LIBOBJS),$(obj).cmi) -CMDOBJS = messages.cmx mlvm.cmx -OCAMLC = ocamlfind ocamlc -g -OCAMLOPT = ocamlfind ocamlopt -COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -for-pack Lvm -pp '${PP}' -I ../rpc-light +LIBOBJS = constants lvm_uuid crc utils absty lvmconfigparser lvmconfiglex lvmmarshal allocator debug tag redo lv pv vg +LIBCMXS = $(foreach obj, $(LIBOBJS),$(obj).cmx) +LIBCMOS = $(foreach obj, $(LIBOBJS),$(obj).cmo) +LIBCMIS = $(foreach obj, $(LIBOBJS),$(obj).cmi) + +DESTDIR ?= +DOCDIR = /myrepos/xen-api-libs.hg/doc LIBS = lvm.cma lvm.cmxa -DOCDIR = /myrepos/xen-api-libs.hg/doc +default: $(LIBS) -default : $(LIBS) +lvm.cmx: $(LIBCMXS) + $(OCAMLOPT) -pack -g -o $@ $^ -test_allocator: default - $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I +kaputt unix.cmxa ../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa test_allocator.ml -o $@ - -lvm.cmx: $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmx) - -lvm.cmo: $(foreach obj,$(LIBOBJS),$(obj).cmo) - $(OCAMLC) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmo) +lvm.cmo: $(LIBCMOS) + $(OCAMLC) -pack -g -o $@ $^ lvm.cmxa: lvm.cmx - $(OCAMLOPT) -a -g -o $@ lvm.cmx + $(OCAMLOPT) -a -g -o $@ $^ lvm.cma: lvm.cmo - $(OCAMLC) -a -g -o $@ lvm.cmo + $(OCAMLC) -a -g -o $@ $^ + +lvmconfigparser.ml: lvmconfigparser.mly + $(OCAMLYACC) $< + $(OCAMLOPT) $(COMPFLAG) -c lvmconfigparser.mli + +lvmconfiglex.ml: lvmconfiglex.mll lvmconfigparser.mli + $(OCAMLLEX) $< META: META.in sed 's/@VERSION@/$(VERSION)/g' < $< > $@ -.PHONY: install +.PHONY: install uninstall doc clean install: $(LIBS) META ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore lvm META lvm.cmi lvm.cmxa lvm.cma lvm.a -.PHONY: uninstall uninstall: ocamlfind remove lvm -clean : - rm -f *.cmo *.cmi *.cmx *.o *~ *.annot lvmconfiglex.ml \ - lvmconfigparser.mli lvmconfigparser.ml - rm -f test_allocator test_fragment +doc: $(LIBCMIS) + python ../doc/doc.py $(DOCDIR) "mlvm" "package" "$(LIBOBJS)" "." "stdext,camldm,uuid,unix" "" -.PHONY: doc -doc: $(INTF) - python ../doc/doc.py $(DOCDIR) "mlvm" "package" "$(LIBOBJS)" "." "stdext,camldm,uuid,unix" "" - -lvmconfigparser.ml : lvmconfigparser.mly - ocamlyacc lvmconfigparser.mly - $(OCAMLOPT) $(COMPFLAG) -c lvmconfigparser.mli - -lvmconfiglex.ml : lvmconfiglex.mll lvmconfigparser.mli - ocamllex lvmconfiglex.mll +clean: + rm -f *.cm{o,i,x} *.{annot,o} *~ + rm -f lvmconfiglex.ml lvmconfigparser.ml{,i} + rm -f test_allocator test_fragment tag_is_valid_test .SUFFIXES: .ml .mli .cmo .cmi .cmx - .ml.cmo: $(OCAMLC) $(COMPFLAG) -c $< @@ -79,25 +66,28 @@ lvmconfiglex.ml : lvmconfiglex.mll lvmco .ml.cmx: $(OCAMLOPT) $(COMPFLAG) -c $< -.c.o: - $(OCAMLC) $(COMPFLAG) -c $< +lvmcmd.cmo: messages.cmo +lvmcmd.cmx: messages.cmx +lv.cmo: absty.cmo +lv.cmx: absty.cmx +mlvm.cmo: vg.cmo pv.cmo messages.cmo lv.cmo +mlvm.cmx: vg.cmx pv.cmx messages.cmx lv.cmx +pv.cmo: utils.cmo lvmmarshal.cmo lvm_uuid.cmo crc.cmo constants.cmo allocator.cmo absty.cmo +pv.cmx: utils.cmx lvmmarshal.cmx lvm_uuid.cmx crc.cmx constants.cmx allocator.cmx absty.cmx +vg.cmo: debug.cmo pv.cmo lvm_uuid.cmo lv.cmo allocator.cmo absty.cmo +vg.cmx: debug.cmx pv.cmx lvm_uuid.cmx lv.cmx allocator.cmx absty.cmx +redo.cmo: tag.cmi debug.cmo allocator.cmo +redo.cmx: tag.cmx debug.cmx allocator.cmx +tag.cmo: debug.cmo tag.cmi +tag.cmx: debug.cmx tag.cmi -lvmcmd.cmo: messages.cmo -lvmcmd.cmx: messages.cmx -lv.cmo: absty.cmo -lv.cmx: absty.cmx -mlvm.cmo: vg.cmo pv.cmo messages.cmo lv.cmo -mlvm.cmx: vg.cmx pv.cmx messages.cmx lv.cmx -pv.cmo: utils.cmo lvmmarshal.cmo lvm_uuid.cmo crc.cmo constants.cmo \ - allocator.cmo absty.cmo -pv.cmx: utils.cmx lvmmarshal.cmx lvm_uuid.cmx crc.cmx constants.cmx \ - allocator.cmx absty.cmx -vg.cmo: debug.cmo pv.cmo lvm_uuid.cmo lv.cmo allocator.cmo absty.cmo -vg.cmx: debug.cmx pv.cmx lvm_uuid.cmx lv.cmx allocator.cmx absty.cmx +test_allocator: default + $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I +kaputt $(INCLUDES) ./lvm.cmxa test_allocator.ml -o $@ -test_fragment: default $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid unix.cmxa ../rpc-light/rpc.cmx -I ../rpc-light ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa olvm_tools.ml test_fragment.ml -o $@ -# $(foreach obj,$(LIBOBJS),$(obj).cmx) +INCLUDES = unix.cmxa str.cmxa ../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa -clue: default $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid unix.cmxa ../rpc-light/rpc.cmx -I ../rpc-light ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa clue.ml -o $@ +test_fragment: lvm.cmxa $(LIBCMXS) test_fragment.ml + $(OCAMLOPT) $(COMPFLAG) $(INCLUDES) $^ -o $@ + +tag_is_valid_test: $(LIBCMXS) tag.cmx tag_is_valid_test.ml + $(OCAMLOPT) $(COMPFLAG) $(INCLUDES) $^ -o $@ \ No newline at end of file diff --git a/mlvm/clue.ml b/mlvm/clue.ml deleted file mode 100644 --- a/mlvm/clue.ml +++ /dev/null @@ -1,21 +0,0 @@ -(* Command Line User Environment (not much of it, yet. will become so later.) - load volume group and do some debug printing: - get the camldm table, something like lvs, and the checksums *) - -open Fun -open Stringext -open Listext -open Camldm -open Olvm_tools - -let default_devices = ["/dev/sda3"; "/dev/sda4"] - -(* let o_table = olvm_table () *) -(* let c_table = camldm_table () *) -let vg = Lvm.Vg.load default_devices (* This gives an invalid checksum *) -(* let mlvm_table = camldm_table () -let _ = (assert(StringMap.equal (=) o_table c_table); - assert(StringMap.equal (=) o_table mlvm_table))*) - -(* let f _ = Lvm.Crc.crc "" Lvm.Crc.initial_crc *) - diff --git a/mlvm/lv.ml b/mlvm/lv.ml --- a/mlvm/lv.ml +++ b/mlvm/lv.ml @@ -1,4 +1,5 @@ open Absty +open Fun open Listext type stat = @@ -28,7 +29,7 @@ and segment = and logical_volume = { name : string; id : string; - tags : string list; + tags : Tag.t list; status : stat list; segments : segment list; } with rpc @@ -54,7 +55,7 @@ let write_to_buffer b lv = bprintf b "\n%s {\nid = \"%s\"\nstatus = [%s]\n" lv.name lv.id (String.concat ", " (List.map (o quote status_to_string) lv.status)); if List.length lv.tags > 0 then - bprintf b "tags = [%s]\n" (String.concat ", " (List.map quote lv.tags)); + bprintf b "tags = [%s]\n" (String.concat ", " (List.map (quote ++ Tag.string_of) lv.tags)); bprintf b "segment_count = %d\n\n" (List.length lv.segments); Listext.List.iteri (fun i s -> diff --git a/mlvm/redo.ml b/mlvm/redo.ml --- a/mlvm/redo.ml +++ b/mlvm/redo.ml @@ -1,3 +1,4 @@ +open Debug type lvcreate_t = { lvc_id : string; @@ -15,21 +16,21 @@ and lvreduce_t = { and lvexpand_t = { lvex_segments : Allocator.t; } - + +(** First string corresponds to the name of the LV. *) and operation = - | LvCreate of string * lvcreate_t - | LvReduce of string * lvreduce_t - | LvExpand of string * lvexpand_t - | LvRename of string * lvrename_t - | LvRemove of string + | LvCreate of string * lvcreate_t + | LvReduce of string * lvreduce_t + | LvExpand of string * lvexpand_t + | LvRename of string * lvrename_t + | LvRemove of string + | LvAddTag of string * Tag.t and sequenced_op = { so_seqno : int; so_op : operation } with rpc -open Debug - (** Marshal to and from a string *) let redo_to_string (l : sequenced_op) = let s = Marshal.to_string l [] in @@ -98,20 +99,19 @@ let read fd offset size = let reset fd offset = write_initial_pos fd offset (Int64.add offset 12L) - + +(** Converts the redo operation to a human-readable string. *) let redo_to_human_readable op = - let lvcreate_t_to_string l = - Printf.sprintf "{id:'%s', segments:[%s]}" l.lvc_id (Allocator.to_string l.lvc_segments) - in - let lvexpand_t_to_string l = - Printf.sprintf "[%s]" (Allocator.to_string l.lvex_segments) - in - let opstr = - match op.so_op with - | LvCreate (name,lvc) -> Printf.sprintf "LvCreate(%s,%s)" name (lvcreate_t_to_string lvc) - | LvRemove name -> Printf.sprintf "LvRemove(%s)" name - | LvReduce (name,lvrd) -> Printf.sprintf "LvReduce(%s,%Ld)" name lvrd.lvrd_new_extent_count - | LvExpand (name,lvex) -> Printf.sprintf "LvExpand(%s,%s)" name (lvexpand_t_to_string lvex) - | LvRename (name,lvmv) -> Printf.sprintf "LvRename(%s,%s)" name lvmv.lvmv_new_name - in - Printf.sprintf "{seqno=%d; op=%s}" op.so_seqno opstr + let lvcreate_t_to_string l = + Printf.sprintf "{id:'%s', segments:[%s]}" l.lvc_id (Allocator.to_string l.lvc_segments) in + let lvexpand_t_to_string l = + Printf.sprintf "[%s]" (Allocator.to_string l.lvex_segments) in + let opstr = + match op.so_op with + | LvCreate (name,lvc) -> Printf.sprintf "LvCreate(%s,%s)" name (lvcreate_t_to_string lvc) + | LvRemove name -> Printf.sprintf "LvRemove(%s)" name + | LvReduce (name,lvrd) -> Printf.sprintf "LvReduce(%s,%Ld)" name lvrd.lvrd_new_extent_count + | LvExpand (name,lvex) -> Printf.sprintf "LvExpand(%s,%s)" name (lvexpand_t_to_string lvex) + | LvRename (name,lvmv) -> Printf.sprintf "LvRename(%s,%s)" name lvmv.lvmv_new_name + | LvAddTag (name,tag) -> Printf.sprintf "LvAddTag(%s,%s)" name (Tag.string_of tag) in + Printf.sprintf "{seqno=%d; op=%s}" op.so_seqno opstr diff --git a/mlvm/tag.ml b/mlvm/tag.ml new file mode 100644 --- /dev/null +++ b/mlvm/tag.ml @@ -0,0 +1,14 @@ +open Str + +type t = string with rpc + +let tag_regexp = regexp "^[A-Za-z0-9_+.][A-Za-z0-9_+.-]*$" + +let is_valid s = + (String.length s <= 128) && (string_match tag_regexp s 0) + +let of_string s = + if is_valid s then s else failwith "Tag string does not conform to the rules." + +let string_of t = + t diff --git a/mlvm/tag.mli b/mlvm/tag.mli new file mode 100644 --- /dev/null +++ b/mlvm/tag.mli @@ -0,0 +1,13 @@ +type t + +val rpc_of_t : t -> Rpc.t +val t_of_rpc : Rpc.t -> t +(** Checks whether a string is a valid tag string. + Tag character set: A-Za-z0-9_+.- + Can't start with hyphen. Max length is 128. + Empty tags are currently not allowed. *) +val is_valid : string -> bool +(** Creates a tag from a string. Fails on non-conforming strings. *) +val of_string : string -> t +(** Converts a tag to a string. *) +val string_of : t -> string diff --git a/mlvm/tag_is_valid_test.ml b/mlvm/tag_is_valid_test.ml new file mode 100644 --- /dev/null +++ b/mlvm/tag_is_valid_test.ml @@ -0,0 +1,13 @@ +open Tag + +let test_tag_string (should_be_valid, s) = + let is_valid = is_valid s in + let is_valid_string = if is_valid then " VALID" else "INVALID" in + let result = if is_valid = should_be_valid then " CORRECT" else "INCORRECT" in + print_endline (result ^ " --- " ^ is_valid_string ^ " --- '" ^ s ^ "'") + +let test_strings = + [false, ""; true, "abc"; false, "----abc"; true, "abc-----"; false, "abc###"; + true, String.make 128 'y'; false, String.make 129 'n'; true, "_0m_3+3-3.X"] + +let _ = List.map test_tag_string test_strings diff --git a/mlvm/test_fragment.ml b/mlvm/test_fragment.ml --- a/mlvm/test_fragment.ml +++ b/mlvm/test_fragment.ml @@ -1,4 +1,4 @@ -Put them into a library? *) +(* Put them into a library? *) let pvs = "/usr/sbin/pvs" let pvcreate = "/usr/sbin/pvcreate" @@ -213,7 +213,6 @@ let print_camldm_devices = let get_free_space vg = 10L let get_size vg = 10 -*) (* ToDo: Do a real shuffle, e.g. pair with random numbers and sort. *) let shuffle l = List.map fst ++ List.sort (Fun.on Int64.compare snd) diff --git a/mlvm/vg.ml b/mlvm/vg.ml --- a/mlvm/vg.ml +++ b/mlvm/vg.ml @@ -74,65 +74,62 @@ let to_string vg = (*************************************************************) let do_op vg op = - (if vg.seqno <> op.so_seqno then failwith "Failing to do VG operation out-of-order"); - Unixext.write_string_to_file (Printf.sprintf "/tmp/redo_op.%d" op.so_seqno) (Redo.redo_to_human_readable op); - let rec createsegs ss lstart = - match ss with - | a::ss -> - let length = Allocator.get_size a in - let pv_name = Allocator.get_name a in - ({Lv.s_start_extent=lstart; s_extent_count=length; - s_cls=Lv.Linear {Lv.l_pv_name=pv_name; - l_pv_start_extent=Allocator.get_start a}})::createsegs ss (Int64.add lstart length) - | _ -> [] - in - let change_lv lv_name fn = - let lv,others = List.partition (fun lv -> lv.Lv.name=lv_name) vg.lvs in - match lv with - | [lv] -> - fn lv others - | _ -> failwith "Unknown LV" - in - let vg = {vg with seqno = vg.seqno + 1; ops=op::vg.ops} in - match op.so_op with - | LvCreate (name,l) -> - let new_free_space = Allocator.alloc_specified_areas vg.free_space l.lvc_segments in - let segments = Lv.sort_segments (createsegs l.lvc_segments 0L) in - let lv = { Lv.name=name; - id=l.lvc_id; - tags=[]; - status=[Lv.Read; Lv.Visible]; - segments=segments } + (if vg.seqno <> op.so_seqno then failwith "Failing to do VG operation out-of-order"); + Unixext.write_string_to_file (Printf.sprintf "/tmp/redo_op.%d" op.so_seqno) (Redo.redo_to_human_readable op); + let rec createsegs ss lstart = + match ss with + | a::ss -> + let length = Allocator.get_size a in + let pv_name = Allocator.get_name a in + ({Lv.s_start_extent = lstart; s_extent_count = length; + s_cls = Lv.Linear {Lv.l_pv_name = pv_name; + l_pv_start_extent=Allocator.get_start a}})::createsegs ss (Int64.add lstart length) + | _ -> [] in - { vg with - lvs = lv::vg.lvs; - free_space=new_free_space } - | LvExpand (name,l) -> - change_lv name (fun lv others -> - let old_size = Lv.size_in_extents lv in - let free_space = Allocator.alloc_specified_areas vg.free_space l.lvex_segments in - let segments = createsegs l.lvex_segments old_size in - let lv = { lv with Lv.segments = Lv.sort_segments (segments @ lv.Lv.segments) } in - { vg with - lvs = lv::others; free_space=free_space}) - | LvReduce (name,l) -> - change_lv name (fun lv others -> - let allocation = Lv.allocation_of_lv lv in - let lv = Lv.reduce_size_to lv l.lvrd_new_extent_count in - let new_allocation = Lv.allocation_of_lv lv in - let free_space = Allocator.alloc_specified_areas (Allocator.free vg.free_space allocation) new_allocation in - {vg with - lvs = lv::others; free_space=free_space}) - | LvRemove name -> - change_lv name (fun lv others -> - let allocation = Lv.allocation_of_lv lv in - { vg with - lvs = others; - free_space = Allocator.free vg.free_space allocation }) - | LvRename (name,l) -> - change_lv name (fun lv others -> - { vg with - lvs = {lv with Lv.name=l.lvmv_new_name}::others }) + let change_lv lv_name fn = + let lv,others = List.partition (fun lv -> lv.Lv.name=lv_name) vg.lvs in + match lv with + | [lv] -> + fn lv others + | _ -> failwith "Unknown LV" + in + let vg = {vg with seqno = vg.seqno + 1; ops=op::vg.ops} in + match op.so_op with + | LvCreate (name,l) -> + let new_free_space = Allocator.alloc_specified_areas vg.free_space l.lvc_segments in + let segments = Lv.sort_segments (createsegs l.lvc_segments 0L) in + let lv = + { Lv.name = name; id = l.lvc_id; tags = []; + status = [Lv.Read; Lv.Visible]; segments = segments } in + {vg with lvs = lv::vg.lvs; free_space = new_free_space} + | LvExpand (name,l) -> + change_lv name (fun lv others -> + let old_size = Lv.size_in_extents lv in + let free_space = Allocator.alloc_specified_areas vg.free_space l.lvex_segments in + let segments = createsegs l.lvex_segments old_size in + let lv = {lv with Lv.segments = Lv.sort_segments (segments @ lv.Lv.segments)} in + {vg with lvs = lv::others; free_space=free_space}) + | LvReduce (name,l) -> + change_lv name (fun lv others -> + let allocation = Lv.allocation_of_lv lv in + let lv = Lv.reduce_size_to lv l.lvrd_new_extent_count in + let new_allocation = Lv.allocation_of_lv lv in + let free_space = Allocator.alloc_specified_areas (Allocator.free vg.free_space allocation) new_allocation in + {vg with + lvs = lv::others; free_space=free_space}) + | LvRemove name -> + change_lv name (fun lv others -> + let allocation = Lv.allocation_of_lv lv in + {vg with lvs = others; free_space = Allocator.free vg.free_space allocation }) + | LvRename (name,l) -> + change_lv name (fun lv others -> + {vg with lvs = {lv with Lv.name=l.lvmv_new_name}::others }) + | LvAddTag (name, tag) -> + change_lv name (fun lv others -> + let tags = lv.Lv.tags in + let lv' = {lv with Lv.tags = if List.mem tag tags then tags else tag::tags} in + {vg with lvs = lv'::others}) + let create_lv vg name size = let id = Lvm_uuid.create () in @@ -159,12 +156,11 @@ let resize_lv vg name new_size = let remove_lv vg name = do_op vg {so_seqno=vg.seqno; so_op=LvRemove name} +let add_tag_lv vg name tag = + do_op vg {so_seqno = vg.seqno; so_op = LvAddTag (name, tag)} + (******************************************************************************) - - - - let human_readable vg = let pv_strings = List.map Pv.human_readable vg.pvs in String.concat "\n" pv_strings --===============0718874716== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0718874716==-- From xen-api-bounces@lists.xensource.com Mon Jun 14 07:54:04 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 14 Jun 2010 07:54:04 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OOB36-0002oV-Jl; Mon, 14 Jun 2010 07:54:04 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OOB2t-0002m4-DU for xen-api@lists.xensource.com; Mon, 14 Jun 2010 07:53:51 -0700 X-ASG-Debug-ID: 1276527228-42de00b50000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 41A6B298EBF for ; Mon, 14 Jun 2010 07:53:49 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id LKIwZqfJzIhtC0vs (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 14 Jun 2010 07:53:49 -0700 (PDT) X-Barracuda-Envelope-From: rok.strnisa@citrix.com X-IronPort-AV: E=Sophos;i="4.53,414,1272844800"; d="scan'208";a="397477" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 14 Jun 2010 14:53:47 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Mon, 14 Jun 2010 15:53:47 +0100 Received: from dhcp-3-235.uk.xensource.com ([10.80.3.235] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OOB2p-0006Fq-9t for xen-api@lists.xensource.com; Mon, 14 Jun 2010 15:53:47 +0100 Content-Type: multipart/mixed; boundary="===============1371020085==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Added support for LV tags. (guards: +rok +matthias) X-Mercurial-Node: 1c7a412b69d30b5a3add95b739de020ee1d5a774 Message-ID: <1c7a412b69d30b5a3add.1276527214@rok-desktop> User-Agent: Mercurial-patchbomb/1.4.3 Date: Mon, 14 Jun 2010 15:53:34 +0100 From: Rok Strnisa To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276527230 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32515 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Added support for LV tags. (guards: +rok +matthias) X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1371020085== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit This includes: - Tag.t type, which encapsulates tag strings; - use of Tag.t consistently throughout the repository; - a simplified mlvm/Makefile; - a simple unit test for checking Tag.is_valid. signed-off-by: Rok Strnisa mlvm/Makefile | 120 +++++++++++++++++++++------------------------ mlvm/lv.ml | 5 +- mlvm/redo.ml | 48 +++++++++--------- mlvm/tag.ml | 14 +++++ mlvm/tag.mli | 13 ++++ mlvm/tag_is_valid_test.ml | 13 ++++ mlvm/test_fragment.ml | 2 +- mlvm/vg.ml | 120 ++++++++++++++++++++++----------------------- 8 files changed, 183 insertions(+), 152 deletions(-) --===============1371020085== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User Rok Strnisa # Date 1276527119 -3600 # Node ID 1c7a412b69d30b5a3add95b739de020ee1d5a774 # Parent 2de29dee356ced22e0cdcfc8822071d96c7c2dfa Added support for LV tags. (guards: +rok +matthias) This includes: - Tag.t type, which encapsulates tag strings; - use of Tag.t consistently throughout the repository; - a simplified mlvm/Makefile; - a simple unit test for checking Tag.is_valid. signed-off-by: Rok Strnisa diff --git a/mlvm/Makefile b/mlvm/Makefile --- a/mlvm/Makefile +++ b/mlvm/Makefile @@ -1,75 +1,62 @@ - -CC = gcc -CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml -LDFLAGS = -cclib -L./ -VERSION = 0.1 - -PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma - -DESTDIR ?= / VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) -OCAMLABI := $(shell ocamlc -version) -OCAMLLIBDIR := $(shell ocamlc -where) -OCAMLDESTDIR ?= $(OCAMLLIBDIR) +OCAMLC = ocamlfind ocamlc -g +OCAMLOPT = ocamlfind ocamlopt +OCAMLYACC = ocamlyacc +OCAMLLEX = ocamllex +PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma +COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I ../rpc-light -for-pack Lvm -pp '${PP}' -LIBOBJS = constants lvm_uuid crc utils absty lvmconfigparser lvmconfiglex lvmmarshal allocator debug redo lv pv vg -INTF = $(foreach obj, $(LIBOBJS),$(obj).cmi) -CMDOBJS = messages.cmx mlvm.cmx -OCAMLC = ocamlfind ocamlc -g -OCAMLOPT = ocamlfind ocamlopt -COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -for-pack Lvm -pp '${PP}' -I ../rpc-light +LIBOBJS = constants lvm_uuid crc utils absty lvmconfigparser lvmconfiglex lvmmarshal allocator debug tag redo lv pv vg +LIBCMXS = $(foreach obj, $(LIBOBJS),$(obj).cmx) +LIBCMOS = $(foreach obj, $(LIBOBJS),$(obj).cmo) +LIBCMIS = $(foreach obj, $(LIBOBJS),$(obj).cmi) + +DESTDIR ?= +DOCDIR = /myrepos/xen-api-libs.hg/doc LIBS = lvm.cma lvm.cmxa -DOCDIR = /myrepos/xen-api-libs.hg/doc +default: $(LIBS) -default : $(LIBS) +lvm.cmx: $(LIBCMXS) + $(OCAMLOPT) -pack -g -o $@ $^ -test_allocator: default - $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I +kaputt unix.cmxa ../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa test_allocator.ml -o $@ - -lvm.cmx: $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmx) - -lvm.cmo: $(foreach obj,$(LIBOBJS),$(obj).cmo) - $(OCAMLC) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmo) +lvm.cmo: $(LIBCMOS) + $(OCAMLC) -pack -g -o $@ $^ lvm.cmxa: lvm.cmx - $(OCAMLOPT) -a -g -o $@ lvm.cmx + $(OCAMLOPT) -a -g -o $@ $^ lvm.cma: lvm.cmo - $(OCAMLC) -a -g -o $@ lvm.cmo + $(OCAMLC) -a -g -o $@ $^ + +lvmconfigparser.ml: lvmconfigparser.mly + $(OCAMLYACC) $< + $(OCAMLOPT) $(COMPFLAG) -c lvmconfigparser.mli + +lvmconfiglex.ml: lvmconfiglex.mll lvmconfigparser.mli + $(OCAMLLEX) $< META: META.in sed 's/@VERSION@/$(VERSION)/g' < $< > $@ -.PHONY: install +.PHONY: install uninstall doc clean install: $(LIBS) META ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore lvm META lvm.cmi lvm.cmxa lvm.cma lvm.a -.PHONY: uninstall uninstall: ocamlfind remove lvm -clean : - rm -f *.cmo *.cmi *.cmx *.o *~ *.annot lvmconfiglex.ml \ - lvmconfigparser.mli lvmconfigparser.ml - rm -f test_allocator test_fragment +doc: $(LIBCMIS) + python ../doc/doc.py $(DOCDIR) "mlvm" "package" "$(LIBOBJS)" "." "stdext,camldm,uuid,unix" "" -.PHONY: doc -doc: $(INTF) - python ../doc/doc.py $(DOCDIR) "mlvm" "package" "$(LIBOBJS)" "." "stdext,camldm,uuid,unix" "" - -lvmconfigparser.ml : lvmconfigparser.mly - ocamlyacc lvmconfigparser.mly - $(OCAMLOPT) $(COMPFLAG) -c lvmconfigparser.mli - -lvmconfiglex.ml : lvmconfiglex.mll lvmconfigparser.mli - ocamllex lvmconfiglex.mll +clean: + rm -f *.cm{o,i,x} *.{annot,o} *~ + rm -f lvmconfiglex.ml lvmconfigparser.ml{,i} + rm -f test_allocator test_fragment tag_is_valid_test .SUFFIXES: .ml .mli .cmo .cmi .cmx - .ml.cmo: $(OCAMLC) $(COMPFLAG) -c $< @@ -79,21 +66,28 @@ lvmconfiglex.ml : lvmconfiglex.mll lvmco .ml.cmx: $(OCAMLOPT) $(COMPFLAG) -c $< -.c.o: - $(OCAMLC) $(COMPFLAG) -c $< +lvmcmd.cmo: messages.cmo +lvmcmd.cmx: messages.cmx +lv.cmo: absty.cmo +lv.cmx: absty.cmx +mlvm.cmo: vg.cmo pv.cmo messages.cmo lv.cmo +mlvm.cmx: vg.cmx pv.cmx messages.cmx lv.cmx +pv.cmo: utils.cmo lvmmarshal.cmo lvm_uuid.cmo crc.cmo constants.cmo allocator.cmo absty.cmo +pv.cmx: utils.cmx lvmmarshal.cmx lvm_uuid.cmx crc.cmx constants.cmx allocator.cmx absty.cmx +vg.cmo: debug.cmo pv.cmo lvm_uuid.cmo lv.cmo allocator.cmo absty.cmo +vg.cmx: debug.cmx pv.cmx lvm_uuid.cmx lv.cmx allocator.cmx absty.cmx +redo.cmo: tag.cmi debug.cmo allocator.cmo +redo.cmx: tag.cmx debug.cmx allocator.cmx +tag.cmo: debug.cmo tag.cmi +tag.cmx: debug.cmx tag.cmi -lvmcmd.cmo: messages.cmo -lvmcmd.cmx: messages.cmx -lv.cmo: absty.cmo -lv.cmx: absty.cmx -mlvm.cmo: vg.cmo pv.cmo messages.cmo lv.cmo -mlvm.cmx: vg.cmx pv.cmx messages.cmx lv.cmx -pv.cmo: utils.cmo lvmmarshal.cmo lvm_uuid.cmo crc.cmo constants.cmo \ - allocator.cmo absty.cmo -pv.cmx: utils.cmx lvmmarshal.cmx lvm_uuid.cmx crc.cmx constants.cmx \ - allocator.cmx absty.cmx -vg.cmo: debug.cmo pv.cmo lvm_uuid.cmo lv.cmo allocator.cmo absty.cmo -vg.cmx: debug.cmx pv.cmx lvm_uuid.cmx lv.cmx allocator.cmx absty.cmx +test_allocator: default + $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I +kaputt $(INCLUDES) ./lvm.cmxa test_allocator.ml -o $@ -test_fragment: default $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid unix.cmxa ../rpc-light/rpc.cmx -I ../rpc-light ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa $(foreach obj,$(LIBOBJS),$(obj).cmx) test_fragment.ml -o $@ \ No newline at end of file +INCLUDES = unix.cmxa str.cmxa ../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa + +test_fragment: lvm.cmxa $(LIBCMXS) test_fragment.ml + $(OCAMLOPT) $(COMPFLAG) $(INCLUDES) $^ -o $@ + +tag_is_valid_test: $(LIBCMXS) tag.cmx tag_is_valid_test.ml + $(OCAMLOPT) $(COMPFLAG) $(INCLUDES) $^ -o $@ \ No newline at end of file diff --git a/mlvm/lv.ml b/mlvm/lv.ml --- a/mlvm/lv.ml +++ b/mlvm/lv.ml @@ -1,4 +1,5 @@ open Absty +open Fun open Listext type stat = @@ -28,7 +29,7 @@ and segment = and logical_volume = { name : string; id : string; - tags : string list; + tags : Tag.t list; status : stat list; segments : segment list; } with rpc @@ -54,7 +55,7 @@ let write_to_buffer b lv = bprintf b "\n%s {\nid = \"%s\"\nstatus = [%s]\n" lv.name lv.id (String.concat ", " (List.map (o quote status_to_string) lv.status)); if List.length lv.tags > 0 then - bprintf b "tags = [%s]\n" (String.concat ", " (List.map quote lv.tags)); + bprintf b "tags = [%s]\n" (String.concat ", " (List.map (quote ++ Tag.string_of) lv.tags)); bprintf b "segment_count = %d\n\n" (List.length lv.segments); Listext.List.iteri (fun i s -> diff --git a/mlvm/redo.ml b/mlvm/redo.ml --- a/mlvm/redo.ml +++ b/mlvm/redo.ml @@ -1,3 +1,4 @@ +open Debug type lvcreate_t = { lvc_id : string; @@ -15,21 +16,21 @@ and lvreduce_t = { and lvexpand_t = { lvex_segments : Allocator.t; } - + +(** First string corresponds to the name of the LV. *) and operation = - | LvCreate of string * lvcreate_t - | LvReduce of string * lvreduce_t - | LvExpand of string * lvexpand_t - | LvRename of string * lvrename_t - | LvRemove of string + | LvCreate of string * lvcreate_t + | LvReduce of string * lvreduce_t + | LvExpand of string * lvexpand_t + | LvRename of string * lvrename_t + | LvRemove of string + | LvAddTag of string * Tag.t and sequenced_op = { so_seqno : int; so_op : operation } with rpc -open Debug - (** Marshal to and from a string *) let redo_to_string (l : sequenced_op) = let s = Marshal.to_string l [] in @@ -98,20 +99,19 @@ let read fd offset size = let reset fd offset = write_initial_pos fd offset (Int64.add offset 12L) - + +(** Converts the redo operation to a human-readable string. *) let redo_to_human_readable op = - let lvcreate_t_to_string l = - Printf.sprintf "{id:'%s', segments:[%s]}" l.lvc_id (Allocator.to_string l.lvc_segments) - in - let lvexpand_t_to_string l = - Printf.sprintf "[%s]" (Allocator.to_string l.lvex_segments) - in - let opstr = - match op.so_op with - | LvCreate (name,lvc) -> Printf.sprintf "LvCreate(%s,%s)" name (lvcreate_t_to_string lvc) - | LvRemove name -> Printf.sprintf "LvRemove(%s)" name - | LvReduce (name,lvrd) -> Printf.sprintf "LvReduce(%s,%Ld)" name lvrd.lvrd_new_extent_count - | LvExpand (name,lvex) -> Printf.sprintf "LvExpand(%s,%s)" name (lvexpand_t_to_string lvex) - | LvRename (name,lvmv) -> Printf.sprintf "LvRename(%s,%s)" name lvmv.lvmv_new_name - in - Printf.sprintf "{seqno=%d; op=%s}" op.so_seqno opstr + let lvcreate_t_to_string l = + Printf.sprintf "{id:'%s', segments:[%s]}" l.lvc_id (Allocator.to_string l.lvc_segments) in + let lvexpand_t_to_string l = + Printf.sprintf "[%s]" (Allocator.to_string l.lvex_segments) in + let opstr = + match op.so_op with + | LvCreate (name,lvc) -> Printf.sprintf "LvCreate(%s,%s)" name (lvcreate_t_to_string lvc) + | LvRemove name -> Printf.sprintf "LvRemove(%s)" name + | LvReduce (name,lvrd) -> Printf.sprintf "LvReduce(%s,%Ld)" name lvrd.lvrd_new_extent_count + | LvExpand (name,lvex) -> Printf.sprintf "LvExpand(%s,%s)" name (lvexpand_t_to_string lvex) + | LvRename (name,lvmv) -> Printf.sprintf "LvRename(%s,%s)" name lvmv.lvmv_new_name + | LvAddTag (name,tag) -> Printf.sprintf "LvAddTag(%s,%s)" name (Tag.string_of tag) in + Printf.sprintf "{seqno=%d; op=%s}" op.so_seqno opstr diff --git a/mlvm/tag.ml b/mlvm/tag.ml new file mode 100644 --- /dev/null +++ b/mlvm/tag.ml @@ -0,0 +1,14 @@ +open Str + +type t = string with rpc + +let tag_regexp = regexp "^[A-Za-z0-9_+.][A-Za-z0-9_+.-]*$" + +let is_valid s = + (String.length s <= 128) && (string_match tag_regexp s 0) + +let of_string s = + if is_valid s then s else failwith "Tag string does not conform to the rules." + +let string_of t = + t diff --git a/mlvm/tag.mli b/mlvm/tag.mli new file mode 100644 --- /dev/null +++ b/mlvm/tag.mli @@ -0,0 +1,13 @@ +type t + +val rpc_of_t : t -> Rpc.t +val t_of_rpc : Rpc.t -> t +(** Checks whether a string is a valid tag string. + Tag character set: A-Za-z0-9_+.- + Can't start with hyphen. Max length is 128. + Empty tags are currently not allowed. *) +val is_valid : string -> bool +(** Creates a tag from a string. Fails on non-conforming strings. *) +val of_string : string -> t +(** Converts a tag to a string. *) +val string_of : t -> string diff --git a/mlvm/tag_is_valid_test.ml b/mlvm/tag_is_valid_test.ml new file mode 100644 --- /dev/null +++ b/mlvm/tag_is_valid_test.ml @@ -0,0 +1,13 @@ +open Tag + +let test_tag_string (should_be_valid, s) = + let is_valid = is_valid s in + let is_valid_string = if is_valid then " VALID" else "INVALID" in + let result = if is_valid = should_be_valid then " CORRECT" else "INCORRECT" in + print_endline (result ^ " --- " ^ is_valid_string ^ " --- '" ^ s ^ "'") + +let test_strings = + [false, ""; true, "abc"; false, "----abc"; true, "abc-----"; false, "abc###"; + true, String.make 128 'y'; false, String.make 129 'n'; true, "_0m_3+3-3.X"] + +let _ = List.map test_tag_string test_strings diff --git a/mlvm/test_fragment.ml b/mlvm/test_fragment.ml --- a/mlvm/test_fragment.ml +++ b/mlvm/test_fragment.ml @@ -1,4 +1,4 @@ -Put them into a library? *) +(* Put them into a library? *) let pvs = "/usr/sbin/pvs" let pvcreate = "/usr/sbin/pvcreate" diff --git a/mlvm/vg.ml b/mlvm/vg.ml --- a/mlvm/vg.ml +++ b/mlvm/vg.ml @@ -74,65 +74,62 @@ let to_string vg = (*************************************************************) let do_op vg op = - (if vg.seqno <> op.so_seqno then failwith "Failing to do VG operation out-of-order"); - Unixext.write_string_to_file (Printf.sprintf "/tmp/redo_op.%d" op.so_seqno) (Redo.redo_to_human_readable op); - let rec createsegs ss lstart = - match ss with - | a::ss -> - let length = Allocator.get_size a in - let pv_name = Allocator.get_name a in - ({Lv.s_start_extent=lstart; s_extent_count=length; - s_cls=Lv.Linear {Lv.l_pv_name=pv_name; - l_pv_start_extent=Allocator.get_start a}})::createsegs ss (Int64.add lstart length) - | _ -> [] - in - let change_lv lv_name fn = - let lv,others = List.partition (fun lv -> lv.Lv.name=lv_name) vg.lvs in - match lv with - | [lv] -> - fn lv others - | _ -> failwith "Unknown LV" - in - let vg = {vg with seqno = vg.seqno + 1; ops=op::vg.ops} in - match op.so_op with - | LvCreate (name,l) -> - let new_free_space = Allocator.alloc_specified_areas vg.free_space l.lvc_segments in - let segments = Lv.sort_segments (createsegs l.lvc_segments 0L) in - let lv = { Lv.name=name; - id=l.lvc_id; - tags=[]; - status=[Lv.Read; Lv.Visible]; - segments=segments } + (if vg.seqno <> op.so_seqno then failwith "Failing to do VG operation out-of-order"); + Unixext.write_string_to_file (Printf.sprintf "/tmp/redo_op.%d" op.so_seqno) (Redo.redo_to_human_readable op); + let rec createsegs ss lstart = + match ss with + | a::ss -> + let length = Allocator.get_size a in + let pv_name = Allocator.get_name a in + ({Lv.s_start_extent = lstart; s_extent_count = length; + s_cls = Lv.Linear {Lv.l_pv_name = pv_name; + l_pv_start_extent=Allocator.get_start a}})::createsegs ss (Int64.add lstart length) + | _ -> [] in - { vg with - lvs = lv::vg.lvs; - free_space=new_free_space } - | LvExpand (name,l) -> - change_lv name (fun lv others -> - let old_size = Lv.size_in_extents lv in - let free_space = Allocator.alloc_specified_areas vg.free_space l.lvex_segments in - let segments = createsegs l.lvex_segments old_size in - let lv = { lv with Lv.segments = Lv.sort_segments (segments @ lv.Lv.segments) } in - { vg with - lvs = lv::others; free_space=free_space}) - | LvReduce (name,l) -> - change_lv name (fun lv others -> - let allocation = Lv.allocation_of_lv lv in - let lv = Lv.reduce_size_to lv l.lvrd_new_extent_count in - let new_allocation = Lv.allocation_of_lv lv in - let free_space = Allocator.alloc_specified_areas (Allocator.free vg.free_space allocation) new_allocation in - {vg with - lvs = lv::others; free_space=free_space}) - | LvRemove name -> - change_lv name (fun lv others -> - let allocation = Lv.allocation_of_lv lv in - { vg with - lvs = others; - free_space = Allocator.free vg.free_space allocation }) - | LvRename (name,l) -> - change_lv name (fun lv others -> - { vg with - lvs = {lv with Lv.name=l.lvmv_new_name}::others }) + let change_lv lv_name fn = + let lv,others = List.partition (fun lv -> lv.Lv.name=lv_name) vg.lvs in + match lv with + | [lv] -> + fn lv others + | _ -> failwith "Unknown LV" + in + let vg = {vg with seqno = vg.seqno + 1; ops=op::vg.ops} in + match op.so_op with + | LvCreate (name,l) -> + let new_free_space = Allocator.alloc_specified_areas vg.free_space l.lvc_segments in + let segments = Lv.sort_segments (createsegs l.lvc_segments 0L) in + let lv = + { Lv.name = name; id = l.lvc_id; tags = []; + status = [Lv.Read; Lv.Visible]; segments = segments } in + {vg with lvs = lv::vg.lvs; free_space = new_free_space} + | LvExpand (name,l) -> + change_lv name (fun lv others -> + let old_size = Lv.size_in_extents lv in + let free_space = Allocator.alloc_specified_areas vg.free_space l.lvex_segments in + let segments = createsegs l.lvex_segments old_size in + let lv = {lv with Lv.segments = Lv.sort_segments (segments @ lv.Lv.segments)} in + {vg with lvs = lv::others; free_space=free_space}) + | LvReduce (name,l) -> + change_lv name (fun lv others -> + let allocation = Lv.allocation_of_lv lv in + let lv = Lv.reduce_size_to lv l.lvrd_new_extent_count in + let new_allocation = Lv.allocation_of_lv lv in + let free_space = Allocator.alloc_specified_areas (Allocator.free vg.free_space allocation) new_allocation in + {vg with + lvs = lv::others; free_space=free_space}) + | LvRemove name -> + change_lv name (fun lv others -> + let allocation = Lv.allocation_of_lv lv in + {vg with lvs = others; free_space = Allocator.free vg.free_space allocation }) + | LvRename (name,l) -> + change_lv name (fun lv others -> + {vg with lvs = {lv with Lv.name=l.lvmv_new_name}::others }) + | LvAddTag (name, tag) -> + change_lv name (fun lv others -> + let tags = lv.Lv.tags in + let lv' = {lv with Lv.tags = if List.mem tag tags then tags else tag::tags} in + {vg with lvs = lv'::others}) + let create_lv vg name size = let id = Lvm_uuid.create () in @@ -159,12 +156,11 @@ let resize_lv vg name new_size = let remove_lv vg name = do_op vg {so_seqno=vg.seqno; so_op=LvRemove name} +let add_tag_lv vg name tag = + do_op vg {so_seqno = vg.seqno; so_op = LvAddTag (name, tag)} + (******************************************************************************) - - - - let human_readable vg = let pv_strings = List.map Pv.human_readable vg.pvs in String.concat "\n" pv_strings --===============1371020085== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1371020085==-- From xen-api-bounces@lists.xensource.com Mon Jun 14 14:09:31 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 14 Jun 2010 14:09:31 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OOGuR-0002o4-7u; Mon, 14 Jun 2010 14:09:31 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OOGuL-0002mM-9P for xen-api@lists.xensource.com; Mon, 14 Jun 2010 14:09:25 -0700 X-ASG-Debug-ID: 1276549763-446b006c0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id D15702994B6 for ; Mon, 14 Jun 2010 14:09:24 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id uo8ypPt8DRiVexsF (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 14 Jun 2010 14:09:24 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,416,1272844800"; d="scan'208";a="402416" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 14 Jun 2010 21:09:22 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Mon, 14 Jun 2010 22:09:22 +0100 Received: from drall.uk.xensource.com ([10.80.227.107]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OOGuI-0001hM-CQ for xen-api@lists.xensource.com; Mon, 14 Jun 2010 22:09:22 +0100 Content-Type: multipart/mixed; boundary="===============8079442428922874778==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] set scheduler parameters after resume/migrate X-Mercurial-Node: 5231634311a46e83ab8af74c8476ba5f0a632fc7 Message-ID: <5231634311a46e83ab8a.1276549756@drall.uk.xensource.com> Date: Mon, 14 Jun 2010 22:09:16 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276549764 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32538 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Subject: [Xen-API] [PATCH] set scheduler parameters after resume/migrate X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============8079442428922874778== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1276549708 -3600 # Node ID 5231634311a46e83ab8af74c8476ba5f0a632fc7 # Parent 2ab7bcee7d0f3b538067da69dfbeadd25e812681 Bug #1614: scheduler weight/cap and affinity values are lost over a migrate A call to "configure_vcpus" was present in the build (ie boot) path but missing in the restore (ie resume, migrate) path. Signed-off-by: David Scott diff -r 2ab7bcee7d0f -r 5231634311a4 ocaml/xenguest/xenguest_stubs.c --- a/ocaml/xenguest/xenguest_stubs.c Mon Jun 07 16:07:06 2010 +0100 +++ b/ocaml/xenguest/xenguest_stubs.c Mon Jun 14 22:08:28 2010 +0100 @@ -438,6 +438,7 @@ #ifdef HVM_PARAM_VIRIDIAN xc_set_hvm_param(_H(handle), _D(domid), HVM_PARAM_VIRIDIAN, f.viridian); #endif + configure_vcpus(_H(handle), _D(domid), f); caml_enter_blocking_section(); r = xc_domain_restore(_H(handle), Int_val(fd), _D(domid), 1 file changed, 1 insertion(+) ocaml/xenguest/xenguest_stubs.c | 1 + --===============8079442428922874778== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User David Scott # Date 1276549708 -3600 # Node ID 5231634311a46e83ab8af74c8476ba5f0a632fc7 # Parent 2ab7bcee7d0f3b538067da69dfbeadd25e812681 Bug #1614: scheduler weight/cap and affinity values are lost over a migrate A call to "configure_vcpus" was present in the build (ie boot) path but missing in the restore (ie resume, migrate) path. Signed-off-by: David Scott diff -r 2ab7bcee7d0f -r 5231634311a4 ocaml/xenguest/xenguest_stubs.c --- a/ocaml/xenguest/xenguest_stubs.c Mon Jun 07 16:07:06 2010 +0100 +++ b/ocaml/xenguest/xenguest_stubs.c Mon Jun 14 22:08:28 2010 +0100 @@ -438,6 +438,7 @@ #ifdef HVM_PARAM_VIRIDIAN xc_set_hvm_param(_H(handle), _D(domid), HVM_PARAM_VIRIDIAN, f.viridian); #endif + configure_vcpus(_H(handle), _D(domid), f); caml_enter_blocking_section(); r = xc_domain_restore(_H(handle), Int_val(fd), _D(domid), --===============8079442428922874778== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============8079442428922874778==-- From xen-api-bounces@lists.xensource.com Tue Jun 15 07:38:28 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 15 Jun 2010 07:38:28 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OOXHY-0006GF-Ew; Tue, 15 Jun 2010 07:38:28 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OOXHR-0006EC-MD for xen-api@lists.xensource.com; Tue, 15 Jun 2010 07:38:21 -0700 X-ASG-Debug-ID: 1276612697-5dd200060000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 9284E299E6F for ; Tue, 15 Jun 2010 07:38:18 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 5rPOfpXjQ1KPk5xx (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 15 Jun 2010 07:38:18 -0700 (PDT) X-Barracuda-Envelope-From: rok.strnisa@citrix.com X-IronPort-AV: E=Sophos;i="4.53,420,1272844800"; d="scan'208";a="418153" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 15 Jun 2010 14:38:17 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Tue, 15 Jun 2010 15:38:16 +0100 Received: from dhcp-3-235.uk.xensource.com ([10.80.3.235] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OOXHM-0002yv-JH; Tue, 15 Jun 2010 15:38:16 +0100 Content-Type: multipart/mixed; boundary="===============1524722804==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Added support for LV tags. (guards: +vhdd) X-Mercurial-Node: 2af547c0b754b6e4d71740c495df791d55091396 Message-ID: <2af547c0b754b6e4d717.1276612665@rok-desktop> User-Agent: Mercurial-patchbomb/1.4.3 Date: Tue, 15 Jun 2010 15:37:45 +0100 From: Rok Strnisa To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276612700 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32591 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Cc: rok.strnisa@citrix.com Subject: [Xen-API] [PATCH] Added support for LV tags. (guards: +vhdd) X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1524722804== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit This includes: - Tag.t type, which encapsulates tag strings; - use of Tag.t consistently throughout the repository; - a simplified mlvm/Makefile; - a simple unit test for checking Tag.is_valid. signed-off-by: Rok Strnisa mlvm/Makefile | 120 +++++++++++++++++++++------------------------ mlvm/lv.ml | 5 +- mlvm/redo.ml | 48 +++++++++--------- mlvm/tag.ml | 28 ++++++++++ mlvm/tag.mli | 13 ++++ mlvm/tag_is_valid_test.ml | 13 ++++ mlvm/test_fragment.ml | 2 +- mlvm/vg.ml | 120 ++++++++++++++++++++++----------------------- 8 files changed, 197 insertions(+), 152 deletions(-) --===============1524722804== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User Rok Strnisa # Date 1276612644 -3600 # Node ID 2af547c0b754b6e4d71740c495df791d55091396 # Parent 558a05063163531d4efb50fc6e511f3b4faa7742 Added support for LV tags. (guards: +vhdd) This includes: - Tag.t type, which encapsulates tag strings; - use of Tag.t consistently throughout the repository; - a simplified mlvm/Makefile; - a simple unit test for checking Tag.is_valid. signed-off-by: Rok Strnisa diff --git a/mlvm/Makefile b/mlvm/Makefile --- a/mlvm/Makefile +++ b/mlvm/Makefile @@ -1,75 +1,62 @@ - -CC = gcc -CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml -LDFLAGS = -cclib -L./ -VERSION = 0.1 - -PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma - -DESTDIR ?= / VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) -OCAMLABI := $(shell ocamlc -version) -OCAMLLIBDIR := $(shell ocamlc -where) -OCAMLDESTDIR ?= $(OCAMLLIBDIR) +OCAMLC = ocamlfind ocamlc -g +OCAMLOPT = ocamlfind ocamlopt +OCAMLYACC = ocamlyacc +OCAMLLEX = ocamllex +PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma +COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I ../rpc-light -for-pack Lvm -pp '${PP}' -LIBOBJS = constants lvm_uuid crc utils absty lvmconfigparser lvmconfiglex lvmmarshal allocator debug redo lv pv vg -INTF = $(foreach obj, $(LIBOBJS),$(obj).cmi) -CMDOBJS = messages.cmx mlvm.cmx -OCAMLC = ocamlfind ocamlc -g -OCAMLOPT = ocamlfind ocamlopt -COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -for-pack Lvm -pp '${PP}' -I ../rpc-light +LIBOBJS = constants lvm_uuid crc utils absty lvmconfigparser lvmconfiglex lvmmarshal allocator debug tag redo lv pv vg +LIBCMXS = $(foreach obj, $(LIBOBJS),$(obj).cmx) +LIBCMOS = $(foreach obj, $(LIBOBJS),$(obj).cmo) +LIBCMIS = $(foreach obj, $(LIBOBJS),$(obj).cmi) + +DESTDIR ?= +DOCDIR = /myrepos/xen-api-libs.hg/doc LIBS = lvm.cma lvm.cmxa -DOCDIR = /myrepos/xen-api-libs.hg/doc +default: $(LIBS) -default : $(LIBS) +lvm.cmx: $(LIBCMXS) + $(OCAMLOPT) -pack -g -o $@ $^ -test_allocator: default - $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I +kaputt unix.cmxa ../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa test_allocator.ml -o $@ - -lvm.cmx: $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmx) - -lvm.cmo: $(foreach obj,$(LIBOBJS),$(obj).cmo) - $(OCAMLC) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmo) +lvm.cmo: $(LIBCMOS) + $(OCAMLC) -pack -g -o $@ $^ lvm.cmxa: lvm.cmx - $(OCAMLOPT) -a -g -o $@ lvm.cmx + $(OCAMLOPT) -a -g -o $@ $^ lvm.cma: lvm.cmo - $(OCAMLC) -a -g -o $@ lvm.cmo + $(OCAMLC) -a -g -o $@ $^ + +lvmconfigparser.ml: lvmconfigparser.mly + $(OCAMLYACC) $< + $(OCAMLOPT) $(COMPFLAG) -c lvmconfigparser.mli + +lvmconfiglex.ml: lvmconfiglex.mll lvmconfigparser.mli + $(OCAMLLEX) $< META: META.in sed 's/@VERSION@/$(VERSION)/g' < $< > $@ -.PHONY: install +.PHONY: install uninstall doc clean install: $(LIBS) META ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore lvm META lvm.cmi lvm.cmxa lvm.cma lvm.a -.PHONY: uninstall uninstall: ocamlfind remove lvm -clean : - rm -f *.cmo *.cmi *.cmx *.o *~ *.annot lvmconfiglex.ml \ - lvmconfigparser.mli lvmconfigparser.ml - rm -f test_allocator test_fragment +doc: $(LIBCMIS) + python ../doc/doc.py $(DOCDIR) "mlvm" "package" "$(LIBOBJS)" "." "stdext,camldm,uuid,unix" "" -.PHONY: doc -doc: $(INTF) - python ../doc/doc.py $(DOCDIR) "mlvm" "package" "$(LIBOBJS)" "." "stdext,camldm,uuid,unix" "" - -lvmconfigparser.ml : lvmconfigparser.mly - ocamlyacc lvmconfigparser.mly - $(OCAMLOPT) $(COMPFLAG) -c lvmconfigparser.mli - -lvmconfiglex.ml : lvmconfiglex.mll lvmconfigparser.mli - ocamllex lvmconfiglex.mll +clean: + rm -f *.cm{o,i,x} *.{annot,o} *~ + rm -f lvmconfiglex.ml lvmconfigparser.ml{,i} + rm -f test_allocator test_fragment tag_is_valid_test .SUFFIXES: .ml .mli .cmo .cmi .cmx - .ml.cmo: $(OCAMLC) $(COMPFLAG) -c $< @@ -79,21 +66,28 @@ lvmconfiglex.ml : lvmconfiglex.mll lvmco .ml.cmx: $(OCAMLOPT) $(COMPFLAG) -c $< -.c.o: - $(OCAMLC) $(COMPFLAG) -c $< +lvmcmd.cmo: messages.cmo +lvmcmd.cmx: messages.cmx +lv.cmo: absty.cmo +lv.cmx: absty.cmx +mlvm.cmo: vg.cmo pv.cmo messages.cmo lv.cmo +mlvm.cmx: vg.cmx pv.cmx messages.cmx lv.cmx +pv.cmo: utils.cmo lvmmarshal.cmo lvm_uuid.cmo crc.cmo constants.cmo allocator.cmo absty.cmo +pv.cmx: utils.cmx lvmmarshal.cmx lvm_uuid.cmx crc.cmx constants.cmx allocator.cmx absty.cmx +vg.cmo: debug.cmo pv.cmo lvm_uuid.cmo lv.cmo allocator.cmo absty.cmo +vg.cmx: debug.cmx pv.cmx lvm_uuid.cmx lv.cmx allocator.cmx absty.cmx +redo.cmo: tag.cmi debug.cmo allocator.cmo +redo.cmx: tag.cmx debug.cmx allocator.cmx +tag.cmo: debug.cmo tag.cmi +tag.cmx: debug.cmx tag.cmi -lvmcmd.cmo: messages.cmo -lvmcmd.cmx: messages.cmx -lv.cmo: absty.cmo -lv.cmx: absty.cmx -mlvm.cmo: vg.cmo pv.cmo messages.cmo lv.cmo -mlvm.cmx: vg.cmx pv.cmx messages.cmx lv.cmx -pv.cmo: utils.cmo lvmmarshal.cmo lvm_uuid.cmo crc.cmo constants.cmo \ - allocator.cmo absty.cmo -pv.cmx: utils.cmx lvmmarshal.cmx lvm_uuid.cmx crc.cmx constants.cmx \ - allocator.cmx absty.cmx -vg.cmo: debug.cmo pv.cmo lvm_uuid.cmo lv.cmo allocator.cmo absty.cmo -vg.cmx: debug.cmx pv.cmx lvm_uuid.cmx lv.cmx allocator.cmx absty.cmx +test_allocator: default + $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid -I +kaputt $(INCLUDES) ./lvm.cmxa test_allocator.ml -o $@ -test_fragment: default $(foreach obj,$(LIBOBJS),$(obj).cmx) - $(OCAMLOPT) -linkpkg -dtypes -g -I ../stdext -I ../camldm -I ../uuid unix.cmxa ../rpc-light/rpc.cmx -I ../rpc-light ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa ./lvm.cmxa $(foreach obj,$(LIBOBJS),$(obj).cmx) test_fragment.ml -o $@ \ No newline at end of file +INCLUDES = unix.cmxa ../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa ../stdext/stdext.cmxa + +test_fragment: lvm.cmxa $(LIBCMXS) test_fragment.ml + $(OCAMLOPT) $(COMPFLAG) $(INCLUDES) $^ -o $@ + +tag_is_valid_test: $(LIBCMXS) tag.cmx tag_is_valid_test.ml + $(OCAMLOPT) $(COMPFLAG) $(INCLUDES) $^ -o $@ \ No newline at end of file diff --git a/mlvm/lv.ml b/mlvm/lv.ml --- a/mlvm/lv.ml +++ b/mlvm/lv.ml @@ -1,4 +1,5 @@ open Absty +open Fun open Listext type stat = @@ -28,7 +29,7 @@ and segment = and logical_volume = { name : string; id : string; - tags : string list; + tags : Tag.t list; status : stat list; segments : segment list; } with rpc @@ -54,7 +55,7 @@ let write_to_buffer b lv = bprintf b "\n%s {\nid = \"%s\"\nstatus = [%s]\n" lv.name lv.id (String.concat ", " (List.map (o quote status_to_string) lv.status)); if List.length lv.tags > 0 then - bprintf b "tags = [%s]\n" (String.concat ", " (List.map quote lv.tags)); + bprintf b "tags = [%s]\n" (String.concat ", " (List.map (quote ++ Tag.string_of) lv.tags)); bprintf b "segment_count = %d\n\n" (List.length lv.segments); Listext.List.iteri (fun i s -> diff --git a/mlvm/redo.ml b/mlvm/redo.ml --- a/mlvm/redo.ml +++ b/mlvm/redo.ml @@ -1,3 +1,4 @@ +open Debug type lvcreate_t = { lvc_id : string; @@ -15,21 +16,21 @@ and lvreduce_t = { and lvexpand_t = { lvex_segments : Allocator.t; } - + +(** First string corresponds to the name of the LV. *) and operation = - | LvCreate of string * lvcreate_t - | LvReduce of string * lvreduce_t - | LvExpand of string * lvexpand_t - | LvRename of string * lvrename_t - | LvRemove of string + | LvCreate of string * lvcreate_t + | LvReduce of string * lvreduce_t + | LvExpand of string * lvexpand_t + | LvRename of string * lvrename_t + | LvRemove of string + | LvAddTag of string * Tag.t and sequenced_op = { so_seqno : int; so_op : operation } with rpc -open Debug - (** Marshal to and from a string *) let redo_to_string (l : sequenced_op) = let s = Marshal.to_string l [] in @@ -98,20 +99,19 @@ let read fd offset size = let reset fd offset = write_initial_pos fd offset (Int64.add offset 12L) - + +(** Converts the redo operation to a human-readable string. *) let redo_to_human_readable op = - let lvcreate_t_to_string l = - Printf.sprintf "{id:'%s', segments:[%s]}" l.lvc_id (Allocator.to_string l.lvc_segments) - in - let lvexpand_t_to_string l = - Printf.sprintf "[%s]" (Allocator.to_string l.lvex_segments) - in - let opstr = - match op.so_op with - | LvCreate (name,lvc) -> Printf.sprintf "LvCreate(%s,%s)" name (lvcreate_t_to_string lvc) - | LvRemove name -> Printf.sprintf "LvRemove(%s)" name - | LvReduce (name,lvrd) -> Printf.sprintf "LvReduce(%s,%Ld)" name lvrd.lvrd_new_extent_count - | LvExpand (name,lvex) -> Printf.sprintf "LvExpand(%s,%s)" name (lvexpand_t_to_string lvex) - | LvRename (name,lvmv) -> Printf.sprintf "LvRename(%s,%s)" name lvmv.lvmv_new_name - in - Printf.sprintf "{seqno=%d; op=%s}" op.so_seqno opstr + let lvcreate_t_to_string l = + Printf.sprintf "{id:'%s', segments:[%s]}" l.lvc_id (Allocator.to_string l.lvc_segments) in + let lvexpand_t_to_string l = + Printf.sprintf "[%s]" (Allocator.to_string l.lvex_segments) in + let opstr = + match op.so_op with + | LvCreate (name,lvc) -> Printf.sprintf "LvCreate(%s,%s)" name (lvcreate_t_to_string lvc) + | LvRemove name -> Printf.sprintf "LvRemove(%s)" name + | LvReduce (name,lvrd) -> Printf.sprintf "LvReduce(%s,%Ld)" name lvrd.lvrd_new_extent_count + | LvExpand (name,lvex) -> Printf.sprintf "LvExpand(%s,%s)" name (lvexpand_t_to_string lvex) + | LvRename (name,lvmv) -> Printf.sprintf "LvRename(%s,%s)" name lvmv.lvmv_new_name + | LvAddTag (name,tag) -> Printf.sprintf "LvAddTag(%s,%s)" name (Tag.string_of tag) in + Printf.sprintf "{seqno=%d; op=%s}" op.so_seqno opstr diff --git a/mlvm/tag.ml b/mlvm/tag.ml new file mode 100644 --- /dev/null +++ b/mlvm/tag.ml @@ -0,0 +1,28 @@ +open Stringext + +type t = string with rpc + +module CharSet = Set.Make(struct type t = char let compare = compare end) + +let first_char_list = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_+." + +let first_char_set = String.fold_left (fun set x -> CharSet.add x set) CharSet.empty first_char_list + +let other_char_set = CharSet.add '-' first_char_set + +(** This function assumes "String.length s = len" and "len > 0". *) +let has_valid_chars s len = + if not (CharSet.mem s.[0] first_char_set) then false else + let rec check_char_at i = (* Tail-recursion. *) + (i >= len) || (CharSet.mem s.[i] other_char_set && check_char_at (i + 1)) in + check_char_at 1 + +let is_valid s = + let len = String.length s in + (0 < len) && (len <= 128) && (has_valid_chars s len) + +let of_string s = + if is_valid s then s else failwith "Tag string does not conform to the rules." + +let string_of t = + t diff --git a/mlvm/tag.mli b/mlvm/tag.mli new file mode 100644 --- /dev/null +++ b/mlvm/tag.mli @@ -0,0 +1,13 @@ +type t + +val rpc_of_t : t -> Rpc.t +val t_of_rpc : Rpc.t -> t +(** Checks whether a string is a valid tag string. + Tag character set: A-Za-z0-9_+.- + Can't start with hyphen. Max length is 128. + Empty tags are currently not allowed. *) +val is_valid : string -> bool +(** Creates a tag from a string. Fails on non-conforming strings. *) +val of_string : string -> t +(** Converts a tag to a string. *) +val string_of : t -> string diff --git a/mlvm/tag_is_valid_test.ml b/mlvm/tag_is_valid_test.ml new file mode 100644 --- /dev/null +++ b/mlvm/tag_is_valid_test.ml @@ -0,0 +1,13 @@ +open Tag + +let test_tag_string (should_be_valid, s) = + let is_valid = is_valid s in + let is_valid_string = if is_valid then " VALID" else "INVALID" in + let result = if is_valid = should_be_valid then " CORRECT" else "INCORRECT" in + print_endline (result ^ " --- " ^ is_valid_string ^ " --- '" ^ s ^ "'") + +let test_strings = + [false, ""; true, "abc"; false, "----abc"; true, "abc-----"; false, "abc###"; + true, String.make 128 'y'; false, String.make 129 'n'; true, "_0m_3+3-3.X"] + +let _ = List.map test_tag_string test_strings diff --git a/mlvm/test_fragment.ml b/mlvm/test_fragment.ml --- a/mlvm/test_fragment.ml +++ b/mlvm/test_fragment.ml @@ -1,4 +1,4 @@ -Put them into a library? *) +(* Put them into a library? *) let pvs = "/usr/sbin/pvs" let pvcreate = "/usr/sbin/pvcreate" diff --git a/mlvm/vg.ml b/mlvm/vg.ml --- a/mlvm/vg.ml +++ b/mlvm/vg.ml @@ -74,65 +74,62 @@ let to_string vg = (*************************************************************) let do_op vg op = - (if vg.seqno <> op.so_seqno then failwith "Failing to do VG operation out-of-order"); - Unixext.write_string_to_file (Printf.sprintf "/tmp/redo_op.%d" op.so_seqno) (Redo.redo_to_human_readable op); - let rec createsegs ss lstart = - match ss with - | a::ss -> - let length = Allocator.get_size a in - let pv_name = Allocator.get_name a in - ({Lv.s_start_extent=lstart; s_extent_count=length; - s_cls=Lv.Linear {Lv.l_pv_name=pv_name; - l_pv_start_extent=Allocator.get_start a}})::createsegs ss (Int64.add lstart length) - | _ -> [] - in - let change_lv lv_name fn = - let lv,others = List.partition (fun lv -> lv.Lv.name=lv_name) vg.lvs in - match lv with - | [lv] -> - fn lv others - | _ -> failwith "Unknown LV" - in - let vg = {vg with seqno = vg.seqno + 1; ops=op::vg.ops} in - match op.so_op with - | LvCreate (name,l) -> - let new_free_space = Allocator.alloc_specified_areas vg.free_space l.lvc_segments in - let segments = Lv.sort_segments (createsegs l.lvc_segments 0L) in - let lv = { Lv.name=name; - id=l.lvc_id; - tags=[]; - status=[Lv.Read; Lv.Visible]; - segments=segments } + (if vg.seqno <> op.so_seqno then failwith "Failing to do VG operation out-of-order"); + Unixext.write_string_to_file (Printf.sprintf "/tmp/redo_op.%d" op.so_seqno) (Redo.redo_to_human_readable op); + let rec createsegs ss lstart = + match ss with + | a::ss -> + let length = Allocator.get_size a in + let pv_name = Allocator.get_name a in + ({Lv.s_start_extent = lstart; s_extent_count = length; + s_cls = Lv.Linear {Lv.l_pv_name = pv_name; + l_pv_start_extent=Allocator.get_start a}})::createsegs ss (Int64.add lstart length) + | _ -> [] in - { vg with - lvs = lv::vg.lvs; - free_space=new_free_space } - | LvExpand (name,l) -> - change_lv name (fun lv others -> - let old_size = Lv.size_in_extents lv in - let free_space = Allocator.alloc_specified_areas vg.free_space l.lvex_segments in - let segments = createsegs l.lvex_segments old_size in - let lv = { lv with Lv.segments = Lv.sort_segments (segments @ lv.Lv.segments) } in - { vg with - lvs = lv::others; free_space=free_space}) - | LvReduce (name,l) -> - change_lv name (fun lv others -> - let allocation = Lv.allocation_of_lv lv in - let lv = Lv.reduce_size_to lv l.lvrd_new_extent_count in - let new_allocation = Lv.allocation_of_lv lv in - let free_space = Allocator.alloc_specified_areas (Allocator.free vg.free_space allocation) new_allocation in - {vg with - lvs = lv::others; free_space=free_space}) - | LvRemove name -> - change_lv name (fun lv others -> - let allocation = Lv.allocation_of_lv lv in - { vg with - lvs = others; - free_space = Allocator.free vg.free_space allocation }) - | LvRename (name,l) -> - change_lv name (fun lv others -> - { vg with - lvs = {lv with Lv.name=l.lvmv_new_name}::others }) + let change_lv lv_name fn = + let lv,others = List.partition (fun lv -> lv.Lv.name=lv_name) vg.lvs in + match lv with + | [lv] -> + fn lv others + | _ -> failwith "Unknown LV" + in + let vg = {vg with seqno = vg.seqno + 1; ops=op::vg.ops} in + match op.so_op with + | LvCreate (name,l) -> + let new_free_space = Allocator.alloc_specified_areas vg.free_space l.lvc_segments in + let segments = Lv.sort_segments (createsegs l.lvc_segments 0L) in + let lv = + { Lv.name = name; id = l.lvc_id; tags = []; + status = [Lv.Read; Lv.Visible]; segments = segments } in + {vg with lvs = lv::vg.lvs; free_space = new_free_space} + | LvExpand (name,l) -> + change_lv name (fun lv others -> + let old_size = Lv.size_in_extents lv in + let free_space = Allocator.alloc_specified_areas vg.free_space l.lvex_segments in + let segments = createsegs l.lvex_segments old_size in + let lv = {lv with Lv.segments = Lv.sort_segments (segments @ lv.Lv.segments)} in + {vg with lvs = lv::others; free_space=free_space}) + | LvReduce (name,l) -> + change_lv name (fun lv others -> + let allocation = Lv.allocation_of_lv lv in + let lv = Lv.reduce_size_to lv l.lvrd_new_extent_count in + let new_allocation = Lv.allocation_of_lv lv in + let free_space = Allocator.alloc_specified_areas (Allocator.free vg.free_space allocation) new_allocation in + {vg with + lvs = lv::others; free_space=free_space}) + | LvRemove name -> + change_lv name (fun lv others -> + let allocation = Lv.allocation_of_lv lv in + {vg with lvs = others; free_space = Allocator.free vg.free_space allocation }) + | LvRename (name,l) -> + change_lv name (fun lv others -> + {vg with lvs = {lv with Lv.name=l.lvmv_new_name}::others }) + | LvAddTag (name, tag) -> + change_lv name (fun lv others -> + let tags = lv.Lv.tags in + let lv' = {lv with Lv.tags = if List.mem tag tags then tags else tag::tags} in + {vg with lvs = lv'::others}) + let create_lv vg name size = let id = Lvm_uuid.create () in @@ -159,12 +156,11 @@ let resize_lv vg name new_size = let remove_lv vg name = do_op vg {so_seqno=vg.seqno; so_op=LvRemove name} +let add_tag_lv vg name tag = + do_op vg {so_seqno = vg.seqno; so_op = LvAddTag (name, tag)} + (******************************************************************************) - - - - let human_readable vg = let pv_strings = List.map Pv.human_readable vg.pvs in String.concat "\n" pv_strings --===============1524722804== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1524722804==-- From xen-api-bounces@lists.xensource.com Tue Jun 15 10:16:09 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 15 Jun 2010 10:16:09 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OOZk8-0001FQ-HC; Tue, 15 Jun 2010 10:16:09 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OOZjy-0001Cw-M1 for xen-api@lists.xensource.com; Tue, 15 Jun 2010 10:15:59 -0700 X-ASG-Debug-ID: 1276622156-353400230000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 385B4299F24 for ; Tue, 15 Jun 2010 10:15:57 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id G2kaUS15pCOK5YgW (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 15 Jun 2010 10:15:57 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,421,1272844800"; d="scan'208";a="421253" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 15 Jun 2010 17:15:56 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Tue, 15 Jun 2010 18:15:56 +0100 From: Dave Scott To: George Dunlap , "xen-api@lists.xensource.com" , Jonathan Knowles Date: Tue, 15 Jun 2010 18:15:56 +0100 X-ASG-Orig-Subj: RE: [Xen-API] [RFC] Ballooning and live migration Subject: RE: [Xen-API] [RFC] Ballooning and live migration Thread-Topic: [Xen-API] [RFC] Ballooning and live migration Thread-Index: AcsHFGRfzQC3wFYASBm5vx7THs5czQFl8Q9A Message-ID: <81A73678E76EA642801C8F2E4823AD21807FFE6988@LONPMAILBOX01.citrite.net> References: <4C0E29CF.10407@eu.citrix.com> In-Reply-To: <4C0E29CF.10407@eu.citrix.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276622158 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.01 X-Barracuda-Spam-Status: No, SCORE=0.01 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_SC0_SA_TO_FROM_DOMAIN_MATCH X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32600 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.01 BSF_SC0_SA_TO_FROM_DOMAIN_MATCH Sender Domain Matches Recipient Domain Cc: X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi George, > At the moment (and as of the latest XenServer release), when migrating > a > VM, it is first ballooned down to static-min before the migration > happens. I don't think this is the right behavior; my sense is that > there's little or no benefit, and a big potential cost. So I'd like to > open up a discussion on the topic. >=20 > I don't know the reason this behavior was decided, so I have go guess. > Two reasons that come to mind are: > 1. To reduce the network cost of migrating (lower memory -> fewer pages > transferred) > 2. To simplify logic of memory Yeah, I think it was a mix of these. > #1 I don't think is actually true. Migration can only happen when the > disk is on shared storage across a network. When the balloon driver > inflates the balloon, dirty pages will be written to disk; and assuming > the data was somehow useful, they'll be read back in on the other side > when the balloon is deflated. So on the whole, the total number of > pages over the network won't decrease; they'll just switch from > migration traffic to disk traffic. I think we hoped that less useful data would be discarded... but I take you= r point that, if the data is useful, then it doesn't save anything :) > As for #2, I think that the following is simple enough: > * If free memory on migration target host >=3D VM memory target, just > transfer as is. > * If free memory on migration taget host < VM memory target, balloon > down to free memory. I think I agree that if the memory is completely free on the target then it= 's sensible to just transfer as-is. If the memory isn't free on the target then we might have a choice about wh= ich VMs to balloon: the VMs running on the target or the VM-to-be-migrated = or both. Do you have an opinion as to which is better? In the case of VM.st= art we figure out what our target would be after the VM has started and hos= t memory is rebalanced, assuming no other VMs appear -- we could do a simil= ar thing in migrate perhaps. Cheers, Dave >=20 > As for the cost: of course ballooning down has a cost, both in terms of > cpu cycles spent, and dirty pages transferred over the network; and > there's the cost on the other side of re-filling any pages that were > swapped out. Furthermore, if the working set is greater than than > static min, then ballooning down will cause the VM to thrash for the > period of time while it's migrating, which is much worse than having a > slightly longer migration time. >=20 > Thoughts? >=20 > -George >=20 >=20 > _______________________________________________ > xen-api mailing list > xen-api@lists.xensource.com > http://lists.xensource.com/mailman/listinfo/xen-api _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 16 04:21:55 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 16 Jun 2010 04:21:55 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OOqgs-0003Lg-9Z; Wed, 16 Jun 2010 04:21:54 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OOqgf-0003JK-LB for xen-api@lists.xensource.com; Wed, 16 Jun 2010 04:21:41 -0700 X-ASG-Debug-ID: 1276687298-3179004e0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 865EE2970E8 for ; Wed, 16 Jun 2010 04:21:39 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id GVA1Nlt51hyTftD1 (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 16 Jun 2010 04:21:39 -0700 (PDT) X-Barracuda-Envelope-From: George.Dunlap@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,426,1272844800"; d="scan'208";a="433931" Received: from lonpexchmx01.citrite.net ([10.30.224.191]) by LONPIPO01.EU.CITRIX.COM with ESMTP; 16 Jun 2010 11:21:38 +0000 Received: from [10.80.2.24] ([10.80.2.24]) by lonpexchmx01.citrite.net with Microsoft SMTPSVC(6.0.3790.4675); Wed, 16 Jun 2010 12:21:38 +0100 Message-ID: <4C18B419.1090802@eu.citrix.com> Date: Wed, 16 Jun 2010 12:23:05 +0100 From: George Dunlap User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Dave Scott X-ASG-Orig-Subj: Re: [Xen-API] [RFC] Ballooning and live migration Subject: Re: [Xen-API] [RFC] Ballooning and live migration References: <4C0E29CF.10407@eu.citrix.com> <81A73678E76EA642801C8F2E4823AD21807FFE6988@LONPMAILBOX01.citrite.net> In-Reply-To: <81A73678E76EA642801C8F2E4823AD21807FFE6988@LONPMAILBOX01.citrite.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Jun 2010 11:21:38.0027 (UTC) FILETIME=[16202BB0:01CB0D46] X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276687300 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.01 X-Barracuda-Spam-Status: No, SCORE=0.01 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_SC0_SA_TO_FROM_DOMAIN_MATCH X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32670 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.01 BSF_SC0_SA_TO_FROM_DOMAIN_MATCH Sender Domain Matches Recipient Domain Cc: Jonathan Knowles , "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Dave Scott wrote: >> As for #2, I think that the following is simple enough: >> * If free memory on migration target host >= VM memory target, just >> transfer as is. >> * If free memory on migration taget host < VM memory target, balloon >> down to free memory. > > I think I agree that if the memory is completely free on the target then it's sensible to just transfer as-is. > > If the memory isn't free on the target then we might have a choice about which VMs to balloon: the VMs running on the target or the VM-to-be-migrated or both. Do you have an opinion as to which is better? In the case of VM.start we figure out what our target would be after the VM has started and host memory is rebalanced, assuming no other VMs appear -- we could do a similar thing in migrate perhaps. Obviously that's a policy thing. I chose the principles above because they were simple. :-) Since we don't have any measurement of VM memory pressure at the moment, I suppose a logical thing to do would be to treat a migration on the target host similar to how we would treat VM creation, wrt chosing new memory targets for running VMs, and the new VM. It's basically the same problem, of deciding how much memory the new (to this host) VM should have, and taking it from other VMs. The target can be chosen by the new host, passed to the old host, and if new_target < current_target, the VM can be ballooned down before migrating. But I don't have an idea how complex that would be to implement. :-) -George _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 16 08:32:01 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 16 Jun 2010 08:32:01 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OOuat-0003ft-3D; Wed, 16 Jun 2010 08:31:59 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OOuaf-0003dX-6Y for xen-api@lists.xensource.com; Wed, 16 Jun 2010 08:31:45 -0700 X-ASG-Debug-ID: 1276702303-6eaf00080000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from service.paris5.org (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id A256229A72A for ; Wed, 16 Jun 2010 08:31:44 -0700 (PDT) Received: from service.paris5.org (service.paris5.org [95.154.244.44]) by spam.xensource.com with ESMTP id Dl8VIZZFSzbB45Vo (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 16 Jun 2010 08:31:44 -0700 (PDT) X-Barracuda-Envelope-From: dev@zheng.li Received: by service.paris5.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OOuab-0003Zu-Ih; Wed, 16 Jun 2010 19:31:41 +0400 Content-Type: multipart/mixed; boundary="===============0105120362==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Some minor improvements to the with-vdi script X-Mercurial-Node: a6596df3debeb89ae79920b08144154f6752b86a Message-Id: User-Agent: Mercurial-patchbomb/1.3.1 Date: Wed, 16 Jun 2010 15:30:42 -0000 From: Zheng Li To: xen-api@lists.xensource.com X-Barracuda-Connect: service.paris5.org[95.154.244.44] X-Barracuda-Start-Time: 1276702304 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32686 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Some minor improvements to the with-vdi script X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0105120362== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit - return the user command's exit code as the exit code of with-vdi script (unless something else failed in the preparation or post run steps) - relax the requirement on the user command parameter, both absolute paths and in-paths executables are acceptable - allow a user command to have its own arguments (i.e. with-vdi vdi-uuid user-command arg1 arg2 ... argn) Signed-off-by: Zheng Li scripts/with-vdi | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff -r c0e27f018867 -r a6596df3debe scripts/with-vdi --- a/scripts/with-vdi Tue May 04 07:18:23 2010 +0100 +++ b/scripts/with-vdi Wed Jun 16 16:26:42 2010 +0100 @@ -18,14 +18,17 @@ usage exit 1 fi + COMMAND=$2 if [ -z "$COMMAND" ]; then COMMAND=/bin/sh -fi -if [ ! -x "$COMMAND" ]; then +elif ! which "$COMMAND" > /dev/null ; then echo Failed to find command: ${COMMAND} usage exit 1 +else + shift 1 + COMMAND=$* fi . /etc/xensource-inventory @@ -41,6 +44,7 @@ export DEVICE echo DEVICE=${DEVICE} ${COMMAND} +RC=$? xe vbd-unplug uuid=${VBD} xe vbd-destroy uuid=${VBD} - +exit ${RC} --===============0105120362== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen-api.patch # HG changeset patch # User Zheng Li # Date 1276702002 -3600 # Node ID a6596df3debeb89ae79920b08144154f6752b86a # Parent c0e27f0188678152aee18030e1786be9dab9806e Some minor improvements to the with-vdi script - return the user command's exit code as the exit code of with-vdi script (unless something else failed in the preparation or post run steps) - relax the requirement on the user command parameter, both absolute paths and in-paths executables are acceptable - allow a user command to have its own arguments (i.e. with-vdi vdi-uuid user-command arg1 arg2 ... argn) Signed-off-by: Zheng Li diff -r c0e27f018867 -r a6596df3debe scripts/with-vdi --- a/scripts/with-vdi Tue May 04 07:18:23 2010 +0100 +++ b/scripts/with-vdi Wed Jun 16 16:26:42 2010 +0100 @@ -18,14 +18,17 @@ usage exit 1 fi + COMMAND=$2 if [ -z "$COMMAND" ]; then COMMAND=/bin/sh -fi -if [ ! -x "$COMMAND" ]; then +elif ! which "$COMMAND" > /dev/null ; then echo Failed to find command: ${COMMAND} usage exit 1 +else + shift 1 + COMMAND=$* fi . /etc/xensource-inventory @@ -41,6 +44,7 @@ export DEVICE echo DEVICE=${DEVICE} ${COMMAND} +RC=$? xe vbd-unplug uuid=${VBD} xe vbd-destroy uuid=${VBD} - +exit ${RC} --===============0105120362== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0105120362==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:16:44 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:16:44 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbR6-0000KL-Dy; Fri, 18 Jun 2010 06:16:44 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbJj-0006Yf-VD for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:09:08 -0700 X-ASG-Debug-ID: 1276866545-797b002a0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 0624B29BE74 for ; Fri, 18 Jun 2010 06:09:06 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 2Zbdmm66pDQu93Hz (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:09:06 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479170" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:09:04 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:09:04 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbJg-0000Te-M4 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:09:04 +0100 Content-Type: multipart/mixed; boundary="===============1372445554501402988==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH 2 of 5] HTML API docs: display fields in namespaces X-Mercurial-Node: 27da7dd543d2f12de21015ebba468bd4e5ed2af6 Message-ID: <27da7dd543d2f12de210.1276866476@localhost.localdomain> In-Reply-To: References: User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 14:07:56 +0100 From: Rob Hoes To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866547 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32867 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH 2 of 5] HTML API docs: display fields in namespaces X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1372445554501402988== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ocaml/doc/apidoc.js | 13 +++++++++---- ocaml/doc/main.js | 8 ++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) --===============1372445554501402988== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-api.hg-2.patch" # HG changeset patch # User Rob Hoes # Date 1276866460 -3600 # Node ID 27da7dd543d2f12de21015ebba468bd4e5ed2af6 # Parent c1d171ee6584e9b0e2326d80bda780c5868f40c1 HTML API docs: display fields in namespaces Signed-off-by: Rob Hoes diff -r c1d171ee6584 -r 27da7dd543d2 ocaml/doc/apidoc.js --- a/ocaml/doc/apidoc.js +++ b/ocaml/doc/apidoc.js @@ -133,7 +133,7 @@ function make_field(fld, n) { - name = fld.field_name; + name = fld.full_name.join('_'); html = ""; html = '
'; @@ -211,10 +211,15 @@ function class_doc() { - contents = clsdoc.contents; - fields = filter(function(f){return f[0] == "Field";}, contents); + contents = clsdoc.contents; + fields = fold(function(a, x){ + if (x[0] == "Field") a.push(x); + else a = a.concat(x[2]); + return a; + }, [], contents); fields = map(function(f){return f[1];}, fields); - fields.sort(function(a, b){return compare(a.field_name.toLowerCase(), b.field_name.toLowerCase());}); + + fields.sort(function(a, b){return compare(a.full_name.join('_').toLowerCase(), b.full_name.join('_').toLowerCase());}); messages = clsdoc.messages; messages = filter(function(m){return m.msg_hide_from_docs == false;}, messages); messages.sort(function(a, b){return compare(a.msg_name.toLowerCase(), b.msg_name.toLowerCase())}); diff -r c1d171ee6584 -r 27da7dd543d2 ocaml/doc/main.js --- a/ocaml/doc/main.js +++ b/ocaml/doc/main.js @@ -68,6 +68,14 @@ return x; } +function fold(f, a, l) +{ + if (l.length == 0) + return a; + else + return fold(f, f(a, l[0]), l.slice(1)); +} + // compare function for sorting function compare(a, b) { --===============1372445554501402988== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1372445554501402988==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:17:00 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:17:00 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbRM-0000Qn-8m; Fri, 18 Jun 2010 06:17:00 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbJk-0006Yw-TQ for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:09:08 -0700 X-ASG-Debug-ID: 1276866545-797b002a0001-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 25B4529BE7B for ; Fri, 18 Jun 2010 06:09:07 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id hVYZLqHxvNvofZSy (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:09:07 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479171" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:09:04 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:09:04 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbJg-0000Te-LQ for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:09:04 +0100 Content-Type: multipart/mixed; boundary="===============8625244148248789731==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH 1 of 5] HTML API docs: Display enums X-Mercurial-Node: c1d171ee6584e9b0e2326d80bda780c5868f40c1 Message-ID: In-Reply-To: References: User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 14:07:55 +0100 From: Rob Hoes To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866548 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32867 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH 1 of 5] HTML API docs: Display enums X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============8625244148248789731== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ocaml/doc/apidoc.js | 87 ++++++++++++++++++++++++++++++++++------------------ ocaml/doc/style.css | 2 +- 2 files changed, 57 insertions(+), 32 deletions(-) --===============8625244148248789731== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-api.hg-1.patch" # HG changeset patch # User Rob Hoes # Date 1276866460 -3600 # Node ID c1d171ee6584e9b0e2326d80bda780c5868f40c1 # Parent add6dc1c2d4cfe5d2201092ad71c95eb9546f04a HTML API docs: Display enums Signed-off-by: Rob Hoes diff -r add6dc1c2d4c -r c1d171ee6584 ocaml/doc/apidoc.js --- a/ocaml/doc/apidoc.js +++ b/ocaml/doc/apidoc.js @@ -25,6 +25,33 @@ return 'read/write'; } +function make_enum(t) +{ + n = t[1]; + obj = document.getElementById('enums'); + i = obj.children.length + 1; + obj.style.display = '' + + if (document.getElementById('enum_' + n) == null) { + html = '
'; + html += ''; + html += '
' + n + '
'; + html += '
'; + + obj.innerHTML += html; + } +} + function transform_type(t) { switch (t) { @@ -42,7 +69,8 @@ case "Record": return t[1] + ' record'; case "Enum": - return t[1]; + make_enum(t); + return '' + t[1] + ''; case "Set": return transform_type(t[1]) + ' set'; case "Map": @@ -113,18 +141,16 @@ html += '
' + current_lifecycle_stage(fld.lifecycle) + '
'; html += '
' + transform_type(fld.ty) + ' ' + name + ' [' + qualifier(fld.qualifier) + ']
'; - html += ''; @@ -149,40 +175,35 @@ html += '
' + msg.msg_doc + '
'; - html += ''; return html; @@ -214,7 +235,11 @@ html += ''; html += '
'; - html += '

Fields

'; + html += ''; + + set_content(html); + + html = '

Fields

'; if (fields.length > 0) { for (i in fields) html += make_field(fields[i], i); @@ -230,7 +255,7 @@ else html += '

None.

'; - set_content(html); + append_content(html); } function compare_release_notes(a, b) diff -r add6dc1c2d4c -r c1d171ee6584 ocaml/doc/style.css --- a/ocaml/doc/style.css +++ b/ocaml/doc/style.css @@ -260,7 +260,7 @@ } .field-table td { - padding: .3em .5em .3em 0; + padding: .3em 1.5em .3em 0; } .inline-type { --===============8625244148248789731== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============8625244148248789731==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:17:21 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:17:21 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbRh-0000Xk-A0; Fri, 18 Jun 2010 06:17:21 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbJm-0006ZC-FG for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:09:11 -0700 X-ASG-Debug-ID: 1276866545-797b002a0002-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 32E5D29BE81 for ; Fri, 18 Jun 2010 06:09:08 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id BWnWlQYHIRjxl6nZ (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:09:08 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479172" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:09:04 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:09:04 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbJg-0000Te-KI for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:09:04 +0100 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-ASG-Orig-Subj: [PATCH 0 of 5] HTML documentation improvements Message-ID: User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 14:07:54 +0100 From: Rob Hoes To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866549 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32867 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH 0 of 5] HTML documentation improvements X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com HTML documentation improvements. ocaml/doc/apidoc.js | 87 ++++++++++++++++++++++++++++++++------------------ ocaml/doc/style.css | 2 +- ocaml/doc/apidoc.js | 13 +++++-- ocaml/doc/main.js | 8 ++++ ocaml/doc/jsapi.ml | 61 ++++++++++++++--------------------- ocaml/doc/ocamldoc.js | 26 +++++++------- ocaml/doc/ocamldoc.js | 3 +- 7 files changed, 113 insertions(+), 87 deletions(-) _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Fri Jun 18 06:17:36 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:17:36 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbRv-0000dT-2T; Fri, 18 Jun 2010 06:17:35 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbJm-0006ZD-E0 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:09:11 -0700 X-ASG-Debug-ID: 1276866547-3e3200c80000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 6D24A29BE87 for ; Fri, 18 Jun 2010 06:09:08 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id kN2GQG5npGzgAIHy (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:09:08 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479173" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:09:04 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:09:04 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbJg-0000Te-NS for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:09:04 +0100 Content-Type: multipart/mixed; boundary="===============0936256043049447561==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH 4 of 5] HTML code docs: Compatibility improvements X-Mercurial-Node: e03e6837ff40e9b249aca50e36237339b3864438 Message-ID: In-Reply-To: References: User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 14:07:58 +0100 From: Rob Hoes To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866549 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32867 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH 4 of 5] HTML code docs: Compatibility improvements X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0936256043049447561== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ocaml/doc/ocamldoc.js | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) --===============0936256043049447561== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-api.hg-4.patch" # HG changeset patch # User Rob Hoes # Date 1276866461 -3600 # Node ID e03e6837ff40e9b249aca50e36237339b3864438 # Parent 537aeec5ad8343195185697d4d68113ddc48f11c HTML code docs: Compatibility improvements Signed-off-by: Rob Hoes diff -r 537aeec5ad83 -r e03e6837ff40 ocaml/doc/ocamldoc.js --- a/ocaml/doc/ocamldoc.js +++ b/ocaml/doc/ocamldoc.js @@ -316,41 +316,41 @@ types = []; module_types = []; for (i in structure) { - item = structure[i]; - for (j in item) { + el = structure[i]; + for (j in el) { switch (j) { case 'module': - included_module(item[j], i); - l = item[j].name.split('.'); + included_module(el[j], i); + l = el[j].name.split('.'); name = l[l.length - 1]; included_modules.push(name); break; case 'value': - value(item[j], i); - l = item[j].name.split('.'); + value(el[j], i); + l = el[j].name.split('.'); name = l[l.length - 1]; values.push(name); break; case 'exception': - exception(item[j], i); - l = item[j].name.split('.'); + exception(el[j], i); + l = el[j].name.split('.'); name = l[l.length - 1]; exceptions.push(name); break; case 'type': - type(item[j], i); - l = item[j].name.split('.'); + type(el[j], i); + l = el[j].name.split('.'); name = l[l.length - 1]; types.push(name); break; case 'module_type': - module_type(item[j], i); - l = item[j].name.split('.'); + module_type(el[j], i); + l = el[j].name.split('.'); name = l[l.length - 1]; module_types.push(name); break; case 'comment': - comment(item[j], i); + comment(el[j], i); break; default: break; } --===============0936256043049447561== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0936256043049447561==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:17:55 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:17:55 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbSF-0000kA-0S; Fri, 18 Jun 2010 06:17:55 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbJn-0006ZV-6d for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:09:11 -0700 X-ASG-Debug-ID: 1276866545-797b002a0003-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 337B829BE87 for ; Fri, 18 Jun 2010 06:09:09 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id PX5ITBkkWuPHlUiR (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:09:09 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479174" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:09:05 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:09:04 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbJg-0000Te-Mt for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:09:04 +0100 Content-Type: multipart/mixed; boundary="===============2628669975412694692==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH 3 of 5] HTML API docs: Display namespace changes in release notes X-Mercurial-Node: 537aeec5ad8343195185697d4d68113ddc48f11c Message-ID: <537aeec5ad8343195185.1276866477@localhost.localdomain> In-Reply-To: References: User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 14:07:57 +0100 From: Rob Hoes To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866550 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32867 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH 3 of 5] HTML API docs: Display namespace changes in release notes X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============2628669975412694692== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ocaml/doc/jsapi.ml | 61 +++++++++++++++++++++-------------------------------- 1 files changed, 24 insertions(+), 37 deletions(-) --===============2628669975412694692== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-api.hg-3.patch" # HG changeset patch # User Rob Hoes # Date 1276866461 -3600 # Node ID 537aeec5ad8343195185697d4d68113ddc48f11c # Parent 27da7dd543d2f12de21015ebba468bd4e5ed2af6 HTML API docs: Display namespace changes in release notes Signed-off-by: Rob Hoes diff -r 27da7dd543d2 -r 537aeec5ad83 ocaml/doc/jsapi.ml --- a/ocaml/doc/jsapi.ml +++ b/ocaml/doc/jsapi.ml @@ -19,30 +19,6 @@ and changes_t = change_t list with rpc -let obj_change_in_release rel o = - let rec find_rel rel = function - | [] -> None - | (transition, release, doc) :: tl when release = rel -> Some (transition, o.name, doc) - | _ :: tl -> find_rel rel tl - in - find_rel rel o.obj_lifecycle - -let msg_change_in_release rel m = - let rec find_rel rel = function - | [] -> None - | (transition, release, doc) :: tl when release = rel -> Some (transition, m.msg_name, doc) - | _ :: tl -> find_rel rel tl - in - find_rel rel m.msg_lifecycle - -let field_change_in_release rel f = - let rec find_rel rel = function - | [] -> None - | (transition, release, doc) :: tl when release = rel -> Some (transition, f.field_name, doc) - | _ :: tl -> find_rel rel tl - in - find_rel rel f.lifecycle - let _ = let api = (Datamodel.all_api) in let objs = Dm_api.objects_of_api api in @@ -56,27 +32,38 @@ let class_list = String.concat ", " (List.map (fun s -> "'" ^ s ^ "'") names) in Unixext.write_string_to_file "api/index.json" ("classes = [" ^ class_list ^ "]"); - let new_in_release rel = + let changes_in_release rel = let search_obj obj = + let changes = List.filter (fun (transition, release, doc) -> release = rel) obj.obj_lifecycle in let obj_changes : changes_t = - match obj_change_in_release rel obj with - | None -> [] - | Some x -> [x] + List.map (fun (transition, release, doc) -> (transition, obj.name, doc)) changes in + + let changes_for_msg m = + let changes = List.filter (fun (transition, release, doc) -> release = rel) m.msg_lifecycle in + List.map (fun (transition, release, doc) -> (transition, m.msg_name, doc)) changes in - let msgs = List.filter (fun m -> not m.msg_hide_from_docs) obj.messages in - let msg_changes : changes_t = List.fold_left - (fun l m -> match msg_change_in_release rel m with None -> l | Some x -> x :: l) [] msgs in - - let flds = List.filter (function Field f -> true | _ -> false) obj.contents in - let field_changes : changes_t = List.fold_left - (fun l (Field f) -> match field_change_in_release rel f with None -> l | Some x -> x :: l) [] flds in - + let msg_changes : changes_t = List.fold_left (fun l m -> l @ (changes_for_msg m)) [] msgs in + + let changes_for_field f = + let changes = List.filter (fun (transition, release, doc) -> release = rel) f.lifecycle in + let field_name = String.concat "_" f.full_name in + List.map (fun (transition, release, doc) -> (transition, field_name, doc)) changes + in + let rec flatten_contents contents = + List.fold_left (fun l -> function + | Field f -> f :: l + | Namespace (name, contents) -> flatten_contents contents @ l + ) [] contents + in + let fields = flatten_contents obj.contents in + let field_changes : changes_t = List.fold_left (fun l f -> l @ (changes_for_field f)) [] fields in + "{'cls': '" ^ obj.name ^ "', 'obj_changes': " ^ Jsonrpc.to_string (rpc_of_changes_t obj_changes) ^ ", 'field_changes': " ^ Jsonrpc.to_string (rpc_of_changes_t field_changes) ^ ", 'msg_changes': " ^ Jsonrpc.to_string (rpc_of_changes_t msg_changes) ^ "}" in let release_info = String.concat ", " (List.map search_obj objs) in Unixext.write_string_to_file ("api/" ^ rel ^ ".json") ("release_info = [" ^ release_info ^ "]") in - List.iter new_in_release release_order; + List.iter changes_in_release release_order; let release_list = String.concat ", " (List.map (fun s -> "'" ^ s ^ "'") release_order) in Unixext.write_string_to_file "api/releases.json" ("releases = [" ^ release_list ^ "]"); --===============2628669975412694692== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============2628669975412694692==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:18:12 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:18:12 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbSW-0000rN-DM; Fri, 18 Jun 2010 06:18:12 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbJn-0006ZW-8g for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:09:11 -0700 X-ASG-Debug-ID: 1276866547-3e3200c80001-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 7DC1229BE92 for ; Fri, 18 Jun 2010 06:09:09 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id R3oGHr1kBzX4EQ8H (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:09:09 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479175" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:09:05 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:09:04 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbJg-0000Te-Or for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:09:04 +0100 Content-Type: multipart/mixed; boundary="===============1990339953312896573==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH 5 of 5] HTML code docs: Handle @param ocamldoc option X-Mercurial-Node: 015b4252619caec4015707e49a9629b32ed53f23 Message-ID: <015b4252619caec40157.1276866479@localhost.localdomain> In-Reply-To: References: User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 14:07:59 +0100 From: Rob Hoes To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866550 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32867 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH 5 of 5] HTML code docs: Handle @param ocamldoc option X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1990339953312896573== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ocaml/doc/ocamldoc.js | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --===============1990339953312896573== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-api.hg-5.patch" # HG changeset patch # User Rob Hoes # Date 1276866462 -3600 # Node ID 015b4252619caec4015707e49a9629b32ed53f23 # Parent e03e6837ff40e9b249aca50e36237339b3864438 HTML code docs: Handle @param ocamldoc option This option can be used to attached ocamldoc comments to function parameters. Signed-off-by: Rob Hoes diff -r e03e6837ff40 -r 015b4252619c ocaml/doc/ocamldoc.js --- a/ocaml/doc/ocamldoc.js +++ b/ocaml/doc/ocamldoc.js @@ -157,7 +157,8 @@ n = v.params[c].name; html += '' + (n == "" ? '(no name)' : v.params[c].name) + ''; - html += '' + transform_type(v.params[c].type) + ''; + html += '' + transform_type(v.params[c].type) + ''; + html += '' + (v.params[c].comment != undefined ? v.params[c].comment : '') + ''; } html += ''; html += ''; --===============1990339953312896573== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1990339953312896573==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:18:33 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:18:33 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbSr-0000yw-Ps; Fri, 18 Jun 2010 06:18:33 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbLg-00075d-Nt for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:11:08 -0700 X-ASG-Debug-ID: 1276866665-3e3200d10000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id CFFF529BDD0 for ; Fri, 18 Jun 2010 06:11:06 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id lXvYpJpbKX7dW9wu (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:11:06 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479216" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:11:02 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:11:02 +0100 Received: from snoosnoo2.uk.xensource.com ([10.80.2.49]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbLa-0000Uv-Au for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:11:02 +0100 Content-Type: multipart/mixed; boundary="===============1920798654==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Change the 'close' field in the request record to be mutable rather than a reference X-Mercurial-Node: f57a8764fc6fefe7a00ee747bc33a38c71ca051c Message-ID: User-Agent: Mercurial-patchbomb/1.3.1 Date: Fri, 18 Jun 2010 13:10:32 +0000 From: Jonathan Ludlam To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866667 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32869 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Change the 'close' field in the request record to be mutable rather than a reference X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1920798654== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Signed-off-by: Jon Ludlam http-svr/Makefile | 8 +++++--- http-svr/http.ml | 22 ++++++++++++---------- http-svr/http.mli | 5 ++++- http-svr/http_svr.ml | 12 ++++++------ 4 files changed, 27 insertions(+), 20 deletions(-) --===============1920798654== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User Jonathan Ludlam # Date 1276865807 -3600 # Node ID f57a8764fc6fefe7a00ee747bc33a38c71ca051c # Parent 543ffb14b17334bc9f513f68d3e7fac5043c6c3b Change the 'close' field in the request record to be mutable rather than a reference Signed-off-by: Jon Ludlam diff -r 543ffb14b173 -r f57a8764fc6f http-svr/Makefile --- a/http-svr/Makefile +++ b/http-svr/Makefile @@ -8,6 +8,8 @@ VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) OCAMLOPTFLAGS = -g -dtypes +PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma + OCAMLABI := $(shell ocamlc -version) OCAMLLIBDIR := $(shell ocamlc -where) OCAMLDESTDIR ?= $(OCAMLLIBDIR) @@ -31,13 +33,13 @@ $(OCAMLC) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmo) %.cmo: %.ml %.cmi - $(OCAMLC) -c -thread -I ../stdext -I ../log -o $@ $< + $(OCAMLC) -c -pp '${PP}' -thread -I ../rpc-light -I ../stdext -I ../log -o $@ $< %.cmi: %.mli - $(OCAMLC) -c -thread -o $@ $< + $(OCAMLC) -c -I ../rpc-light -thread -o $@ $< %.cmx: %.ml %.cmi - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -thread -I ../stdext -I ../log -o $@ $< + $(OCAMLOPT) $(OCAMLOPTFLAGS) -pp '${PP}' -c -thread -I ../rpc-light -I ../stdext -I ../log -o $@ $< %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< diff -r 543ffb14b173 -r f57a8764fc6f http-svr/http.ml --- a/http-svr/http.ml +++ b/http-svr/http.ml @@ -98,16 +98,12 @@ String.sub r 0 ((String.length r)-1) type method_t = Get | Post | Put | Connect | Unknown of string -let string_of_method_t = function - | Get -> "GET" | Post -> "POST" | Put -> "PUT" | Connect -> "CONNECT" | Unknown x -> "Unknown " ^ x -let method_t_of_string = function - | "GET" -> Get | "POST" -> Post | "PUT" -> Put | "CONNECT" -> Connect | x -> Unknown x -type authorization = +and authorization = | Basic of string * string | UnknownAuth of string -type request = { m: method_t; +and request = { m: method_t; uri: string; query: (string*string) list; version: string; @@ -119,8 +115,14 @@ subtask_of: string option; content_type: string option; user_agent: string option; - close: bool ref; - headers: string list;} + mutable close: bool; + headers: string list} with rpc + +let string_of_method_t = function + | Get -> "GET" | Post -> "POST" | Put -> "PUT" | Connect -> "CONNECT" | Unknown x -> "Unknown " ^ x +let method_t_of_string = function + | "GET" -> Get | "POST" -> Post | "PUT" -> Put | "CONNECT" -> Connect | x -> Unknown x + let nullreq = { m=Unknown ""; uri=""; @@ -134,7 +136,7 @@ subtask_of=None; content_type = None; user_agent = None; - close= ref true; + close= true; headers=[];} let authorization_of_string x = @@ -218,7 +220,7 @@ let uri, query = parse_uri uri in { m = method_t_of_string m; uri = uri; query = query; content_length = None; transfer_encoding = None; - version = version; cookie = []; auth = None; task = None; subtask_of = None; content_type = None; user_agent = None; close=ref false; headers=[] } + version = version; cookie = []; auth = None; task = None; subtask_of = None; content_type = None; user_agent = None; close=false; headers=[] } | _ -> raise Http_parse_failure let pretty_string_of_request x = diff -r 543ffb14b173 -r f57a8764fc6f http-svr/http.mli --- a/http-svr/http.mli +++ b/http-svr/http.mli @@ -38,9 +38,12 @@ subtask_of: string option; content_type: string option; user_agent: string option; - close: bool ref; + mutable close: bool; headers: string list; } + +val rpc_of_request : request -> Rpc.t +val request_of_rpc : Rpc.t -> request val nullreq : request val authorization_of_string : string -> authorization diff -r 543ffb14b173 -r f57a8764fc6f http-svr/http_svr.ml --- a/http-svr/http_svr.ml +++ b/http-svr/http_svr.ml @@ -87,7 +87,7 @@ let response_fct req ?(hdrs=[]) s (response_length: int64) (write_response_to_fd_fn: Unix.file_descr -> unit) = let version = get_return_version req in - let keep_alive = if !(req.close) then false else true in + let keep_alive = if req.close then false else true in headers s ((http_200_ok_with_content response_length ~version ~keep_alive ()) @ hdrs); write_response_to_fd_fn s @@ -142,7 +142,7 @@ (** If no handler matches the request then call this callback *) let default_callback req bio = response_forbidden (Buf_io.fd_of bio); - req.close := true + req.close <- true let write_error bio message = @@ -190,7 +190,7 @@ (* Default for HTTP/1.1 is persistent connections. Anything else closes *) (* the channel as soon as the request is processed *) - if req.version <> "HTTP/1.1" then req.close := true; + if req.version <> "HTTP/1.1" then req.close <- true; let rec read_rest_of_headers left = let cl_hdr = "content-length: " in @@ -229,8 +229,8 @@ begin let token = String.lowercase (end_of_string r (String.length connection_hdr)) in match token with - | "keep-alive" -> req.close := false - | "close" -> req.close := true + | "keep-alive" -> req.close <- false + | "close" -> req.close <- true | _ -> () end; if r <> "" then ( @@ -278,7 +278,7 @@ Buf_io.assert_buffer_empty ic; handlerfn req fd ); - finished := !(req.close) + finished := (req.close) with End_of_file -> DCritical.debug "Premature termination of connection!"; --===============1920798654== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1920798654==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:18:49 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:18:49 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbT6-000156-De; Fri, 18 Jun 2010 06:18:48 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbLk-00076a-Im for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:11:12 -0700 X-ASG-Debug-ID: 1276866665-3e3200d10001-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id AC65629BDD7 for ; Fri, 18 Jun 2010 06:11:10 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id IFm2OoPHJIjDjf8b (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:11:10 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479219" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:11:10 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:11:10 +0100 Received: from snoosnoo2.uk.xensource.com ([10.80.2.49]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbLi-0000Uy-92 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:11:10 +0100 Content-Type: multipart/mixed; boundary="===============1453054911==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Change the 'close' field in the request record to be mutable rather than a reference X-Mercurial-Node: 8e12ced865c4a6c8a23264990335646ffb06bd51 Message-ID: <8e12ced865c4a6c8a232.1276866638@snoosnoo2.uk.xensource.com> User-Agent: Mercurial-patchbomb/1.3.1 Date: Fri, 18 Jun 2010 13:10:38 +0000 From: Jonathan Ludlam To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866671 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32869 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Change the 'close' field in the request record to be mutable rather than a reference X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1453054911== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Signed-off-by: Jon Ludlam ocaml/xapi/audit_log.ml | 2 +- ocaml/xapi/config_file_sync.ml | 2 +- ocaml/xapi/console.ml | 2 +- ocaml/xapi/export.ml | 4 ++-- ocaml/xapi/import.ml | 2 +- ocaml/xapi/import_raw_vdi.ml | 2 +- ocaml/xapi/monitor_rrds.ml | 8 ++++---- ocaml/xapi/pool_db_backup.ml | 2 +- ocaml/xapi/system_status.ml | 2 +- ocaml/xapi/wlb_reports.ml | 2 +- ocaml/xapi/xapi_blob.ml | 2 +- ocaml/xapi/xapi_host_backup.ml | 4 ++-- ocaml/xapi/xapi_http.ml | 2 +- ocaml/xapi/xapi_message.ml | 2 +- ocaml/xapi/xapi_pool_patch.ml | 2 +- ocaml/xapi/xapi_vncsnapshot.ml | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) --===============1453054911== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User Jonathan Ludlam # Date 1276865970 -3600 # Node ID 8e12ced865c4a6c8a23264990335646ffb06bd51 # Parent 002aaaf6c02700ad25b38c32d835f6b9228a9422 Change the 'close' field in the request record to be mutable rather than a reference Signed-off-by: Jon Ludlam diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/audit_log.ml --- a/ocaml/xapi/audit_log.ml +++ b/ocaml/xapi/audit_log.ml @@ -125,7 +125,7 @@ let s = Buf_io.fd_of bio in Buf_io.assert_buffer_empty bio; - req.close := true; + req.close <- true; Xapi_http.with_context (* makes sure to signal task-completed to cli *) (Printf.sprintf "audit_log_get request") diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/config_file_sync.ml --- a/ocaml/xapi/config_file_sync.ml +++ b/ocaml/xapi/config_file_sync.ml @@ -21,7 +21,7 @@ debug "received request to write out dom0 config files"; Xapi_http.with_context "Syncing dom0 config files over HTTP" req s (fun __context -> - req.Http.close := true; + req.Http.close <- true; debug "sending headers"; Http_svr.headers s (Http.http_200_ok ~keep_alive:false ()); debug "writing dom0 config files"; diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/console.ml --- a/ocaml/xapi/console.ml +++ b/ocaml/xapi/console.ml @@ -116,7 +116,7 @@ (* GET /console_uri?ref=..... Cookie: *) let handler proxy_fn (req: request) s = - req.close := true; + req.close <- true; Xapi_http.with_context "Connection to VM console" req s (fun __context -> let console = console_of_request __context req in diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/export.ml --- a/ocaml/xapi/export.ml +++ b/ocaml/xapi/export.ml @@ -368,7 +368,7 @@ let metadata_handler (req: request) s = debug "metadata_handler called"; - req.close := true; + req.close <- true; (* Xapi_http.with_context always completes the task at the end *) Xapi_http.with_context "VM.export_metadata" req s @@ -413,7 +413,7 @@ let handler (req: request) s = debug "export handler"; - req.close := true; + req.close <- true; (* First things first, let's make sure that the request has a valid session or username/password *) diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/import.ml --- a/ocaml/xapi/import.ml +++ b/ocaml/xapi/import.ml @@ -646,7 +646,7 @@ )) let handler (req: request) s = - req.close := true; + req.close <- true; Xapi_http.assert_credentials_ok "VM.import" ~http_action:"put_import" req; diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/import_raw_vdi.ml --- a/ocaml/xapi/import_raw_vdi.ml +++ b/ocaml/xapi/import_raw_vdi.ml @@ -24,7 +24,7 @@ open Pervasiveext let handler (req: request) (s: Unix.file_descr) = - req.close := true; + req.close <- true; Xapi_http.with_context "Importing raw VDI" req s (fun __context -> let vdi = diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/monitor_rrds.ml --- a/ocaml/xapi/monitor_rrds.ml +++ b/ocaml/xapi/monitor_rrds.ml @@ -413,7 +413,7 @@ let receive_handler (req: Http.request) (bio: Buf_io.t) = let query = req.Http.query in - req.Http.close := true; + req.Http.close <- true; debug "RRD receive handler"; if not(List.mem_assoc "uuid" query) then begin error "HTTP request for RRD lacked 'uuid' parameter"; @@ -468,7 +468,7 @@ (** Send handler, for sending out requested RRDs *) let handler (req: Http.request) s = let query = req.Http.query in - req.Http.close := true; + req.Http.close <- true; debug "RRD handler"; if not(List.mem_assoc "ref" query) && not(List.mem_assoc "uuid" query) then begin error "HTTP request for RRD lacked 'uuid' parameter"; @@ -526,7 +526,7 @@ (** Send handler, for sending out requested host RRDs *) let handler_host (req: Http.request) s = let query = req.Http.query in - req.Http.close := true; + req.Http.close <- true; debug "RRD host handler"; Xapi_http.with_context ~dummy:true "Obtaining the Host RRD statistics" req s (fun __context -> @@ -579,7 +579,7 @@ let handler_rrd_updates (req: Http.request) s = let query = req.Http.query in - req.Http.close := true; + req.Http.close <- true; Xapi_http.with_context ~dummy:true "Obtaining the Host RRD statistics" req s (fun __context -> if not(List.mem_assoc "start" query) then begin diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/pool_db_backup.ml --- a/ocaml/xapi/pool_db_backup.ml +++ b/ocaml/xapi/pool_db_backup.ml @@ -163,7 +163,7 @@ (** Called when a CLI user downloads a backup of the database *) let pull_database_backup_handler (req: Http.request) s = debug "received request to write out db as xml"; - req.Http.close := true; + req.Http.close <- true; Xapi_http.with_context "Dumping database as XML" req s (fun __context -> debug "sending headers"; diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/system_status.ml --- a/ocaml/xapi/system_status.ml +++ b/ocaml/xapi/system_status.ml @@ -102,7 +102,7 @@ let handler (req: request) s = debug "In system status http handler..."; - req.close := true; + req.close <- true; let get_param s = try List.assoc s req.query with _ -> "" diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/wlb_reports.ml --- a/ocaml/xapi/wlb_reports.ml +++ b/ocaml/xapi/wlb_reports.ml @@ -224,7 +224,7 @@ let client_sock = Buf_io.fd_of bio in Buf_io.assert_buffer_empty bio; debug "handle: fd = %d" (Unixext.int_of_file_descr client_sock); - req.close := true; + req.close <- true; Xapi_http.with_context (sprintf "WLB %s request" method_name) req client_sock diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/xapi_blob.ml --- a/ocaml/xapi/xapi_blob.ml +++ b/ocaml/xapi/xapi_blob.ml @@ -40,7 +40,7 @@ let handler (req: Http.request) s = let query = req.Http.query in - req.Http.close := true; + req.Http.close <- true; debug "blob handler"; if not(List.mem_assoc "ref" query) then begin let headers = Http.http_400_badrequest in diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/xapi_host_backup.ml --- a/ocaml/xapi/xapi_host_backup.ml +++ b/ocaml/xapi/xapi_host_backup.ml @@ -59,7 +59,7 @@ raise (Api_errors.Server_error (Api_errors.backup_script_failed, [log])) let host_backup_handler (req: request) s = - req.close := true; + req.close <- true; Xapi_http.with_context "Downloading host backup" req s (fun __context -> Http_svr.headers s (Http.http_200_ok ()); @@ -89,7 +89,7 @@ to_close := List.filter (fun x -> fd <> x) !to_close let host_restore_handler (req: request) s = - req.close := true; + req.close <- true; Xapi_http.with_context "Uploading host backup" req s (fun __context -> Http_svr.headers s (Http.http_200_ok ()); diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/xapi_http.ml --- a/ocaml/xapi/xapi_http.ml +++ b/ocaml/xapi/xapi_http.ml @@ -208,7 +208,7 @@ | None -> Server_helpers.exec_with_new_task ~task_in_database:(not dummy) label fail | Some task_id -> Server_helpers.exec_with_forwarded_task task_id fail end; - req.close := true; + req.close <- true; raise e (* Other exceptions are dealt with by the Http_svr module's exception handler *) diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/xapi_message.ml --- a/ocaml/xapi/xapi_message.ml +++ b/ocaml/xapi/xapi_message.ml @@ -385,7 +385,7 @@ days worth of messages as an RSS feed. *) let handler (req: Http.request) (bio: Buf_io.t) = let query = req.Http.query in - req.Http.close := true; + req.Http.close <- true; debug "Message handler"; let s = Buf_io.fd_of bio in Buf_io.assert_buffer_empty bio; diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/xapi_pool_patch.ml --- a/ocaml/xapi/xapi_pool_patch.ml +++ b/ocaml/xapi/xapi_pool_patch.ml @@ -429,7 +429,7 @@ Http_svr.response_file ~mime_content_type:None s path; end; - req.close := true + req.close <- true ) let get_patch_to_local ~__context ~self = diff -r 002aaaf6c027 -r 8e12ced865c4 ocaml/xapi/xapi_vncsnapshot.ml --- a/ocaml/xapi/xapi_vncsnapshot.ml +++ b/ocaml/xapi/xapi_vncsnapshot.ml @@ -42,6 +42,6 @@ ) (fun () -> try Unix.unlink tmp with _ -> ()) with e -> - req.close := true; + req.close <- true; raise e ) --===============1453054911== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1453054911==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:22:26 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:22:26 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbWb-00029g-RJ; Fri, 18 Jun 2010 06:22:25 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbQM-000069-5C for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:15:58 -0700 X-ASG-Debug-ID: 1276866953-3e3200dd0002-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 092B929BE3A for ; Fri, 18 Jun 2010 06:15:56 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id y1lLnMso52GkGNnO (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:15:56 -0700 (PDT) X-Barracuda-Envelope-From: Rob.Hoes@citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479455" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:15:32 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:15:32 +0100 Received: from dhcp-3-142.uk.xensource.com ([10.80.3.142] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbPw-0000Zt-Cj for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:15:32 +0100 Content-Type: multipart/mixed; boundary="===============1242051858922421993==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] # HG changeset patch From: Rob Hoes To: xen-api Message-ID: Date: Fri, 18 Jun 2010 14:15:32 +0100 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276866957 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32869 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] # HG changeset patch X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1242051858922421993== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User Rob Hoes When uninstalling xapi-datamodel, do it from the place it was installed in Signed-off-by: Rob Hoes diff -r 1d736d341fd9 ocaml/idl/OMakefile --- a/ocaml/idl/OMakefile +++ b/ocaml/idl/OMakefile @@ -156,4 +156,4 @@ .PHONY: lib-uninstall lib-uninstall: - ocamlfind remove xapi-datamodel \ No newline at end of file + ocamlfind remove -destdir $(INSTALL_PATH) xapi-datamodel --===============1242051858922421993== Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="lib-xapi-datamodel" IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFJvYiBIb2VzIDxyb2IuaG9lc0BjaXRyaXguY29t PgpXaGVuIHVuaW5zdGFsbGluZyB4YXBpLWRhdGFtb2RlbCwgZG8gaXQgZnJvbSB0aGUgcGxhY2Ug aXQgd2FzIGluc3RhbGxlZCBpbgoKU2lnbmVkLW9mZi1ieTogUm9iIEhvZXMgPHJvYi5ob2VzQGNp dHJpeC5jb20+CgpkaWZmIC1yIDFkNzM2ZDM0MWZkOSBvY2FtbC9pZGwvT01ha2VmaWxlCi0tLSBh L29jYW1sL2lkbC9PTWFrZWZpbGUKKysrIGIvb2NhbWwvaWRsL09NYWtlZmlsZQpAQCAtMTU2LDQg KzE1Niw0IEBACiAKIC5QSE9OWTogbGliLXVuaW5zdGFsbAogbGliLXVuaW5zdGFsbDoKLQlvY2Ft bGZpbmQgcmVtb3ZlIHhhcGktZGF0YW1vZGVsClwgTm8gbmV3bGluZSBhdCBlbmQgb2YgZmlsZQor CW9jYW1sZmluZCByZW1vdmUgLWRlc3RkaXIgJChJTlNUQUxMX1BBVEgpIHhhcGktZGF0YW1vZGVs Cg== --===============1242051858922421993== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1242051858922421993==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:29:58 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:29:58 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbdu-0004Bj-0q; Fri, 18 Jun 2010 06:29:58 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbVz-0001wY-7D for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:21:47 -0700 X-ASG-Debug-ID: 1276867302-797b005d0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 6CC8429BF5C for ; Fri, 18 Jun 2010 06:21:43 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id v185TURlHSNy6R8O (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:21:43 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479666" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:21:42 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:21:42 +0100 Received: from snoosnoo2.uk.xensource.com ([10.80.2.49]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbVu-0000do-BP for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:21:42 +0100 Content-Type: multipart/mixed; boundary="===============1351499780==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Move the netdev library from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library X-Mercurial-Node: b479ad2cbb9fdc759a687db764424f4a8104c40f Message-ID: User-Agent: Mercurial-patchbomb/1.3.1 Date: Fri, 18 Jun 2010 13:21:11 +0000 From: Jonathan Ludlam To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276867305 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32869 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Move the netdev library from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1351499780== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Signed-off-by: Jon Ludlam ocaml/OMakefile | 1 - ocaml/in_guest_install/OMakefile | 6 +- ocaml/netdev/OMakefile | 5 - ocaml/netdev/addr_stubs.c | 116 ----------- ocaml/netdev/bridge_stubs.c | 85 -------- ocaml/netdev/link_stubs.c | 179 ----------------- ocaml/netdev/netdev.h | 33 --- ocaml/netdev/netdev.ml | 412 ----------------------------------------- ocaml/netdev/netdev.mli | 138 ------------- ocaml/netdev/sockios_compat.h | 6 - ocaml/xapi/OMakefile | 6 +- ocaml/xe-cli/OMakefile | 5 +- ocaml/xe-cli/rt/OMakefile | 6 +- ocaml/xenops-ts/OMakefile | 6 +- ocaml/xenops/OMakefile | 8 +- ocaml/xiu/OMakefile | 6 +- 16 files changed, 21 insertions(+), 997 deletions(-) --===============1351499780== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User Jonathan Ludlam # Date 1276867214 -3600 # Node ID b479ad2cbb9fdc759a687db764424f4a8104c40f # Parent 9a542a51a306f748a262fb93af379f27e693705b Move the netdev library from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library Signed-off-by: Jon Ludlam diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/OMakefile --- a/ocaml/OMakefile +++ b/ocaml/OMakefile @@ -22,7 +22,6 @@ xva \ guest \ console \ - netdev \ auth \ events \ in_guest_install \ diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/in_guest_install/OMakefile --- a/ocaml/in_guest_install/OMakefile +++ b/ocaml/in_guest_install/OMakefile @@ -1,6 +1,6 @@ -OCAML_LIBS = ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../netdev/netdev ../xenops/xenops -OCAMLINCLUDES = ../idl/ocaml_backend ../autogen ../idl ../netdev ../xenops -OCAMLPACKS = unix stdext xml-light2 +OCAML_LIBS = ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../xenops/xenops +OCAMLINCLUDES = ../idl/ocaml_backend ../autogen ../idl ../xenops +OCAMLPACKS = unix stdext xml-light2 netdev OCAMLFLAGS += -dtypes -warn-error F -cclib -static diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/netdev/OMakefile --- a/ocaml/netdev/OMakefile +++ /dev/null @@ -1,5 +0,0 @@ -OCamlLibraryClib(netdev, netdev, netdev_stubs) -StaticCLibrary(netdev_stubs, bridge_stubs link_stubs addr_stubs) -OCamlDocLibrary(netdev, netdev) - -OCAML_LIBS += netdev diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/netdev/addr_stubs.c --- a/ocaml/netdev/addr_stubs.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - */ -/* - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -static value alloc_addr(struct sockaddr *sock) -{ - CAMLparam0(); - CAMLlocal1(result); - char output[36]; - int ret = 0; - - switch (sock->sa_family) { - case AF_INET: { - struct sockaddr_in *in = (struct sockaddr_in *) sock; - int v = ntohl(in->sin_addr.s_addr); - ret = snprintf(output, sizeof(output), "%u.%u.%u.%u", - (v >> 24) & 0xff, (v >> 16) & 0xff, - (v >> 8) & 0xff, v & 0xff); - break; - } - case AF_INET6: { - struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) sock; - ret = snprintf(output, sizeof(output), - "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", - in6->sin6_addr.s6_addr[0], - in6->sin6_addr.s6_addr[1], - in6->sin6_addr.s6_addr[2], - in6->sin6_addr.s6_addr[3], - in6->sin6_addr.s6_addr[4], - in6->sin6_addr.s6_addr[5], - in6->sin6_addr.s6_addr[6], - in6->sin6_addr.s6_addr[7], - in6->sin6_addr.s6_addr[8], - in6->sin6_addr.s6_addr[9], - in6->sin6_addr.s6_addr[10], - in6->sin6_addr.s6_addr[11], - in6->sin6_addr.s6_addr[12], - in6->sin6_addr.s6_addr[13]); - break; - } - default: - /* just ignore */ - ; - } - result = caml_alloc_string(ret); - memcpy(String_val(result), output, ret); - CAMLreturn(result); -} - -value stub_if_getaddr(value unit) -{ - CAMLparam0(); - CAMLlocal5(result, temp, name, addrstr, netmaskstr); - CAMLlocal1(tuple); - int ret; - struct ifaddrs *ifaddrs, *tmp; - struct sockaddr *sock, *netmask; - - result = temp = Val_emptylist; - name = addrstr = Val_int(0); - - ret = getifaddrs(&ifaddrs); - if (ret < 0) - caml_failwith("cannot get interface address"); - - for (tmp = ifaddrs; tmp; tmp = tmp->ifa_next) { - sock = tmp->ifa_addr; - netmask = tmp->ifa_netmask; - - if (sock->sa_family == AF_INET || sock->sa_family == AF_INET6) { - name = caml_copy_string(tmp->ifa_name); - addrstr = alloc_addr(sock); - netmaskstr = alloc_addr(netmask); - - tuple = caml_alloc_tuple(4); - Store_field(tuple, 0, name); - Store_field(tuple, 1, addrstr); - Store_field(tuple, 2, netmaskstr); - Store_field(tuple, 3, Val_bool(sock->sa_family == AF_INET6)); - - result = caml_alloc_small(2, Tag_cons); - Field(result, 0) = tuple; - Field(result, 1) = temp; - - temp = result; - } - } - - freeifaddrs(ifaddrs); - - CAMLreturn(result); -} diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/netdev/bridge_stubs.c --- a/ocaml/netdev/bridge_stubs.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - */ -/* - */ - -#include "netdev.h" - -#include -#include -#include -#include -#include -#include - -value stub_bridge_add(value fd, value name) -{ - CAMLparam2(fd, name); - int err; - - err = ioctl(Int_val(fd), SIOCBRADDBR, String_val(name)); - CHECK_IOCTL(err, "bridge add"); - CAMLreturn(Val_unit); -} - -value stub_bridge_del(value fd, value name) -{ - CAMLparam2(fd, name); - int err; - - err = ioctl(Int_val(fd), SIOCBRDELBR, String_val(name)); - CHECK_IOCTL(err, "bridge del"); - CAMLreturn(Val_unit); -} - -value stub_bridge_intf_add(value fd, value name, value intf) -{ - CAMLparam3(fd, name, intf); - int err; - struct ifreq ifr; - int ifindex; - - ifindex = if_nametoindex(String_val(intf)); - if (ifindex == 0) - caml_failwith("Device_not_found"); - - memset(ifr.ifr_name, '\000', IFNAMSIZ); - strncpy(ifr.ifr_name, String_val(name), IFNAMSIZ); - ifr.ifr_ifindex = ifindex; - - err = ioctl(Int_val(fd), SIOCBRADDIF, &ifr); - CHECK_IOCTL(err, "bridge intf add"); - CAMLreturn(Val_unit); -} - -value stub_bridge_intf_del(value fd, value name, value intf) -{ - CAMLparam3(fd, name, intf); - int err; - struct ifreq ifr; - int ifindex; - - ifindex = if_nametoindex(String_val(intf)); - if (ifindex == 0) - caml_failwith("Device_not_found"); - - memset(ifr.ifr_name, '\000', IFNAMSIZ); - strncpy(ifr.ifr_name, String_val(name), IFNAMSIZ); - ifr.ifr_ifindex = ifindex; - - err = ioctl(Int_val(fd), SIOCBRDELIF, &ifr); - CHECK_IOCTL(err, "bridge intf del"); - - CAMLreturn(Val_unit); -} diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/netdev/link_stubs.c --- a/ocaml/netdev/link_stubs.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - */ -/* - */ - -#include "netdev.h" - -#include -#include -#include -#include -#include -#include - -#define SET_IFREQ(ifreq, devname) \ - strncpy(ifreq.ifr_name, devname, IFNAMSIZ) - -static int link_change_flags(int fd, char *name, - unsigned int flags, unsigned int mask) -{ - struct ifreq ifr; - int ret; - - SET_IFREQ(ifr, name); - ret = ioctl(fd, SIOCGIFFLAGS, &ifr); - if (ret < 0) - return ret; - if ((ifr.ifr_flags ^ flags) & mask) { - ifr.ifr_flags &= ~mask; - ifr.ifr_flags |= mask & flags; - ret = ioctl(fd, SIOCSIFFLAGS, &ifr); - } - return ret; -} - -static int link_change_name(int fd, char *name, char *newname) -{ - struct ifreq ifr; - int ret; - - SET_IFREQ(ifr, name); - strncpy(ifr.ifr_newname, newname, IFNAMSIZ); - ret = ioctl(fd, SIOCSIFNAME, &ifr); - return ret; -} - -value stub_link_up(value fd, value dev) -{ - CAMLparam2(fd, dev); - int err; - err = link_change_flags(Int_val(fd), String_val(dev), IFF_UP, IFF_UP); - CHECK_IOCTL(err, "link up"); - CAMLreturn(Val_unit); -} - -value stub_link_is_up(value fd, value dev) -{ - CAMLparam2(fd, dev); - struct ifreq ifr; - int err; - - SET_IFREQ(ifr, String_val(dev)); - err = ioctl(Int_val(fd), SIOCGIFFLAGS, &ifr); - CHECK_IOCTL(err, "link_is_up"); - CAMLreturn(Val_bool (ifr.ifr_flags & IFF_UP)); -} - -value stub_link_down(value fd, value dev) -{ - CAMLparam2(fd, dev); - int err; - err = link_change_flags(Int_val(fd), String_val(dev), 0, IFF_UP); - CHECK_IOCTL(err, "link down"); - - CAMLreturn(Val_unit); -} - -value stub_link_change_name(value fd, value dev, value newname) -{ - CAMLparam3(fd, dev, newname); - int err; - - err = link_change_name(Int_val(fd), - String_val(dev), String_val(newname)); - CHECK_IOCTL(err, "link change name"); - CAMLreturn(Val_unit); -} - -value stub_link_multicast(value fd, value dev, value v) -{ - CAMLparam3(fd, dev, v); - int err; - err = link_change_flags(Int_val(fd), String_val(dev), - ((Bool_val(v)) ? IFF_MULTICAST : 0), IFF_MULTICAST); - CHECK_IOCTL(err, "link multicast"); - CAMLreturn(Val_unit); -} - -value stub_link_arp(value fd, value dev, value v) -{ - CAMLparam3(fd, dev, v); - int err; - err = link_change_flags(Int_val(fd), String_val(dev), - ((Bool_val(v)) ? 0 : IFF_NOARP), IFF_NOARP); - CHECK_IOCTL(err, "link arp"); - CAMLreturn(Val_unit); -} - -#ifdef SIOCETHTOOL -#define ETHTOOL_GSET 0x00000001 /* Get settings. */ - -#include -/* copied from linux/ethtool.h and made compilable with userspace types */ -struct ethtool_cmd { - uint32_t cmd; - uint32_t supported; /* Features this interface supports */ - uint32_t advertising; /* Features this interface advertises */ - uint16_t speed; /* The forced speed, 10Mb, 100Mb, gigabit */ - uint8_t duplex; /* Duplex, half or full */ - uint8_t port; /* Which connector port */ - uint8_t phy_address; - uint8_t transceiver; /* Which transceiver to use */ - uint8_t autoneg; /* Enable or disable autonegotiation */ - uint32_t maxtxpkt; /* Tx pkts before generating tx int */ - uint32_t maxrxpkt; /* Rx pkts before generating rx int */ - uint32_t reserved[4]; -}; - -value stub_link_get_status(value fd, value dev) -{ - CAMLparam2(fd, dev); - CAMLlocal1(ret); - struct ifreq ifr; - struct ethtool_cmd ecmd; - int err, speed, duplex; - - SET_IFREQ(ifr, String_val(dev)); - ecmd.cmd = ETHTOOL_GSET; - ifr.ifr_data = (caddr_t) &ecmd; - err = ioctl(Int_val(fd), SIOCETHTOOL, &ifr); - CHECK_IOCTL(err, "get ethtool"); - - /* CA-24610: apparently speeds can be other values eg 2500 */ - speed = ecmd.speed; - - switch (ecmd.duplex) { - case 0: duplex = 1; break; - case 1: duplex = 2; break; - default: duplex = 0; - } - - ret = caml_alloc_tuple(2); - Store_field(ret, 0, Val_int(speed)); - Store_field(ret, 1, Val_int(duplex)); - - CAMLreturn(ret); -} -#else -value stub_link_get_status(value fd, value dev) -{ - CAMLparam2(fd, dev); - CAMLlocal1(ret); - ret = caml_alloc_tuple(2); - Store_field(ret, 0, Val_int(0)); /* unknown speed */ - Store_field(ret, 1, Val_int(0)); /* unknown duplex */ - CAMLreturn(ret); -} -#endif diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/netdev/netdev.h --- a/ocaml/netdev/netdev.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - */ -/* - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef SIOCBRADDBR -#include "sockios_compat.h" -#endif - -#define CHECK_IOCTL(err, S) \ - if (err < 0) { \ - caml_failwith(S ": ioctl failed"); \ - } diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/netdev/netdev.ml --- a/ocaml/netdev/netdev.ml +++ /dev/null @@ -1,412 +0,0 @@ -(* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - *) -open Stringext -open Forkhelpers - -type kind = Bridge | Vswitch - -type network_ops = { - kind: kind; - add: string -> ?uuid:string -> unit; - del: string -> unit; - list: unit -> string list; - - exists: string -> bool; - - intf_add: string -> string -> unit; - intf_del: string -> string -> unit; - intf_list: string -> string list; - - get_bridge: string -> string; - is_on_bridge: string -> bool; - - set_forward_delay: string -> int -> unit; -} - -exception Unknown_network_backend of string -exception Invalid_network_backend_operation of string * kind - -let string_of_kind kind = match kind with - | Bridge -> "bridge" - | Vswitch -> "openvswitch" - -let kind_of_string s = match s with - | "bridge" -> Bridge - | "vswitch" -> Vswitch - | "openvswitch" -> Vswitch - | _ -> raise (Unknown_network_backend s) - -module Internal = struct - -let control_socket () = - try - Unix.socket Unix.PF_INET Unix.SOCK_DGRAM 0 - with - exn -> - try - Unix.socket Unix.PF_UNIX Unix.SOCK_DGRAM 0 - with - exn -> - Unix.socket Unix.PF_INET6 Unix.SOCK_DGRAM 0 - -let with_fd f = - let fd = control_socket () in - let r = begin try - f fd - with - exn -> - Unix.close fd; - raise exn - end in - Unix.close fd; - r - -let exec cmd = - let ret = Sys.command cmd in - if ret <> 0 then - failwith (Printf.sprintf "cmd returned %d" ret) - -let read_one_line file = - let inchan = open_in file in - try - let result = input_line inchan in - close_in inchan; - result - with exn -> close_in inchan; raise exn - -let write_one_line file l = - let outchan = open_out file in - try - output_string outchan (l ^ "\n"); - close_out outchan - with - exn -> close_out outchan; raise exn -end - -module Bridge = struct - -external _add : Unix.file_descr -> string -> unit = "stub_bridge_add" -external _del : Unix.file_descr -> string -> unit = "stub_bridge_del" - -let add name ?uuid = - Internal.with_fd (fun fd -> _add fd name) - -let del name = - Internal.with_fd (fun fd -> _del fd name) - -let list () = - let dirs = Array.to_list (Sys.readdir "/sys/class/net") in - List.filter (fun dir -> - Sys.file_exists ("/sys/class/net/" ^ dir ^ "/bridge")) dirs - -let exists name = - try Sys.file_exists ("/sys/class/net/" ^ name ^ "/bridge") - with _ -> false - -let set name obj v = - let file = "/sys/class/net/" ^ name ^ "/bridge/" ^ obj in - let outchan = open_out file in - output_string outchan v; - output_char outchan '\n'; - close_out outchan - -let get name obj = Internal.read_one_line ("/sys/class/net/" ^ name ^ "/bridge/" ^ obj) - -let _forward_delay = "forward_delay" -let _hello_time = "hello_time" -let _max_age = "max_age" -let _ageing_time = "ageing_time" -let _stp_state = "stp_state" -let _priority = "priority" -let _bridge_id = "bridge_id" - -let get_id name = - get name _bridge_id - -let set_forward_delay name v = - set name _forward_delay (string_of_int v) - -let get_forward_delay name = - int_of_string (get name _forward_delay) - -let set_hello_time name v = - set name _hello_time (string_of_int v) - -let get_hello_time name = - int_of_string (get name _hello_time) - -let set_max_age name v = - set name _max_age (string_of_int v) - -let get_max_age name = - int_of_string (get name _max_age) - -let set_ageing_time name v = - set name _ageing_time (string_of_int v) - -let get_ageing_time name = - int_of_string (get name _ageing_time) - -let set_stp_state name v = - set name _stp_state (if v then "1" else "0") - -let get_stp_state name = - get name _stp_state <> "0" - -let set_priority name v = - set name _priority (string_of_int v) - -let get_priority name = - int_of_string (get name _priority) - -(* bridge interfaces control function *) -external _intf_add : Unix.file_descr -> string -> string -> unit - = "stub_bridge_intf_add" -external _intf_del : Unix.file_descr -> string -> string -> unit - = "stub_bridge_intf_del" - -let intf_add name intf = - Internal.with_fd (fun fd -> _intf_add fd name intf) - -let intf_del name intf = - Internal.with_fd (fun fd -> _intf_del fd name intf) - -let intf_list name = - Array.to_list (Sys.readdir ("/sys/class/net/" ^ name ^ "/brif/")) - -let getpath dev attr = Printf.sprintf "/sys/class/net/%s/%s" dev attr - -let is_on_bridge name = try Unix.access (getpath name "brport") [ Unix.F_OK ]; true with _ -> false - -let get_bridge name = Filename.basename (Unix.readlink ((getpath name "brport") ^ "/bridge")) - -let ops = { - kind = Bridge; - - add = add; - del = del; - list = list; - - exists = exists; - - intf_add = intf_add; - intf_del = intf_del; - intf_list = intf_list; - - get_bridge = get_bridge; - is_on_bridge = is_on_bridge; - - set_forward_delay = set_forward_delay; -} - -end - -module Vswitch = struct - -let vsctl_script = "/usr/bin/ovs-vsctl" - -let vsctl args = - Unix.access vsctl_script [ Unix.X_OK ]; - let output, _ = Forkhelpers.execute_command_get_output vsctl_script args in - let stripped = Stringext.String.strip (fun c -> c='\n') output in - match stripped with - | "" -> [] - | s -> Stringext.String.split '\n' s - -let add name ?uuid = - let extra = match uuid with - | Some uuid' -> ["--"; "br-set-external-id"; name; "network-uuids"; uuid'] - | None -> ["--"; "foo"] in - ignore(vsctl (["add-br" ; name] @ extra)) -let del name = ignore(vsctl ["del-br" ; name]) -let list () = vsctl [ "list-br" ] - -let exists name = List.exists (fun x -> x = name) (list ()) - -let intf_add name intf = ignore(vsctl ["add-port"; name; intf]) -let intf_del name intf = ignore(vsctl ["del-port"; name; intf]) -let intf_list name = vsctl [ "list-ports"; name ] - -let get_bridge name = - match vsctl [ "port-to-br"; name ] with - | l::[] -> l - | [] -> failwith ("ovs-vsctl port-to-br: did not return a bridge for port " ^ name) - | _ -> failwith ("ovs-vsctl port-to-br: returned an unexpected number of results for port " ^ name) - -let is_on_bridge name = - match vsctl [ "port-to-br"; name ] with - | l::[] -> true - | [] -> false - | _ -> failwith ("ovs-vsctl port-to-br: returned an unexpected number of results for port " ^ name) - -let ops = { - kind = Vswitch; - - add = add; - del = del; - list = list; - - exists = exists; - - intf_add = intf_add; - intf_del = intf_del; - intf_list = intf_list; - - get_bridge = get_bridge; - is_on_bridge = is_on_bridge; - - set_forward_delay = fun name v -> raise (Invalid_network_backend_operation ("set_forward_delay", Vswitch)) -} - -end - -module Link = struct - -type speed = int (* see CA-24610 *) -type duplex = Duplex_unknown | Duplex_half | Duplex_full - -let string_of_duplex = function - | Duplex_unknown -> "unknown" - | Duplex_half -> "half" - | Duplex_full -> "full" - -let duplex_of_string = function - | "full" -> Duplex_full - | "half" -> Duplex_half - | _ -> Duplex_unknown - -let int_of_speed x = x -let speed_of_int x = x -let speed_unknown = 0 - -external _up : Unix.file_descr -> string -> unit = "stub_link_up" -external _is_up : Unix.file_descr -> string -> bool = "stub_link_is_up" -external _down : Unix.file_descr -> string -> unit = "stub_link_down" -external _multicast : Unix.file_descr -> string -> bool -> unit = "stub_link_multicast" -external _arp : Unix.file_descr -> string -> bool -> unit = "stub_link_arp" -external _change_name : Unix.file_descr -> string -> string -> unit = "stub_link_change_name" -external _get_status : Unix.file_descr -> string -> speed * duplex = "stub_link_get_status" - -let up name = - Internal.with_fd (fun fd -> _up fd name) - -let is_up name = - Internal.with_fd (fun fd -> try _is_up fd name with _ -> false) - -let down name = - Internal.with_fd (fun fd -> _down fd name) - -let multicast name v = - Internal.with_fd (fun fd -> _multicast fd name v) - -let arp name v = - Internal.with_fd (fun fd -> _arp fd name v) - -let change_name name newname = - Internal.with_fd (fun fd -> _change_name fd name newname) - -let set_addr name addr = - (* temporary *) - Internal.exec (Printf.sprintf "ip link set %s addr %s" name addr) - -let get_status name = - Internal.with_fd (fun fd -> _get_status fd name) - -end - -module Addr = struct - -let flush name = - Internal.exec (Printf.sprintf "ip addr flush %s" name) - -external __get_all : unit -> (string * string * string * bool) list = "stub_if_getaddr" - -type addr = IPV4 of string * string | IPV6 of string * string - -let get_all () = - List.map (fun (name, addr, netmask, inet6) -> name, if inet6 then IPV6 (addr,netmask) else IPV4 (addr,netmask)) - (__get_all ()) - -let get_all_ipv4 () = - let ipv4s = List.filter (fun (_, _, _, inet6) -> not inet6) (__get_all ()) in - List.map (fun (name, addr, netmask, _) -> - name, Unix.inet_addr_of_string addr, Unix.inet_addr_of_string netmask - ) ipv4s - -let get name = - List.map (fun (a,b,c) -> (b,c)) (List.filter (fun (dev, _, _) -> dev = name) (get_all_ipv4 ())) - -end - -let list () = - Array.to_list (Sys.readdir "/sys/class/net") - -let getpath dev attr = Printf.sprintf "/sys/class/net/%s/%s" dev attr - -let get_address name = Internal.read_one_line (getpath name "address") - -let get_mtu name = Internal.read_one_line (getpath name "mtu") -let set_mtu name mtu = - Internal.write_one_line (getpath name "mtu") - (string_of_int mtu) - -let get_by_address address = - List.filter - (fun device -> - (* CA-21402: Not everything returned by list() is guaranteed to be a directory containing an address; - so we have to make sure we catch exceptions here so we keep trying the next one and so on.. *) - try String.lowercase (get_address device) = String.lowercase address with _ -> false) - (list ()) - -let get_pcibuspath name = - try - let devpath = Unix.readlink (getpath name "device") in - List.hd (List.rev (String.split '/' devpath)) - with exn -> "N/A" - -let get_carrier name = - let i = int_of_string (Internal.read_one_line (getpath name "carrier")) in - match i with 1 -> true | 0 -> false | _ -> false - -let get_ids name = - let read_id_from path = - try - let l = Internal.read_one_line path in - (* trim 0x *) - String.sub l 2 (String.length l - 2) - with _ -> "" - in - read_id_from (getpath name "device/vendor"), - read_id_from (getpath name "device/device") - -let is_physical name = - try - let link = Unix.readlink (getpath name "device") in - (* filter out device symlinks which look like /../../../devices/xen-backend/vif- *) - not(List.mem "xen-backend" (String.split '/' link)) - with _ -> false - -(* Dispatch network backend operations. *) - -let network_config_file = "/etc/xensource/network.conf" -let network_backend = - try - kind_of_string (String.strip String.isspace (Unixext.read_whole_file_to_string network_config_file)) - with - | Unix.Unix_error(Unix.ENOENT, "open", _) -> Bridge - | Unix.Unix_error(err, op, path) -> failwith (Printf.sprintf "Unix error: %s (%s,%s)\n" (Unix.error_message err) op path) - -let network = match network_backend with - | Bridge -> Bridge.ops - | Vswitch -> Vswitch.ops diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/netdev/netdev.mli --- a/ocaml/netdev/netdev.mli +++ /dev/null @@ -1,138 +0,0 @@ -(* - * Copyright (C) 2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - *) -(** Interface to the domain 0 network stack. *) - -(** Enumerates possible network backend types. *) -type kind = - Bridge (** Linux Bridge based networking *) - | Vswitch (** Vswitch based networking *) - -(** Possible operations on each network backend type. *) -type network_ops = { - kind : kind; (** The type of network backend. *) - add : string -> ?uuid:string -> unit; (** Add a bridge. *) - del : string -> unit; (** Remove a bridge. *) - list : unit -> string list; (** List all bridges. *) - exists : string -> bool; (** Query the existance of a bridge. *) - intf_add : string -> string -> unit; (** Add a network device as a port on a bridge. *) - intf_del : string -> string -> unit; (** Remove a network device from a bridge. *) - intf_list : string -> string list; (** List all network devices currently attached as a port on a bridge. *) - get_bridge : string -> string; (** Return the bridge to which a network device is currently attached. *) - is_on_bridge : string -> bool; (** Query whether a network device is currently attached to a bridge. *) - set_forward_delay : string -> int -> unit;(** Set the forwarding delay for a device on a bridge. *) -} - -(** Raised when an invalid network backend is detected. *) -exception Unknown_network_backend of string - -(** Raised when an operation in network_ops is not valid for a particular kind *) -exception Invalid_network_backend_operation of string * kind - -(** Returns string name of a network backend type. *) -val string_of_kind : kind -> string - -(** Converts a string to a valid network backend type, or raises Unknown_network_backend. *) -val kind_of_string : string -> kind - -(** Module dealing with network device link characteristics *) -module Link : - sig - (** Link speed in megabits. *) - type speed - - (** Convert speed to a string. *) - val int_of_speed : speed -> int - - (** Create speed from a string. *) - val speed_of_int : int -> speed - - (** Magic speed value representing Unknown. *) - val speed_unknown : speed - - (** Device duplex. *) - type duplex = - Duplex_unknown (** Device duplex is unknown. *) - | Duplex_half (** Device is running half-duplex. *) - | Duplex_full (** Device is running full-duplex. *) - - (** Convert duplex setting to string. *) - val string_of_duplex : duplex -> string - - (** Create duplex from a string *) - val duplex_of_string : string -> duplex - - (** Bring up a network device. *) - val up : string -> unit - - (** Determine if a network device is up. *) - val is_up : string -> bool - - (** Bring down a network device. *) - val down : string -> unit - - (** Configure a device to allow or disallow multicast. *) - val multicast : string -> bool -> unit - - (** Configure a device to respond to or ignore ARP requests. *) - val arp : string -> bool -> unit - - (** Change the name of a network device. *) - val change_name : string -> string -> unit - - (** Set MAC address of a device. *) - val set_addr : string -> string -> unit - - (** Get current speed a duplex settings for a device. *) - val get_status : string -> speed * duplex - end - -(** Module dealing with IP addresses on network devices. *) -module Addr : - sig - (** Flush all the addresses configured on a device. *) - val flush : string -> unit - - (** Get all IPV4 addresses associated with a device. *) - val get : string -> (Unix.inet_addr * Unix.inet_addr) list - end - -(** List all the interfaces on the system. *) -val list : unit -> string list - -(** Return MAC address for a network device. *) -val get_address : string -> string - -(** Get device MTU. *) -val get_mtu : string -> string - -(** Set device MTU. *) -val set_mtu : string -> int -> unit - -(** Returns the list of device names (eg physical + VLAN) which a particular MAC address. *) -val get_by_address : string -> string list - -(** Returns the PCI bus path of a device. *) -val get_pcibuspath : string -> string - -(** Returns the carrier status for a device. *) -val get_carrier : string -> bool - -(** Returns PCI vendor and device ID for network device. *) -val get_ids : string -> string * string - -(** Indicates whether the given interface is a physical interface *) -val is_physical : string -> bool - -(** Dispatch operation to correct backend device *) -val network : network_ops diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/netdev/sockios_compat.h --- a/ocaml/netdev/sockios_compat.h +++ /dev/null @@ -1,6 +0,0 @@ -/* Our dom0 chroot doesn't include up to date headers: */ - -#define SIOCBRADDBR 0x89a0 /* create new bridge device */ -#define SIOCBRDELBR 0x89a1 /* remove bridge device */ -#define SIOCBRADDIF 0x89a2 /* add interface to bridge */ -#define SIOCBRDELIF 0x89a3 /* remove interface from bridge */ diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/xapi/OMakefile --- a/ocaml/xapi/OMakefile +++ b/ocaml/xapi/OMakefile @@ -1,10 +1,10 @@ -OCAMLPACKS = xml-light2 cdrom pciutil sexpr log stunnel http-svr rss xen-utils +OCAMLPACKS = xml-light2 cdrom pciutil sexpr log stunnel http-svr rss xen-utils netdev OCAML_LIBS = ../util/version ../util/vm_memory_constraints ../util/sanitycheck ../util/stats \ ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../idl/ocaml_backend/server ../util/ocamltest OCAMLINCLUDES = ../idl ../idl/ocaml_backend \ ../autogen ../database/ \ ../xenops ../xva ../util \ - ../netdev ../auth ../license ../client_records ../rfb ../gpg + ../auth ../license ../client_records ../rfb ../gpg @@ -14,7 +14,7 @@ # xen stuff at all. # NB order of libraries is important: OMake cannot determine dependencies between libraries # (the same holds for OCaml packages) -XEN_OCAML_LIBS = ../netdev/netdev ../xenops/xenops ../auth/pam +XEN_OCAML_LIBS = ../xenops/xenops ../auth/pam XEN_OCAMLINCLUDES = XEN_OCAMLPACKS = xc xs cpuid OCAML_CLIBS = $(if $(equal $(COMPILE_XENSTUFF), yes), $(XEN_OCAML_CLIBS) $(OCAML_CLIBS), $(OCAML_CLIBS)) diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/xe-cli/OMakefile --- a/ocaml/xe-cli/OMakefile +++ b/ocaml/xe-cli/OMakefile @@ -11,11 +11,10 @@ section - OCAMLPACKS += xb xs - OCAML_CLIBS = ../xenops/statdev_stubs ../netdev/netdev_stubs + OCAMLPACKS += xb xs netdev + OCAML_CLIBS = ../xenops/statdev_stubs OCamlProgram(fatxe, cli options \ - ../netdev/netdev \ ../xapi/xapi_cli \ ../xapi/pool_role \ ../xapi/helpers \ diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/xe-cli/rt/OMakefile --- a/ocaml/xe-cli/rt/OMakefile +++ b/ocaml/xe-cli/rt/OMakefile @@ -1,6 +1,6 @@ -OCAML_LIBS = ../../netdev/netdev -OCAMLINCLUDES = ../../netdev -OCAMLPACKS = str xml-light2 log +OCAML_LIBS = +OCAMLINCLUDES = +OCAMLPACKS = str xml-light2 log netdev .SUBDIRS:geneva diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/xenops-ts/OMakefile --- a/ocaml/xenops-ts/OMakefile +++ b/ocaml/xenops-ts/OMakefile @@ -1,8 +1,8 @@ -OCAMLINCLUDES = ../netdev ../xenops -OCAML_LIBS = ../util/stats ../netdev/netdev ../xenops/xenops +OCAMLINCLUDES = ../xenops +OCAML_LIBS = ../util/stats ../xenops/xenops OCAML_CLIBS += $(XEN_OCAML_CLIBS) OCAML_LINK_FLAGS += $(XEN_OCAML_LINK_FLAGS) CFLAGS += $(XEN_CFLAGS) -OCAMLPACKS = xc xs stdext log cdrom +OCAMLPACKS = xc xs stdext log cdrom netdev OCamlProgram(runtest, runtest test ../xenops/xenvmlib) diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/xenops/OMakefile --- a/ocaml/xenops/OMakefile +++ b/ocaml/xenops/OMakefile @@ -1,10 +1,10 @@ -OCAMLINCLUDES = ../netdev ../util -OCAML_LIBS = ../netdev/netdev ../util/stats +OCAMLINCLUDES = ../util +OCAML_LIBS = ../util/stats OCAML_CLIBS += $(XEN_OCAML_CLIBS) OCAML_LINK_FLAGS+= $(XEN_OCAML_LINK_FLAGS) CFLAGS += $(XEN_CFLAGS) -OCAMLPACKS = threads xc xs stdext log cdrom +OCAMLPACKS = threads xc xs stdext log cdrom netdev OCAMLFLAGS += -thread LIBFILES = xenops_helpers xenbus balloon xenguestHelper domain hotplug device io statdev xal netman memory watch device_common squeeze squeeze_xen squeezed_rpc squeezed_state squeezed_rpc @@ -42,7 +42,7 @@ OCamlProgram(dbgring, dbgring) section - OCAMLINCLUDES = ../idl/ocaml_backend ../netdev ../idl + OCAMLINCLUDES = ../idl/ocaml_backend ../idl OCAMLFLAGS = -dtypes -warn-error F -cclib -static OCAMLPACKS = xc xs OCamlProgram(xs, xenstore_readdir) diff -r 9a542a51a306 -r b479ad2cbb9f ocaml/xiu/OMakefile --- a/ocaml/xiu/OMakefile +++ b/ocaml/xiu/OMakefile @@ -1,6 +1,6 @@ -OCAMLPACKS = stdext xs -OCAML_LIBS += ../xenops/xenops ../netdev/netdev -OCAMLINCLUDES += ../xenops ../netdev +OCAMLPACKS = stdext xs netdev +OCAML_LIBS += ../xenops/xenops +OCAMLINCLUDES += ../xenops OCamlProgram(xiu, xiu) OCamlDocProgram(xiu, xiu) --===============1351499780== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1351499780==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 06:32:45 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 06:32:45 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbgb-00053F-Mj; Fri, 18 Jun 2010 06:32:45 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPbWM-00024z-R4 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 06:22:10 -0700 X-ASG-Debug-ID: 1276867326-59bd00c20000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 427F829BF96 for ; Fri, 18 Jun 2010 06:22:07 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 1DjaQfZEmnDA6BKE (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 06:22:07 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,439,1272844800"; d="scan'208";a="479685" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 13:22:06 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 14:22:06 +0100 Received: from snoosnoo2.uk.xensource.com ([10.80.2.49]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPbWI-0000eH-0f for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:22:06 +0100 Content-Type: multipart/mixed; boundary="===============0086112594==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Move the netdev library from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library X-Mercurial-Node: da421c1ed9afabd572b84468a05ea5956b95e2dc Message-ID: User-Agent: Mercurial-patchbomb/1.3.1 Date: Fri, 18 Jun 2010 13:21:36 +0000 From: Jonathan Ludlam To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276867329 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32869 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Move the netdev library from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0086112594== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Signed-off-by: Jon Ludlam Makefile.in | 5 + netdev/META.in | 4 + netdev/Makefile | 72 +++++++++ netdev/addr_stubs.c | 116 ++++++++++++++ netdev/bridge_stubs.c | 85 ++++++++++ netdev/link_stubs.c | 179 ++++++++++++++++++++++ netdev/netdev.h | 33 ++++ netdev/netdev.ml | 412 +++++++++++++++++++++++++++++++++++++++++++++++++++ netdev/netdev.mli | 138 +++++++++++++++++ netdev/sockios_compat.h | 6 + xapi-libs.spec | 1 + 11 files changed, 1051 insertions(+), 0 deletions(-) --===============0086112594== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User Jonathan Ludlam # Date 1276867292 -3600 # Node ID da421c1ed9afabd572b84468a05ea5956b95e2dc # Parent dafedf66e1a49a74f27692db49e7f615452e6e49 Move netdev from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library Signed-off-by: Jon Ludlam diff -r dafedf66e1a4 -r da421c1ed9af Makefile.in --- a/Makefile.in +++ b/Makefile.in @@ -37,6 +37,7 @@ allxen: ifeq ($(HAVE_XEN),1) $(MAKE) -C mmap + $(MAKE) -C netdev $(MAKE) -C xc $(MAKE) -C xb $(MAKE) -C xs @@ -74,6 +75,7 @@ installxen: ifeq ($(HAVE_XEN),1) $(MAKE) -C mmap install + $(MAKE) -C netdev install $(MAKE) -C xc install $(MAKE) -C xb install $(MAKE) -C xs install @@ -112,6 +114,7 @@ ifeq ($(HAVE_XEN),1) $(MAKE) -C eventchn uninstall $(MAKE) -C xsrpc uninstall + $(MAKE) -C netdev uninstall $(MAKE) -C xs uninstall $(MAKE) -C xb uninstall $(MAKE) -C xc uninstall @@ -162,6 +165,7 @@ $(MAKE) -C stunnel doc $(MAKE) -C xsrpc doc $(MAKE) -C mmap doc + $(MAKE) -C netdev doc $(MAKE) -C forking_executioner doc $(MAKE) -C mlvm doc $(MAKE) -C cpuid doc @@ -190,6 +194,7 @@ cleanxen: $(MAKE) -C mmap clean + $(MAKE) -C netdev clean $(MAKE) -C xc clean $(MAKE) -C xb clean $(MAKE) -C xs clean diff -r dafedf66e1a4 -r da421c1ed9af netdev/META.in --- /dev/null +++ b/netdev/META.in @@ -0,0 +1,4 @@ +version = "@VERSION@" +description = "Bindings to network APIs" +requires = "stdext" +archive(native) = "netdev.cmxa" diff -r dafedf66e1a4 -r da421c1ed9af netdev/Makefile --- /dev/null +++ b/netdev/Makefile @@ -0,0 +1,72 @@ +CC = gcc +CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml +OCAMLC = ocamlc -g +OCAMLOPT = ocamlopt + +LDFLAGS = -cclib -L./ + +VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) +OCAMLOPTFLAGS = -g -dtypes +OCAMLFLAGS = -I ../stdext + +OCAMLABI := $(shell ocamlc -version) +OCAMLLIBDIR := $(shell ocamlc -where) +OCAMLDESTDIR ?= $(OCAMLLIBDIR) + +OBJS = netdev +INTF = $(foreach obj, $(OBJS),$(obj).cmi) +LIBS = netdev.cma netdev.cmxa + +DOCDIR = /myrepos/xen-api-libs.hg/doc + +all: $(INTF) $(LIBS) $(PROGRAMS) + +bins: $(PROGRAMS) + +libs: $(LIBS) + +netdev.cmxa: libnetdev_stubs.a $(foreach obj,$(OBJS),$(obj).cmx) + $(OCAMLOPT) $(OCAMLOPTFLAGS) $(OCAMLFLAGS) -a -o $@ -cclib -lnetdev_stubs $(foreach obj,$(OBJS),$(obj).cmx) + +netdev.cma: libnetdev_stubs.a $(foreach obj,$(OBJS),$(obj).cmo) + $(OCAMLC) $(OCAMLFLAGS) -a -dllib dllnetdev_stubs.so -cclib -lnetdev_stubs -o $@ $(foreach obj,$(OBJS),$(obj).cmo) + +netdev_stubs.a: addr_stubs.o bridge_stubs.o link_stubs.o + ocamlmklib -o netdev_stubs $+ + +libnetdev_stubs.a: addr_stubs.o bridge_stubs.o link_stubs.o + ar rcs $@ $+ + ocamlmklib -o netdev_stubs $+ + +%.cmo: %.ml + $(OCAMLC) $(OCAMLFLAGS) -c -o $@ $< + +%.cmi: %.mli + $(OCAMLC) $(OCAMLFLAGS) -c -o $@ $< + +%.cmx: %.ml + $(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) -c -o $@ $< + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +META: META.in + sed 's/@VERSION@/$(VERSION)/g' < $< > $@ + +.PHONY: install +install: path = $(DESTDIR)$(shell ocamlfind printconf destdir) +install: $(LIBS) META + mkdir -p $(path) + ocamlfind install -destdir $(path) -ldconf ignore netdev META $(INTF) $(LIBS) *.a *.so *.cmx + +.PHONY: uninstall +uninstall: + ocamlfind remove netdev + +.PHONY: doc +doc: $(INTF) + python ../doc/doc.py $(DOCDIR) "netdev" "package" "$(OBJS)" "." "" "" + +clean: + rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS) + diff -r dafedf66e1a4 -r da421c1ed9af netdev/addr_stubs.c --- /dev/null +++ b/netdev/addr_stubs.c @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ +/* + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +static value alloc_addr(struct sockaddr *sock) +{ + CAMLparam0(); + CAMLlocal1(result); + char output[36]; + int ret = 0; + + switch (sock->sa_family) { + case AF_INET: { + struct sockaddr_in *in = (struct sockaddr_in *) sock; + int v = ntohl(in->sin_addr.s_addr); + ret = snprintf(output, sizeof(output), "%u.%u.%u.%u", + (v >> 24) & 0xff, (v >> 16) & 0xff, + (v >> 8) & 0xff, v & 0xff); + break; + } + case AF_INET6: { + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) sock; + ret = snprintf(output, sizeof(output), + "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", + in6->sin6_addr.s6_addr[0], + in6->sin6_addr.s6_addr[1], + in6->sin6_addr.s6_addr[2], + in6->sin6_addr.s6_addr[3], + in6->sin6_addr.s6_addr[4], + in6->sin6_addr.s6_addr[5], + in6->sin6_addr.s6_addr[6], + in6->sin6_addr.s6_addr[7], + in6->sin6_addr.s6_addr[8], + in6->sin6_addr.s6_addr[9], + in6->sin6_addr.s6_addr[10], + in6->sin6_addr.s6_addr[11], + in6->sin6_addr.s6_addr[12], + in6->sin6_addr.s6_addr[13]); + break; + } + default: + /* just ignore */ + ; + } + result = caml_alloc_string(ret); + memcpy(String_val(result), output, ret); + CAMLreturn(result); +} + +value stub_if_getaddr(value unit) +{ + CAMLparam0(); + CAMLlocal5(result, temp, name, addrstr, netmaskstr); + CAMLlocal1(tuple); + int ret; + struct ifaddrs *ifaddrs, *tmp; + struct sockaddr *sock, *netmask; + + result = temp = Val_emptylist; + name = addrstr = Val_int(0); + + ret = getifaddrs(&ifaddrs); + if (ret < 0) + caml_failwith("cannot get interface address"); + + for (tmp = ifaddrs; tmp; tmp = tmp->ifa_next) { + sock = tmp->ifa_addr; + netmask = tmp->ifa_netmask; + + if (sock->sa_family == AF_INET || sock->sa_family == AF_INET6) { + name = caml_copy_string(tmp->ifa_name); + addrstr = alloc_addr(sock); + netmaskstr = alloc_addr(netmask); + + tuple = caml_alloc_tuple(4); + Store_field(tuple, 0, name); + Store_field(tuple, 1, addrstr); + Store_field(tuple, 2, netmaskstr); + Store_field(tuple, 3, Val_bool(sock->sa_family == AF_INET6)); + + result = caml_alloc_small(2, Tag_cons); + Field(result, 0) = tuple; + Field(result, 1) = temp; + + temp = result; + } + } + + freeifaddrs(ifaddrs); + + CAMLreturn(result); +} diff -r dafedf66e1a4 -r da421c1ed9af netdev/bridge_stubs.c --- /dev/null +++ b/netdev/bridge_stubs.c @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ +/* + */ + +#include "netdev.h" + +#include +#include +#include +#include +#include +#include + +value stub_bridge_add(value fd, value name) +{ + CAMLparam2(fd, name); + int err; + + err = ioctl(Int_val(fd), SIOCBRADDBR, String_val(name)); + CHECK_IOCTL(err, "bridge add"); + CAMLreturn(Val_unit); +} + +value stub_bridge_del(value fd, value name) +{ + CAMLparam2(fd, name); + int err; + + err = ioctl(Int_val(fd), SIOCBRDELBR, String_val(name)); + CHECK_IOCTL(err, "bridge del"); + CAMLreturn(Val_unit); +} + +value stub_bridge_intf_add(value fd, value name, value intf) +{ + CAMLparam3(fd, name, intf); + int err; + struct ifreq ifr; + int ifindex; + + ifindex = if_nametoindex(String_val(intf)); + if (ifindex == 0) + caml_failwith("Device_not_found"); + + memset(ifr.ifr_name, '\000', IFNAMSIZ); + strncpy(ifr.ifr_name, String_val(name), IFNAMSIZ); + ifr.ifr_ifindex = ifindex; + + err = ioctl(Int_val(fd), SIOCBRADDIF, &ifr); + CHECK_IOCTL(err, "bridge intf add"); + CAMLreturn(Val_unit); +} + +value stub_bridge_intf_del(value fd, value name, value intf) +{ + CAMLparam3(fd, name, intf); + int err; + struct ifreq ifr; + int ifindex; + + ifindex = if_nametoindex(String_val(intf)); + if (ifindex == 0) + caml_failwith("Device_not_found"); + + memset(ifr.ifr_name, '\000', IFNAMSIZ); + strncpy(ifr.ifr_name, String_val(name), IFNAMSIZ); + ifr.ifr_ifindex = ifindex; + + err = ioctl(Int_val(fd), SIOCBRDELIF, &ifr); + CHECK_IOCTL(err, "bridge intf del"); + + CAMLreturn(Val_unit); +} diff -r dafedf66e1a4 -r da421c1ed9af netdev/link_stubs.c --- /dev/null +++ b/netdev/link_stubs.c @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ +/* + */ + +#include "netdev.h" + +#include +#include +#include +#include +#include +#include + +#define SET_IFREQ(ifreq, devname) \ + strncpy(ifreq.ifr_name, devname, IFNAMSIZ) + +static int link_change_flags(int fd, char *name, + unsigned int flags, unsigned int mask) +{ + struct ifreq ifr; + int ret; + + SET_IFREQ(ifr, name); + ret = ioctl(fd, SIOCGIFFLAGS, &ifr); + if (ret < 0) + return ret; + if ((ifr.ifr_flags ^ flags) & mask) { + ifr.ifr_flags &= ~mask; + ifr.ifr_flags |= mask & flags; + ret = ioctl(fd, SIOCSIFFLAGS, &ifr); + } + return ret; +} + +static int link_change_name(int fd, char *name, char *newname) +{ + struct ifreq ifr; + int ret; + + SET_IFREQ(ifr, name); + strncpy(ifr.ifr_newname, newname, IFNAMSIZ); + ret = ioctl(fd, SIOCSIFNAME, &ifr); + return ret; +} + +value stub_link_up(value fd, value dev) +{ + CAMLparam2(fd, dev); + int err; + err = link_change_flags(Int_val(fd), String_val(dev), IFF_UP, IFF_UP); + CHECK_IOCTL(err, "link up"); + CAMLreturn(Val_unit); +} + +value stub_link_is_up(value fd, value dev) +{ + CAMLparam2(fd, dev); + struct ifreq ifr; + int err; + + SET_IFREQ(ifr, String_val(dev)); + err = ioctl(Int_val(fd), SIOCGIFFLAGS, &ifr); + CHECK_IOCTL(err, "link_is_up"); + CAMLreturn(Val_bool (ifr.ifr_flags & IFF_UP)); +} + +value stub_link_down(value fd, value dev) +{ + CAMLparam2(fd, dev); + int err; + err = link_change_flags(Int_val(fd), String_val(dev), 0, IFF_UP); + CHECK_IOCTL(err, "link down"); + + CAMLreturn(Val_unit); +} + +value stub_link_change_name(value fd, value dev, value newname) +{ + CAMLparam3(fd, dev, newname); + int err; + + err = link_change_name(Int_val(fd), + String_val(dev), String_val(newname)); + CHECK_IOCTL(err, "link change name"); + CAMLreturn(Val_unit); +} + +value stub_link_multicast(value fd, value dev, value v) +{ + CAMLparam3(fd, dev, v); + int err; + err = link_change_flags(Int_val(fd), String_val(dev), + ((Bool_val(v)) ? IFF_MULTICAST : 0), IFF_MULTICAST); + CHECK_IOCTL(err, "link multicast"); + CAMLreturn(Val_unit); +} + +value stub_link_arp(value fd, value dev, value v) +{ + CAMLparam3(fd, dev, v); + int err; + err = link_change_flags(Int_val(fd), String_val(dev), + ((Bool_val(v)) ? 0 : IFF_NOARP), IFF_NOARP); + CHECK_IOCTL(err, "link arp"); + CAMLreturn(Val_unit); +} + +#ifdef SIOCETHTOOL +#define ETHTOOL_GSET 0x00000001 /* Get settings. */ + +#include +/* copied from linux/ethtool.h and made compilable with userspace types */ +struct ethtool_cmd { + uint32_t cmd; + uint32_t supported; /* Features this interface supports */ + uint32_t advertising; /* Features this interface advertises */ + uint16_t speed; /* The forced speed, 10Mb, 100Mb, gigabit */ + uint8_t duplex; /* Duplex, half or full */ + uint8_t port; /* Which connector port */ + uint8_t phy_address; + uint8_t transceiver; /* Which transceiver to use */ + uint8_t autoneg; /* Enable or disable autonegotiation */ + uint32_t maxtxpkt; /* Tx pkts before generating tx int */ + uint32_t maxrxpkt; /* Rx pkts before generating rx int */ + uint32_t reserved[4]; +}; + +value stub_link_get_status(value fd, value dev) +{ + CAMLparam2(fd, dev); + CAMLlocal1(ret); + struct ifreq ifr; + struct ethtool_cmd ecmd; + int err, speed, duplex; + + SET_IFREQ(ifr, String_val(dev)); + ecmd.cmd = ETHTOOL_GSET; + ifr.ifr_data = (caddr_t) &ecmd; + err = ioctl(Int_val(fd), SIOCETHTOOL, &ifr); + CHECK_IOCTL(err, "get ethtool"); + + /* CA-24610: apparently speeds can be other values eg 2500 */ + speed = ecmd.speed; + + switch (ecmd.duplex) { + case 0: duplex = 1; break; + case 1: duplex = 2; break; + default: duplex = 0; + } + + ret = caml_alloc_tuple(2); + Store_field(ret, 0, Val_int(speed)); + Store_field(ret, 1, Val_int(duplex)); + + CAMLreturn(ret); +} +#else +value stub_link_get_status(value fd, value dev) +{ + CAMLparam2(fd, dev); + CAMLlocal1(ret); + ret = caml_alloc_tuple(2); + Store_field(ret, 0, Val_int(0)); /* unknown speed */ + Store_field(ret, 1, Val_int(0)); /* unknown duplex */ + CAMLreturn(ret); +} +#endif diff -r dafedf66e1a4 -r da421c1ed9af netdev/netdev.h --- /dev/null +++ b/netdev/netdev.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ +/* + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SIOCBRADDBR +#include "sockios_compat.h" +#endif + +#define CHECK_IOCTL(err, S) \ + if (err < 0) { \ + caml_failwith(S ": ioctl failed"); \ + } diff -r dafedf66e1a4 -r da421c1ed9af netdev/netdev.ml --- /dev/null +++ b/netdev/netdev.ml @@ -0,0 +1,412 @@ +(* + * Copyright (C) 2006-2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + *) +open Stringext +open Forkhelpers + +type kind = Bridge | Vswitch + +type network_ops = { + kind: kind; + add: string -> ?uuid:string -> unit; + del: string -> unit; + list: unit -> string list; + + exists: string -> bool; + + intf_add: string -> string -> unit; + intf_del: string -> string -> unit; + intf_list: string -> string list; + + get_bridge: string -> string; + is_on_bridge: string -> bool; + + set_forward_delay: string -> int -> unit; +} + +exception Unknown_network_backend of string +exception Invalid_network_backend_operation of string * kind + +let string_of_kind kind = match kind with + | Bridge -> "bridge" + | Vswitch -> "openvswitch" + +let kind_of_string s = match s with + | "bridge" -> Bridge + | "vswitch" -> Vswitch + | "openvswitch" -> Vswitch + | _ -> raise (Unknown_network_backend s) + +module Internal = struct + +let control_socket () = + try + Unix.socket Unix.PF_INET Unix.SOCK_DGRAM 0 + with + exn -> + try + Unix.socket Unix.PF_UNIX Unix.SOCK_DGRAM 0 + with + exn -> + Unix.socket Unix.PF_INET6 Unix.SOCK_DGRAM 0 + +let with_fd f = + let fd = control_socket () in + let r = begin try + f fd + with + exn -> + Unix.close fd; + raise exn + end in + Unix.close fd; + r + +let exec cmd = + let ret = Sys.command cmd in + if ret <> 0 then + failwith (Printf.sprintf "cmd returned %d" ret) + +let read_one_line file = + let inchan = open_in file in + try + let result = input_line inchan in + close_in inchan; + result + with exn -> close_in inchan; raise exn + +let write_one_line file l = + let outchan = open_out file in + try + output_string outchan (l ^ "\n"); + close_out outchan + with + exn -> close_out outchan; raise exn +end + +module Bridge = struct + +external _add : Unix.file_descr -> string -> unit = "stub_bridge_add" +external _del : Unix.file_descr -> string -> unit = "stub_bridge_del" + +let add name ?uuid = + Internal.with_fd (fun fd -> _add fd name) + +let del name = + Internal.with_fd (fun fd -> _del fd name) + +let list () = + let dirs = Array.to_list (Sys.readdir "/sys/class/net") in + List.filter (fun dir -> + Sys.file_exists ("/sys/class/net/" ^ dir ^ "/bridge")) dirs + +let exists name = + try Sys.file_exists ("/sys/class/net/" ^ name ^ "/bridge") + with _ -> false + +let set name obj v = + let file = "/sys/class/net/" ^ name ^ "/bridge/" ^ obj in + let outchan = open_out file in + output_string outchan v; + output_char outchan '\n'; + close_out outchan + +let get name obj = Internal.read_one_line ("/sys/class/net/" ^ name ^ "/bridge/" ^ obj) + +let _forward_delay = "forward_delay" +let _hello_time = "hello_time" +let _max_age = "max_age" +let _ageing_time = "ageing_time" +let _stp_state = "stp_state" +let _priority = "priority" +let _bridge_id = "bridge_id" + +let get_id name = + get name _bridge_id + +let set_forward_delay name v = + set name _forward_delay (string_of_int v) + +let get_forward_delay name = + int_of_string (get name _forward_delay) + +let set_hello_time name v = + set name _hello_time (string_of_int v) + +let get_hello_time name = + int_of_string (get name _hello_time) + +let set_max_age name v = + set name _max_age (string_of_int v) + +let get_max_age name = + int_of_string (get name _max_age) + +let set_ageing_time name v = + set name _ageing_time (string_of_int v) + +let get_ageing_time name = + int_of_string (get name _ageing_time) + +let set_stp_state name v = + set name _stp_state (if v then "1" else "0") + +let get_stp_state name = + get name _stp_state <> "0" + +let set_priority name v = + set name _priority (string_of_int v) + +let get_priority name = + int_of_string (get name _priority) + +(* bridge interfaces control function *) +external _intf_add : Unix.file_descr -> string -> string -> unit + = "stub_bridge_intf_add" +external _intf_del : Unix.file_descr -> string -> string -> unit + = "stub_bridge_intf_del" + +let intf_add name intf = + Internal.with_fd (fun fd -> _intf_add fd name intf) + +let intf_del name intf = + Internal.with_fd (fun fd -> _intf_del fd name intf) + +let intf_list name = + Array.to_list (Sys.readdir ("/sys/class/net/" ^ name ^ "/brif/")) + +let getpath dev attr = Printf.sprintf "/sys/class/net/%s/%s" dev attr + +let is_on_bridge name = try Unix.access (getpath name "brport") [ Unix.F_OK ]; true with _ -> false + +let get_bridge name = Filename.basename (Unix.readlink ((getpath name "brport") ^ "/bridge")) + +let ops = { + kind = Bridge; + + add = add; + del = del; + list = list; + + exists = exists; + + intf_add = intf_add; + intf_del = intf_del; + intf_list = intf_list; + + get_bridge = get_bridge; + is_on_bridge = is_on_bridge; + + set_forward_delay = set_forward_delay; +} + +end + +module Vswitch = struct + +let vsctl_script = "/usr/bin/ovs-vsctl" + +let vsctl args = + Unix.access vsctl_script [ Unix.X_OK ]; + let output, _ = Forkhelpers.execute_command_get_output vsctl_script args in + let stripped = Stringext.String.strip (fun c -> c='\n') output in + match stripped with + | "" -> [] + | s -> Stringext.String.split '\n' s + +let add name ?uuid = + let extra = match uuid with + | Some uuid' -> ["--"; "br-set-external-id"; name; "network-uuids"; uuid'] + | None -> ["--"; "foo"] in + ignore(vsctl (["add-br" ; name] @ extra)) +let del name = ignore(vsctl ["del-br" ; name]) +let list () = vsctl [ "list-br" ] + +let exists name = List.exists (fun x -> x = name) (list ()) + +let intf_add name intf = ignore(vsctl ["add-port"; name; intf]) +let intf_del name intf = ignore(vsctl ["del-port"; name; intf]) +let intf_list name = vsctl [ "list-ports"; name ] + +let get_bridge name = + match vsctl [ "port-to-br"; name ] with + | l::[] -> l + | [] -> failwith ("ovs-vsctl port-to-br: did not return a bridge for port " ^ name) + | _ -> failwith ("ovs-vsctl port-to-br: returned an unexpected number of results for port " ^ name) + +let is_on_bridge name = + match vsctl [ "port-to-br"; name ] with + | l::[] -> true + | [] -> false + | _ -> failwith ("ovs-vsctl port-to-br: returned an unexpected number of results for port " ^ name) + +let ops = { + kind = Vswitch; + + add = add; + del = del; + list = list; + + exists = exists; + + intf_add = intf_add; + intf_del = intf_del; + intf_list = intf_list; + + get_bridge = get_bridge; + is_on_bridge = is_on_bridge; + + set_forward_delay = fun name v -> raise (Invalid_network_backend_operation ("set_forward_delay", Vswitch)) +} + +end + +module Link = struct + +type speed = int (* see CA-24610 *) +type duplex = Duplex_unknown | Duplex_half | Duplex_full + +let string_of_duplex = function + | Duplex_unknown -> "unknown" + | Duplex_half -> "half" + | Duplex_full -> "full" + +let duplex_of_string = function + | "full" -> Duplex_full + | "half" -> Duplex_half + | _ -> Duplex_unknown + +let int_of_speed x = x +let speed_of_int x = x +let speed_unknown = 0 + +external _up : Unix.file_descr -> string -> unit = "stub_link_up" +external _is_up : Unix.file_descr -> string -> bool = "stub_link_is_up" +external _down : Unix.file_descr -> string -> unit = "stub_link_down" +external _multicast : Unix.file_descr -> string -> bool -> unit = "stub_link_multicast" +external _arp : Unix.file_descr -> string -> bool -> unit = "stub_link_arp" +external _change_name : Unix.file_descr -> string -> string -> unit = "stub_link_change_name" +external _get_status : Unix.file_descr -> string -> speed * duplex = "stub_link_get_status" + +let up name = + Internal.with_fd (fun fd -> _up fd name) + +let is_up name = + Internal.with_fd (fun fd -> try _is_up fd name with _ -> false) + +let down name = + Internal.with_fd (fun fd -> _down fd name) + +let multicast name v = + Internal.with_fd (fun fd -> _multicast fd name v) + +let arp name v = + Internal.with_fd (fun fd -> _arp fd name v) + +let change_name name newname = + Internal.with_fd (fun fd -> _change_name fd name newname) + +let set_addr name addr = + (* temporary *) + Internal.exec (Printf.sprintf "ip link set %s addr %s" name addr) + +let get_status name = + Internal.with_fd (fun fd -> _get_status fd name) + +end + +module Addr = struct + +let flush name = + Internal.exec (Printf.sprintf "ip addr flush %s" name) + +external __get_all : unit -> (string * string * string * bool) list = "stub_if_getaddr" + +type addr = IPV4 of string * string | IPV6 of string * string + +let get_all () = + List.map (fun (name, addr, netmask, inet6) -> name, if inet6 then IPV6 (addr,netmask) else IPV4 (addr,netmask)) + (__get_all ()) + +let get_all_ipv4 () = + let ipv4s = List.filter (fun (_, _, _, inet6) -> not inet6) (__get_all ()) in + List.map (fun (name, addr, netmask, _) -> + name, Unix.inet_addr_of_string addr, Unix.inet_addr_of_string netmask + ) ipv4s + +let get name = + List.map (fun (a,b,c) -> (b,c)) (List.filter (fun (dev, _, _) -> dev = name) (get_all_ipv4 ())) + +end + +let list () = + Array.to_list (Sys.readdir "/sys/class/net") + +let getpath dev attr = Printf.sprintf "/sys/class/net/%s/%s" dev attr + +let get_address name = Internal.read_one_line (getpath name "address") + +let get_mtu name = Internal.read_one_line (getpath name "mtu") +let set_mtu name mtu = + Internal.write_one_line (getpath name "mtu") + (string_of_int mtu) + +let get_by_address address = + List.filter + (fun device -> + (* CA-21402: Not everything returned by list() is guaranteed to be a directory containing an address; + so we have to make sure we catch exceptions here so we keep trying the next one and so on.. *) + try String.lowercase (get_address device) = String.lowercase address with _ -> false) + (list ()) + +let get_pcibuspath name = + try + let devpath = Unix.readlink (getpath name "device") in + List.hd (List.rev (String.split '/' devpath)) + with exn -> "N/A" + +let get_carrier name = + let i = int_of_string (Internal.read_one_line (getpath name "carrier")) in + match i with 1 -> true | 0 -> false | _ -> false + +let get_ids name = + let read_id_from path = + try + let l = Internal.read_one_line path in + (* trim 0x *) + String.sub l 2 (String.length l - 2) + with _ -> "" + in + read_id_from (getpath name "device/vendor"), + read_id_from (getpath name "device/device") + +let is_physical name = + try + let link = Unix.readlink (getpath name "device") in + (* filter out device symlinks which look like /../../../devices/xen-backend/vif- *) + not(List.mem "xen-backend" (String.split '/' link)) + with _ -> false + +(* Dispatch network backend operations. *) + +let network_config_file = "/etc/xensource/network.conf" +let network_backend = + try + kind_of_string (String.strip String.isspace (Unixext.read_whole_file_to_string network_config_file)) + with + | Unix.Unix_error(Unix.ENOENT, "open", _) -> Bridge + | Unix.Unix_error(err, op, path) -> failwith (Printf.sprintf "Unix error: %s (%s,%s)\n" (Unix.error_message err) op path) + +let network = match network_backend with + | Bridge -> Bridge.ops + | Vswitch -> Vswitch.ops diff -r dafedf66e1a4 -r da421c1ed9af netdev/netdev.mli --- /dev/null +++ b/netdev/netdev.mli @@ -0,0 +1,138 @@ +(* + * Copyright (C) 2009 Citrix Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + *) +(** Interface to the domain 0 network stack. *) + +(** Enumerates possible network backend types. *) +type kind = + Bridge (** Linux Bridge based networking *) + | Vswitch (** Vswitch based networking *) + +(** Possible operations on each network backend type. *) +type network_ops = { + kind : kind; (** The type of network backend. *) + add : string -> ?uuid:string -> unit; (** Add a bridge. *) + del : string -> unit; (** Remove a bridge. *) + list : unit -> string list; (** List all bridges. *) + exists : string -> bool; (** Query the existance of a bridge. *) + intf_add : string -> string -> unit; (** Add a network device as a port on a bridge. *) + intf_del : string -> string -> unit; (** Remove a network device from a bridge. *) + intf_list : string -> string list; (** List all network devices currently attached as a port on a bridge. *) + get_bridge : string -> string; (** Return the bridge to which a network device is currently attached. *) + is_on_bridge : string -> bool; (** Query whether a network device is currently attached to a bridge. *) + set_forward_delay : string -> int -> unit;(** Set the forwarding delay for a device on a bridge. *) +} + +(** Raised when an invalid network backend is detected. *) +exception Unknown_network_backend of string + +(** Raised when an operation in network_ops is not valid for a particular kind *) +exception Invalid_network_backend_operation of string * kind + +(** Returns string name of a network backend type. *) +val string_of_kind : kind -> string + +(** Converts a string to a valid network backend type, or raises Unknown_network_backend. *) +val kind_of_string : string -> kind + +(** Module dealing with network device link characteristics *) +module Link : + sig + (** Link speed in megabits. *) + type speed + + (** Convert speed to a string. *) + val int_of_speed : speed -> int + + (** Create speed from a string. *) + val speed_of_int : int -> speed + + (** Magic speed value representing Unknown. *) + val speed_unknown : speed + + (** Device duplex. *) + type duplex = + Duplex_unknown (** Device duplex is unknown. *) + | Duplex_half (** Device is running half-duplex. *) + | Duplex_full (** Device is running full-duplex. *) + + (** Convert duplex setting to string. *) + val string_of_duplex : duplex -> string + + (** Create duplex from a string *) + val duplex_of_string : string -> duplex + + (** Bring up a network device. *) + val up : string -> unit + + (** Determine if a network device is up. *) + val is_up : string -> bool + + (** Bring down a network device. *) + val down : string -> unit + + (** Configure a device to allow or disallow multicast. *) + val multicast : string -> bool -> unit + + (** Configure a device to respond to or ignore ARP requests. *) + val arp : string -> bool -> unit + + (** Change the name of a network device. *) + val change_name : string -> string -> unit + + (** Set MAC address of a device. *) + val set_addr : string -> string -> unit + + (** Get current speed a duplex settings for a device. *) + val get_status : string -> speed * duplex + end + +(** Module dealing with IP addresses on network devices. *) +module Addr : + sig + (** Flush all the addresses configured on a device. *) + val flush : string -> unit + + (** Get all IPV4 addresses associated with a device. *) + val get : string -> (Unix.inet_addr * Unix.inet_addr) list + end + +(** List all the interfaces on the system. *) +val list : unit -> string list + +(** Return MAC address for a network device. *) +val get_address : string -> string + +(** Get device MTU. *) +val get_mtu : string -> string + +(** Set device MTU. *) +val set_mtu : string -> int -> unit + +(** Returns the list of device names (eg physical + VLAN) which a particular MAC address. *) +val get_by_address : string -> string list + +(** Returns the PCI bus path of a device. *) +val get_pcibuspath : string -> string + +(** Returns the carrier status for a device. *) +val get_carrier : string -> bool + +(** Returns PCI vendor and device ID for network device. *) +val get_ids : string -> string * string + +(** Indicates whether the given interface is a physical interface *) +val is_physical : string -> bool + +(** Dispatch operation to correct backend device *) +val network : network_ops diff -r dafedf66e1a4 -r da421c1ed9af netdev/sockios_compat.h --- /dev/null +++ b/netdev/sockios_compat.h @@ -0,0 +1,6 @@ +/* Our dom0 chroot doesn't include up to date headers: */ + +#define SIOCBRADDBR 0x89a0 /* create new bridge device */ +#define SIOCBRDELBR 0x89a1 /* remove bridge device */ +#define SIOCBRADDIF 0x89a2 /* add interface to bridge */ +#define SIOCBRDELIF 0x89a3 /* remove interface from bridge */ diff -r dafedf66e1a4 -r da421c1ed9af xapi-libs.spec --- a/xapi-libs.spec +++ b/xapi-libs.spec @@ -277,6 +277,7 @@ /usr/lib/ocaml/cpuid/cpuid.cmxa /usr/lib/ocaml/cpuid/dllcpuid_stubs.so /usr/lib/ocaml/cpuid/libcpuid_stubs.a + /usr/lib/ocaml/netdev/* /usr/lib/ocaml/eventchn/META /usr/lib/ocaml/eventchn/dlleventchn_stubs.so /usr/lib/ocaml/eventchn/eventchn.a --===============0086112594== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0086112594==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 09:54:44 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 09:54:44 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPeq4-0006q7-Gs; Fri, 18 Jun 2010 09:54:44 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPeoG-0006LY-A9 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 09:52:52 -0700 X-ASG-Debug-ID: 1276879970-101200180000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 07AE229C0FB for ; Fri, 18 Jun 2010 09:52:51 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id PHSJTZvN8gchS2uP (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 09:52:51 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,440,1272844800"; d="scan'208";a="484476" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 16:52:49 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 17:52:49 +0100 Received: from ely.uk.xensource.com ([10.80.2.32] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPeoD-0002x9-H1 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 17:52:49 +0100 Content-Type: multipart/mixed; boundary="===============0916843399==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] add missing files to RPM spec file X-Mercurial-Node: 7cb2814de8a60e1b713cfbea5ae8e0d1a72e321c Message-ID: <7cb2814de8a60e1b713c.1276879798@ely> User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 17:49:58 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276879972 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32883 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] add missing files to RPM spec file X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0916843399== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1276879772 -3600 # Node ID 7cb2814de8a60e1b713cfbea5ae8e0d1a72e321c # Parent 0fc58d29684529617fbf5fe238990c7627ff889f Add stdext either/os built modules to RPM specfile Signed-off-by: David Scott diff -r 0fc58d296845 -r 7cb2814de8a6 xapi-libs.spec --- a/xapi-libs.spec Fri Jun 18 14:32:23 2010 +0100 +++ b/xapi-libs.spec Fri Jun 18 17:49:32 2010 +0100 @@ -230,6 +230,10 @@ /usr/lib/ocaml/stdext/vIO.cmx /usr/lib/ocaml/stdext/zerocheck.cmi /usr/lib/ocaml/stdext/zerocheck.cmx + /usr/lib/ocaml/stdext/either.cmi + /usr/lib/ocaml/stdext/either.cmx + /usr/lib/ocaml/stdext/os.cmi + /usr/lib/ocaml/stdext/os.cmx /usr/lib/ocaml/stunnel/META /usr/lib/ocaml/stunnel/stunnel.a /usr/lib/ocaml/stunnel/stunnel.cma xapi-libs.spec | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) --===============0916843399== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api-libs.hg.patch" # HG changeset patch # User David Scott # Date 1276879772 -3600 # Node ID 7cb2814de8a60e1b713cfbea5ae8e0d1a72e321c # Parent 0fc58d29684529617fbf5fe238990c7627ff889f Add stdext either/os built modules to RPM specfile Signed-off-by: David Scott diff -r 0fc58d296845 -r 7cb2814de8a6 xapi-libs.spec --- a/xapi-libs.spec Fri Jun 18 14:32:23 2010 +0100 +++ b/xapi-libs.spec Fri Jun 18 17:49:32 2010 +0100 @@ -230,6 +230,10 @@ /usr/lib/ocaml/stdext/vIO.cmx /usr/lib/ocaml/stdext/zerocheck.cmi /usr/lib/ocaml/stdext/zerocheck.cmx + /usr/lib/ocaml/stdext/either.cmi + /usr/lib/ocaml/stdext/either.cmx + /usr/lib/ocaml/stdext/os.cmi + /usr/lib/ocaml/stdext/os.cmx /usr/lib/ocaml/stunnel/META /usr/lib/ocaml/stunnel/stunnel.a /usr/lib/ocaml/stunnel/stunnel.cma --===============0916843399== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0916843399==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 10:43:26 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 10:43:26 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPfbC-0005OV-HL; Fri, 18 Jun 2010 10:43:26 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPfb2-0005M4-G5 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 10:43:16 -0700 X-ASG-Debug-ID: 1276882994-299d00260000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 19A8629C300 for ; Fri, 18 Jun 2010 10:43:15 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 4QfuYT6PVtLrR6mD (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 10:43:15 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,440,1272844800"; d="scan'208";a="485370" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 17:43:13 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 18:43:13 +0100 Received: from ely.uk.xensource.com ([10.80.2.32] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPfaz-0003PQ-At for xen-api@lists.xensource.com; Fri, 18 Jun 2010 18:43:13 +0100 Content-Type: multipart/mixed; boundary="===============1120113134==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] make the CLI RT use on-host mode X-Mercurial-Node: d7d4d4b58a16bed109311f1d585744954feb71a9 Message-ID: User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 18:40:24 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276882996 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32887 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Subject: [Xen-API] [PATCH] make the CLI RT use on-host mode X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1120113134== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1276882807 -3600 # Node ID d7d4d4b58a16bed109311f1d585744954feb71a9 # Parent 2ab7bcee7d0f3b538067da69dfbeadd25e812681 CA-41895: make the CLI RT default to 'on-host' mode since it has 'localhost' hardcoded anyway. Signed-off-by: David Scott diff -r 2ab7bcee7d0f -r d7d4d4b58a16 ocaml/xe-cli/rt/test_host.ml --- a/ocaml/xe-cli/rt/test_host.ml Mon Jun 07 16:07:06 2010 +0100 +++ b/ocaml/xe-cli/rt/test_host.ml Fri Jun 18 18:40:07 2010 +0100 @@ -44,7 +44,7 @@ ("-a",Arg.Set all,"Run all the tests") ] (fun _ -> raise (Failure "Invalid argument! (try -help for help)")) "VM testing utility"; - let cli : Util.t_cli = Util.cli_offhost in + let cli : Util.t_cli = Util.cli_onhost in let version = Cliops.get_version cli in let short_version = Cliops.get_short_version cli in let tests = Parsers.explode !tests ',' in diff -r 2ab7bcee7d0f -r d7d4d4b58a16 ocaml/xe-cli/rt/util.ml --- a/ocaml/xe-cli/rt/util.ml Mon Jun 07 16:07:06 2010 +0100 +++ b/ocaml/xe-cli/rt/util.ml Fri Jun 18 18:40:07 2010 +0100 @@ -70,6 +70,7 @@ Some (!result,rc) type pwspec = + | NoPassword | Password of string | PasswordFile of string @@ -85,28 +86,29 @@ " -h "^(!host) else "") ^" " ^(match pwspec with - Password s -> "-u "^user^" -pw "^s - | PasswordFile s -> "-pwf "^s) + | NoPassword -> "" + | Password s -> "-u "^user^" -pw "^s + | PasswordFile s -> "-pwf "^s) ^" "^param_str in run_command ~dolog cli_base_string -let cli_offhost_with_pwspec ?(dolog=true) cmd params pwspec = - cli_with_pwspec ~dolog true cmd params pwspec +let cli_offhost_with_pwspec ?dolog cmd params pwspec = + cli_with_pwspec ?dolog true cmd params pwspec -let cli_onhost cmd params = - cli_with_pwspec false cmd params (Password "ignore") +let cli_onhost ?dolog cmd params = + cli_with_pwspec ?dolog false cmd params (NoPassword) -let cli_onhost_with_pwd pwd cmd params = - cli_with_pwspec false cmd params (Password pwd) +let cli_onhost_with_pwd ?dolog pwd cmd params = + cli_with_pwspec ?dolog false cmd params (Password pwd) -let cli_offhost_with_pwd ?(dolog=true) pwd cmd params = - cli_offhost_with_pwspec ~dolog cmd params (Password pwd) +let cli_offhost_with_pwd ?dolog pwd cmd params = + cli_offhost_with_pwspec ?dolog cmd params (Password pwd) -let cli_offhost_with_pwf pwf cmd params = - cli_offhost_with_pwspec cmd params (PasswordFile pwf) +let cli_offhost_with_pwf ?dolog pwf cmd params = + cli_offhost_with_pwspec ?dolog cmd params (PasswordFile pwf) -let cli_offhost ?(dolog=true) cmd params = - cli_offhost_with_pwd ~dolog password cmd params +let cli_offhost ?dolog cmd params = + cli_offhost_with_pwd ?dolog password cmd params ocaml/xe-cli/rt/test_host.ml | 2 +- ocaml/xe-cli/rt/util.ml | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) --===============1120113134== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User David Scott # Date 1276882807 -3600 # Node ID d7d4d4b58a16bed109311f1d585744954feb71a9 # Parent 2ab7bcee7d0f3b538067da69dfbeadd25e812681 CA-41895: make the CLI RT default to 'on-host' mode since it has 'localhost' hardcoded anyway. Signed-off-by: David Scott diff -r 2ab7bcee7d0f -r d7d4d4b58a16 ocaml/xe-cli/rt/test_host.ml --- a/ocaml/xe-cli/rt/test_host.ml Mon Jun 07 16:07:06 2010 +0100 +++ b/ocaml/xe-cli/rt/test_host.ml Fri Jun 18 18:40:07 2010 +0100 @@ -44,7 +44,7 @@ ("-a",Arg.Set all,"Run all the tests") ] (fun _ -> raise (Failure "Invalid argument! (try -help for help)")) "VM testing utility"; - let cli : Util.t_cli = Util.cli_offhost in + let cli : Util.t_cli = Util.cli_onhost in let version = Cliops.get_version cli in let short_version = Cliops.get_short_version cli in let tests = Parsers.explode !tests ',' in diff -r 2ab7bcee7d0f -r d7d4d4b58a16 ocaml/xe-cli/rt/util.ml --- a/ocaml/xe-cli/rt/util.ml Mon Jun 07 16:07:06 2010 +0100 +++ b/ocaml/xe-cli/rt/util.ml Fri Jun 18 18:40:07 2010 +0100 @@ -70,6 +70,7 @@ Some (!result,rc) type pwspec = + | NoPassword | Password of string | PasswordFile of string @@ -85,28 +86,29 @@ " -h "^(!host) else "") ^" " ^(match pwspec with - Password s -> "-u "^user^" -pw "^s - | PasswordFile s -> "-pwf "^s) + | NoPassword -> "" + | Password s -> "-u "^user^" -pw "^s + | PasswordFile s -> "-pwf "^s) ^" "^param_str in run_command ~dolog cli_base_string -let cli_offhost_with_pwspec ?(dolog=true) cmd params pwspec = - cli_with_pwspec ~dolog true cmd params pwspec +let cli_offhost_with_pwspec ?dolog cmd params pwspec = + cli_with_pwspec ?dolog true cmd params pwspec -let cli_onhost cmd params = - cli_with_pwspec false cmd params (Password "ignore") +let cli_onhost ?dolog cmd params = + cli_with_pwspec ?dolog false cmd params (NoPassword) -let cli_onhost_with_pwd pwd cmd params = - cli_with_pwspec false cmd params (Password pwd) +let cli_onhost_with_pwd ?dolog pwd cmd params = + cli_with_pwspec ?dolog false cmd params (Password pwd) -let cli_offhost_with_pwd ?(dolog=true) pwd cmd params = - cli_offhost_with_pwspec ~dolog cmd params (Password pwd) +let cli_offhost_with_pwd ?dolog pwd cmd params = + cli_offhost_with_pwspec ?dolog cmd params (Password pwd) -let cli_offhost_with_pwf pwf cmd params = - cli_offhost_with_pwspec cmd params (PasswordFile pwf) +let cli_offhost_with_pwf ?dolog pwf cmd params = + cli_offhost_with_pwspec ?dolog cmd params (PasswordFile pwf) -let cli_offhost ?(dolog=true) cmd params = - cli_offhost_with_pwd ~dolog password cmd params +let cli_offhost ?dolog cmd params = + cli_offhost_with_pwd ?dolog password cmd params --===============1120113134== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1120113134==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 11:47:57 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 11:47:57 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPgbc-00037f-UG; Fri, 18 Jun 2010 11:47:56 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPgbT-00035B-FK for xen-api@lists.xensource.com; Fri, 18 Jun 2010 11:47:47 -0700 X-ASG-Debug-ID: 1276886866-56cc00130000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from leadville.nicira.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 0588629C374 for ; Fri, 18 Jun 2010 11:47:46 -0700 (PDT) Received: from leadville.nicira.com (173-164-153-21-SFBA.hfc.comcastbusiness.net [173.164.153.21]) by spam.xensource.com with ESMTP id oaKg5rMA5qY1Iydb (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 18 Jun 201 X-Barracuda-Envelope-From: blp@nicira.com Received: from hardrock.nicira.com ([172.16.0.20]) by leadville.nicira.com with esmtp (Exim 4.67) (envelope-from ) id 1OPgbD-00079t-0z; Fri, 18 Jun 2010 11:47:31 -0700 Received: from blp by hardrock.nicira.com with local (Exim 4.67) (envelope-from ) id 1OPgbJ-00024b-3i; Fri, 18 Jun 2010 11:47:37 -0700 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-ASG-Orig-Subj: [PATCH] Increase SSL private key from 512 to 1024 bits X-Mercurial-Node: 1cb91e8f0b3fbca60d392a5108ecb3ba63e1ed62 Message-Id: <1cb91e8f0b3fbca60d39.1276886855@hardrock.nicira.com> Date: Fri, 18 Jun 2010 11:47:35 -0700 From: Ben Pfaff To: xen-api@lists.xensource.com X-Barracuda-Connect: 173-164-153-21-SFBA.hfc.comcastbusiness.net[173.164.153.21] X-Barracuda-Start-Time: 1276886867 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 1.10 X-Barracuda-Spam-Status: No, SCORE=1.10 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M, BSF_SC5_MJ1963, RDNS_DYNAMIC X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32891 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS 0.50 BSF_RULE7568M Custom Rule 7568M 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [Xen-API] [PATCH] Increase SSL private key from 512 to 1024 bits X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com # HG changeset patch # User Ben Pfaff # Date 1276886800 25200 # Node ID 1cb91e8f0b3fbca60d392a5108ecb3ba63e1ed62 # Parent 2fa5560e38434b07089e04e2542ea50c00586864 Increase SSL private key from 512 to 1024 bits. At Nicira, we are experimenting with the idea of converting XAPI SSL keys to SSH keys. In some cases this might be convenient for giving XenServers access to remote resources without distributing a second set of keys. OpenSSH, however, refuses to accept RSA keys shorter than 768 bits for use in authentication. So this change is necessary, to make XAPI generate keys longer than the current default of 512 bits. Additionally, RSA says "512-bit keys no longer provide sufficient security for anything more than very short-term security needs" (http://www.rsa.com/rsalabs/node.asp?id=2218), so this change seems like a good idea in any case. Increasing the key length makes generating the key at installation time take a bit longer, but the difference is not significant: on my desktop, "openssl genrsa 512" takes about 10 ms and "openssl genrsa 1024" takes about 100 ms. Signed-off-by: Ben Pfaff diff -r 2fa5560e3843 -r 1cb91e8f0b3f scripts/generate_ssl_cert --- a/scripts/generate_ssl_cert Thu Jun 17 17:31:00 2010 +0100 +++ b/scripts/generate_ssl_cert Fri Jun 18 11:46:40 2010 -0700 @@ -33,7 +33,7 @@ CN = ${CN} @eof -openssl genrsa > privkey.rsa +openssl genrsa 1024 > privkey.rsa openssl req -batch -new -x509 -key privkey.rsa -days 3650 -config config -out cert.csr openssl dhparam 512 > dh.pem _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Fri Jun 18 12:58:55 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 12:58:55 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPhiJ-0001Ao-Be; Fri, 18 Jun 2010 12:58:55 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPhh9-0000uI-G8 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 12:57:43 -0700 X-ASG-Debug-ID: 1276891061-7ca4002d0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id E46B129C547 for ; Fri, 18 Jun 2010 12:57:42 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 7CxlRUYVaAYXFVPy (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 12:57:42 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,441,1272844800"; d="scan'208";a="486484" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 19:57:40 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 20:57:40 +0100 Received: from ely.uk.xensource.com ([10.80.2.32] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPhh6-0004UY-L7 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 20:57:40 +0100 Content-Type: multipart/mixed; boundary="===============0810353783==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] fix chkconfig commands in xapi spec file X-Mercurial-Node: 8ccd23b730976e8fc3db9def2e9ffde95e4b8486 Message-ID: <8ccd23b730976e8fc3db.1276890884@ely> User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 20:54:44 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276891062 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32895 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] fix chkconfig commands in xapi spec file X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0810353783== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1276890866 -3600 # Node ID 8ccd23b730976e8fc3db9def2e9ffde95e4b8486 # Parent 1c21253d56c8b979e5e9e4ef739eca21b51b3a77 In the xapi RPM post-install actions, use 'chkconfig --add' rather than 'chkconfig ... on' otherwise services are shutdown in the wrong order, causing a slave host to freeze during reboot. (Thanks to James Bulpin for figuring out what was going on :-) Signed-off-by: David Scott diff -r 1c21253d56c8 -r 8ccd23b73097 xapi.spec --- a/xapi.spec Fri Jun 18 18:40:07 2010 +0100 +++ b/xapi.spec Fri Jun 18 20:54:26 2010 +0100 @@ -100,12 +100,12 @@ rm -rf $RPM_BUILD_ROOT %post core -[ ! -x /sbin/chkconfig ] || chkconfig xapi on -[ ! -x /sbin/chkconfig ] || chkconfig management-interface on -[ ! -x /sbin/chkconfig ] || chkconfig xenservices on -[ ! -x /sbin/chkconfig ] || chkconfig xapi-domains on -[ ! -x /sbin/chkconfig ] || chkconfig perfmon on -[ ! -x /sbin/chkconfig ] || chkconfig v6d on +[ ! -x /sbin/chkconfig ] || chkconfig --add xapi +[ ! -x /sbin/chkconfig ] || chkconfig --add management-interface +[ ! -x /sbin/chkconfig ] || chkconfig --add xenservices +[ ! -x /sbin/chkconfig ] || chkconfig --add xapi-domains +[ ! -x /sbin/chkconfig ] || chkconfig --add perfmon +[ ! -x /sbin/chkconfig ] || chkconfig --add v6d %post squeezed [ ! -x /sbin/chkconfig ] || chkconfig squeezed on xapi.spec | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) --===============0810353783== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User David Scott # Date 1276890866 -3600 # Node ID 8ccd23b730976e8fc3db9def2e9ffde95e4b8486 # Parent 1c21253d56c8b979e5e9e4ef739eca21b51b3a77 In the xapi RPM post-install actions, use 'chkconfig --add' rather than 'chkconfig ... on' otherwise services are shutdown in the wrong order, causing a slave host to freeze during reboot. (Thanks to James Bulpin for figuring out what was going on :-) Signed-off-by: David Scott diff -r 1c21253d56c8 -r 8ccd23b73097 xapi.spec --- a/xapi.spec Fri Jun 18 18:40:07 2010 +0100 +++ b/xapi.spec Fri Jun 18 20:54:26 2010 +0100 @@ -100,12 +100,12 @@ rm -rf $RPM_BUILD_ROOT %post core -[ ! -x /sbin/chkconfig ] || chkconfig xapi on -[ ! -x /sbin/chkconfig ] || chkconfig management-interface on -[ ! -x /sbin/chkconfig ] || chkconfig xenservices on -[ ! -x /sbin/chkconfig ] || chkconfig xapi-domains on -[ ! -x /sbin/chkconfig ] || chkconfig perfmon on -[ ! -x /sbin/chkconfig ] || chkconfig v6d on +[ ! -x /sbin/chkconfig ] || chkconfig --add xapi +[ ! -x /sbin/chkconfig ] || chkconfig --add management-interface +[ ! -x /sbin/chkconfig ] || chkconfig --add xenservices +[ ! -x /sbin/chkconfig ] || chkconfig --add xapi-domains +[ ! -x /sbin/chkconfig ] || chkconfig --add perfmon +[ ! -x /sbin/chkconfig ] || chkconfig --add v6d %post squeezed [ ! -x /sbin/chkconfig ] || chkconfig squeezed on --===============0810353783== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0810353783==-- From xen-api-bounces@lists.xensource.com Fri Jun 18 14:58:27 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Fri, 18 Jun 2010 14:58:27 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OPjZy-0006Gh-7Y; Fri, 18 Jun 2010 14:58:26 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OPjZb-0006E4-Dp for xen-api@lists.xensource.com; Fri, 18 Jun 2010 14:58:04 -0700 X-ASG-Debug-ID: 1276898279-2b9400770000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id C868429C756 for ; Fri, 18 Jun 2010 14:58:00 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id aGwtZkPphegoKBrh (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 18 Jun 2010 14:58:00 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,441,1272844800"; d="scan'208";a="487168" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2010 21:57:59 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Fri, 18 Jun 2010 22:57:59 +0100 Received: from ely.uk.xensource.com ([10.80.2.32] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OPjZX-0005Xs-98 for xen-api@lists.xensource.com; Fri, 18 Jun 2010 22:57:59 +0100 Content-Type: multipart/mixed; boundary="===============1949626065==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] make the output of the CLI host-get-vms-which-prevent-evacuation more uniform X-Mercurial-Node: 4f9f896fb691d71492f8c357ac9c411c37f86a76 Message-ID: <4f9f896fb691d71492f8.1276898102@ely> User-Agent: Mercurial-patchbomb/1.4.3 Date: Fri, 18 Jun 2010 22:55:02 +0100 From: David Scott To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1276898282 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.32903 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] make the output of the CLI host-get-vms-which-prevent-evacuation more uniform X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1949626065== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit # HG changeset patch # User David Scott # Date 1276898058 -3600 # Node ID 4f9f896fb691d71492f8c357ac9c411c37f86a76 # Parent 8ccd23b730976e8fc3db9def2e9ffde95e4b8486 Make the output of 'xe host-get-vms-which-prevent-evacuation' more uniform Now the regular output looks like this: # xe host-get-vms-which-prevent-evacuation uuid=b82bf253-1494-40f2-9c3d-34f5bd17012d uuid ( RO) : 1d4eba84-9c04-962b-8fd3-f9fb5d597b64 name-label ( RW): oim2 reason ( RO): VM_MISSING_PV_DRIVERS,OpaqueRef:1ea1dad3-3b5c-4a51-2e9b-128688585769 uuid ( RO) : 6a97a613-bfa2-088d-f415-cf49bbb4bb95 name-label ( RW): oim reason ( RO): VM_MISSING_PV_DRIVERS,OpaqueRef:e8eeb830-36ac-fa4b-5703-d8a7bb551331 The --minimal output looks like this: # xe host-get-vms-which-prevent-evacuation uuid=b82bf253-1494-40f2-9c3d-34f5bd17012d --minimal 6a97a613-bfa2-088d-f415-cf49bbb4bb95,1d4eba84-9c04-962b-8fd3-f9fb5d597b64 Signed-off-by: David Scott diff -r 8ccd23b73097 -r 4f9f896fb691 ocaml/xapi/cli_operations.ml --- a/ocaml/xapi/cli_operations.ml Fri Jun 18 20:54:26 2010 +0100 +++ b/ocaml/xapi/cli_operations.ml Fri Jun 18 22:54:18 2010 +0100 @@ -2593,10 +2593,17 @@ let uuid = List.assoc "uuid" params in let host = Client.Host.get_by_uuid rpc session_id uuid in let vms = Client.Host.get_vms_which_prevent_evacuation rpc session_id host in - let table = List.map (fun (vm, result) -> - Printf.sprintf "%s (%s)" (Client.VM.get_uuid rpc session_id vm) (Client.VM.get_name_label rpc session_id vm), - print_assert_exception (Api_errors.Server_error(List.hd result, List.tl result))) vms in - printer (Cli_printer.PTable [ ("VM", "Error") :: table ]) + + let op (vm, error) = + let error = String.concat "," error in + let record = vm_record rpc session_id vm in + let extra_field = make_field ~name:"reason" ~get:(fun () -> error) () in + let record = { record with fields = record.fields @ [ extra_field ] } in + let selected = List.hd (select_fields params [record] [ "uuid"; "name-label"; "reason"]) in + let table = List.map print_field selected in + printer (Cli_printer.PTable [table]) + in + ignore(List.iter op vms) let host_get_uncooperative_vms printer rpc session_id params = let uuid = List.assoc "uuid" params in ocaml/xapi/cli_operations.ml | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) --===============1949626065== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User David Scott # Date 1276898058 -3600 # Node ID 4f9f896fb691d71492f8c357ac9c411c37f86a76 # Parent 8ccd23b730976e8fc3db9def2e9ffde95e4b8486 Make the output of 'xe host-get-vms-which-prevent-evacuation' more uniform Now the regular output looks like this: # xe host-get-vms-which-prevent-evacuation uuid=b82bf253-1494-40f2-9c3d-34f5bd17012d uuid ( RO) : 1d4eba84-9c04-962b-8fd3-f9fb5d597b64 name-label ( RW): oim2 reason ( RO): VM_MISSING_PV_DRIVERS,OpaqueRef:1ea1dad3-3b5c-4a51-2e9b-128688585769 uuid ( RO) : 6a97a613-bfa2-088d-f415-cf49bbb4bb95 name-label ( RW): oim reason ( RO): VM_MISSING_PV_DRIVERS,OpaqueRef:e8eeb830-36ac-fa4b-5703-d8a7bb551331 The --minimal output looks like this: # xe host-get-vms-which-prevent-evacuation uuid=b82bf253-1494-40f2-9c3d-34f5bd17012d --minimal 6a97a613-bfa2-088d-f415-cf49bbb4bb95,1d4eba84-9c04-962b-8fd3-f9fb5d597b64 Signed-off-by: David Scott diff -r 8ccd23b73097 -r 4f9f896fb691 ocaml/xapi/cli_operations.ml --- a/ocaml/xapi/cli_operations.ml Fri Jun 18 20:54:26 2010 +0100 +++ b/ocaml/xapi/cli_operations.ml Fri Jun 18 22:54:18 2010 +0100 @@ -2593,10 +2593,17 @@ let uuid = List.assoc "uuid" params in let host = Client.Host.get_by_uuid rpc session_id uuid in let vms = Client.Host.get_vms_which_prevent_evacuation rpc session_id host in - let table = List.map (fun (vm, result) -> - Printf.sprintf "%s (%s)" (Client.VM.get_uuid rpc session_id vm) (Client.VM.get_name_label rpc session_id vm), - print_assert_exception (Api_errors.Server_error(List.hd result, List.tl result))) vms in - printer (Cli_printer.PTable [ ("VM", "Error") :: table ]) + + let op (vm, error) = + let error = String.concat "," error in + let record = vm_record rpc session_id vm in + let extra_field = make_field ~name:"reason" ~get:(fun () -> error) () in + let record = { record with fields = record.fields @ [ extra_field ] } in + let selected = List.hd (select_fields params [record] [ "uuid"; "name-label"; "reason"]) in + let table = List.map print_field selected in + printer (Cli_printer.PTable [table]) + in + ignore(List.iter op vms) let host_get_uncooperative_vms printer rpc session_id params = let uuid = List.assoc "uuid" params in --===============1949626065== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1949626065==-- From xen-api-bounces@lists.xensource.com Mon Jun 21 05:35:36 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 21 Jun 2010 05:35:36 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OQgDu-0002dq-Dg; Mon, 21 Jun 2010 05:35:35 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OQgDh-0002bz-7p for xen-api@lists.xensource.com; Mon, 21 Jun 2010 05:35:21 -0700 X-ASG-Debug-ID: 1277123718-38bf00a90000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 9383D29D66B for ; Mon, 21 Jun 2010 05:35:19 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id TCpaFhXcIZzzxrTG (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 21 Jun 2010 05:35:19 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,453,1272844800"; d="scan'208";a="508379" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 21 Jun 2010 12:35:18 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Mon, 21 Jun 2010 13:35:18 +0100 Received: from snoosnoo2.uk.xensource.com ([10.80.2.49]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OQgDd-0002c5-IC for xen-api@lists.xensource.com; Mon, 21 Jun 2010 13:35:17 +0100 Content-Type: multipart/mixed; boundary="===============1174921528==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Fix RRD syncing on shutdown X-Mercurial-Node: 7ade3f4c3a34d4596edc2b3aa56182793db2a2ac Message-ID: <7ade3f4c3a34d4596edc.1277123682@snoosnoo2.uk.xensource.com> User-Agent: Mercurial-patchbomb/1.3.1 Date: Mon, 21 Jun 2010 12:34:42 +0000 From: Jonathan Ludlam To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277123720 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33135 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [Xen-API] [PATCH] Fix RRD syncing on shutdown X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1174921528== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Only bad things can happen if the exception gets out. Signed-off-by: Jon Ludlam ocaml/xapi/xapi_fuse.ml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --===============1174921528== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User Jonathan Ludlam # Date 1277123645 -3600 # Node ID 7ade3f4c3a34d4596edc2b3aa56182793db2a2ac # Parent 4f9f896fb691d71492f8c357ac9c411c37f86a76 If there is any error in syncing the RRDs while shutting down, don't let the exception propagate. Only bad things can happen if the exception gets out. Signed-off-by: Jon Ludlam diff -r 4f9f896fb691 -r 7ade3f4c3a34 ocaml/xapi/xapi_fuse.ml --- a/ocaml/xapi/xapi_fuse.ml +++ b/ocaml/xapi/xapi_fuse.ml @@ -19,7 +19,7 @@ let time f = let start = Unix.gettimeofday () in - f (); + (try f () with e -> warn "Caught exception while performing timed function: %s" (Printexc.to_string e)); Unix.gettimeofday () -. start (* give xapi time to reply to API messages by means of a 10 second fuse! *) --===============1174921528== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1174921528==-- From xen-api-bounces@lists.xensource.com Mon Jun 21 06:21:07 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 21 Jun 2010 06:21:07 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OQgvy-0003UE-G8; Mon, 21 Jun 2010 06:21:06 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OQgs4-0002Qf-TN for xen-api@lists.xensource.com; Mon, 21 Jun 2010 06:17:05 -0700 X-ASG-Debug-ID: 1277126223-7a29003d0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP02.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 2686829D405 for ; Mon, 21 Jun 2010 06:17:03 -0700 (PDT) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) by spam.xensource.com with ESMTP id XwlJq6MKT55Pkm8D for ; Mon, 21 Jun 2010 06:17:03 -0700 (PDT) X-Barracuda-Envelope-From: Magnus.Therning@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,453,1272859200"; d="scan'208";a="102419187" Received: from ftlpmailmx02.citrite.net ([10.9.154.224]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 21 Jun 2010 09:16:54 -0400 Received: from [10.80.2.63] (10.9.154.239) by FTLPMAILMX02.citrite.net (10.9.154.224) with Microsoft SMTP Server id 8.2.254.0; Mon, 21 Jun 2010 09:16:54 -0400 Message-ID: <4C1F6645.2030607@eu.citrix.com> Date: Mon, 21 Jun 2010 14:16:53 +0100 From: Magnus Therning User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100407 Lightning/1.0b2pre Shredder/3.0.4 MIME-Version: 1.0 To: Ben Pfaff X-ASG-Orig-Subj: Re: [Xen-API] [PATCH] Increase SSL private key from 512 to 1024 bits Subject: Re: [Xen-API] [PATCH] Increase SSL private key from 512 to 1024 bits References: <1cb91e8f0b3fbca60d39.1276886855@hardrock.nicira.com> In-Reply-To: <1cb91e8f0b3fbca60d39.1276886855@hardrock.nicira.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Barracuda-Connect: smtp02.citrix.com[66.165.176.63] X-Barracuda-Start-Time: 1277126224 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33139 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com On 18/06/10 19:47, Ben Pfaff wrote: > # HG changeset patch > # User Ben Pfaff > # Date 1276886800 25200 > # Node ID 1cb91e8f0b3fbca60d392a5108ecb3ba63e1ed62 > # Parent 2fa5560e38434b07089e04e2542ea50c00586864 > Increase SSL private key from 512 to 1024 bits. > > At Nicira, we are experimenting with the idea of converting XAPI > SSL keys to SSH keys. In some cases this might be convenient for > giving XenServers access to remote resources without distributing > a second set of keys. > > OpenSSH, however, refuses to accept RSA keys shorter than 768 bits > for use in authentication. So this change is necessary, to make > XAPI generate keys longer than the current default of 512 bits. > > Additionally, RSA says "512-bit keys no longer provide sufficient > security for anything more than very short-term security needs" > (http://www.rsa.com/rsalabs/node.asp?id=2218), so this change seems > like a good idea in any case. > > Increasing the key length makes generating the key at installation > time take a bit longer, but the difference is not significant: > on my desktop, "openssl genrsa 512" takes about 10 ms and "openssl > genrsa 1024" takes about 100 ms. > > Signed-off-by: Ben Pfaff > > diff -r 2fa5560e3843 -r 1cb91e8f0b3f scripts/generate_ssl_cert > --- a/scripts/generate_ssl_cert Thu Jun 17 17:31:00 2010 +0100 > +++ b/scripts/generate_ssl_cert Fri Jun 18 11:46:40 2010 -0700 > @@ -33,7 +33,7 @@ > CN = ${CN} > @eof > > -openssl genrsa > privkey.rsa > +openssl genrsa 1024 > privkey.rsa > openssl req -batch -new -x509 -key privkey.rsa -days 3650 -config config -out cert.csr > openssl dhparam 512 > dh.pem This change looks perfectly fine to me. Cheers, M -- Magnus Therning magnus.therning@eu.citrix.com Jabber: magnusth@eng There does not now, nor will there ever, exist a programming language in which it is the least bit hard to write bad programs. -- Flon's Axiom _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Mon Jun 21 07:11:36 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 21 Jun 2010 07:11:36 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OQhiq-0004HD-Ox; Mon, 21 Jun 2010 07:11:36 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OQhia-0004BS-7T for xen-api@lists.xensource.com; Mon, 21 Jun 2010 07:11:20 -0700 X-ASG-Debug-ID: 1277129477-2413002d0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id B27C929DBD6 for ; Mon, 21 Jun 2010 07:11:19 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id y6zQuFF4eBqVRlxd (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 21 Jun 2010 07:11:19 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,453,1272844800"; d="scan'208";a="511391" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 21 Jun 2010 14:11:17 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Mon, 21 Jun 2010 15:11:17 +0100 Received: from snoosnoo2.uk.xensource.com ([10.80.2.49]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OQhiX-0003Q8-A2 for xen-api@lists.xensource.com; Mon, 21 Jun 2010 15:11:17 +0100 Content-Type: multipart/mixed; boundary="===============1040099515==" MIME-Version: 1.0 X-ASG-Orig-Subj: [PATCH] Make sure we always deactivate/detach instead of just detach (event thread + eject) X-Mercurial-Node: ffb8d0b1eb59a41c105ed76b877f247716804829 Message-ID: User-Agent: Mercurial-patchbomb/1.3.1 Date: Mon, 21 Jun 2010 14:10:41 +0000 From: Jonathan Ludlam To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277129479 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33143 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Subject: [Xen-API] [PATCH] Make sure we always deactivate/detach instead of just detach (event thread + eject) X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1040099515== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Signed-off-by: Jon Ludlam ocaml/xapi/events.ml | 2 +- ocaml/xapi/vbdops.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --===============1040099515== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-api.hg.patch" # HG changeset patch # User Jonathan Ludlam # Date 1277129371 -3600 # Node ID ffb8d0b1eb59a41c105ed76b877f247716804829 # Parent 6e91088f70324d1d361cd51c6de5b1472131f9f3 When a VBD unplug event is caught by the event thread, it issues a VDI.detach but not a VDI.deactivate. This fixes this behaviour. Also does the same for eject (although no ISO SRs currently use activate/deactivate) Signed-off-by: Jon Ludlam diff -r 6e91088f7032 -r ffb8d0b1eb59 ocaml/xapi/events.ml --- a/ocaml/xapi/events.ml +++ b/ocaml/xapi/events.ml @@ -253,7 +253,7 @@ Device.Generic.rm_device_state ~xs device; let vdi = Db.VBD.get_VDI ~__context ~self:vbd in if exists - then Storage_access.VDI.detach ~__context ~self:vdi + then Storage_access.deactivate_and_detach ~__context ~vdi else debug "VBD %s: Skipping VDI.detach of %s since device doesn't exist" (Ref.string_of vbd) (Ref.string_of vdi) ); (* If VM is suspended, leave currently_attached and the VDI lock diff -r 6e91088f7032 -r ffb8d0b1eb59 ocaml/xapi/vbdops.ml --- a/ocaml/xapi/vbdops.ml +++ b/ocaml/xapi/vbdops.ml @@ -232,7 +232,7 @@ let cmd = [| "eject"; location |] in ignore (Unixext.spawnvp cmd.(0) cmd) ); - Storage_access.VDI.detach ~__context ~self:vdi; + Storage_access.deactivate_and_detach ~__context ~vdi; ) ) else ( Db.VBD.set_empty ~__context ~self ~value:true; --===============1040099515== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1040099515==-- From xen-api-bounces@lists.xensource.com Mon Jun 21 09:30:00 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 21 Jun 2010 09:30:00 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OQjsm-0008K7-2y; Mon, 21 Jun 2010 09:30:00 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OQjsg-0008I4-Ku for xen-api@lists.xensource.com; Mon, 21 Jun 2010 09:29:54 -0700 X-ASG-Debug-ID: 1277137792-5f38007b0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 1A2AB29DDC0 for ; Mon, 21 Jun 2010 09:29:53 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id ubqKRFHVP7xIL2BQ (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 21 Jun 2010 09:29:53 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,453,1272844800"; d="scan'208";a="514672" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 21 Jun 2010 16:29:52 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.160]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Mon, 21 Jun 2010 17:29:52 +0100 From: Dave Scott To: Jonathan Ludlam , "xen-api@lists.xensource.com" Date: Mon, 21 Jun 2010 17:29:52 +0100 X-ASG-Orig-Subj: RE: [Xen-API] [PATCH] Fix RRD syncing on shutdown Subject: RE: [Xen-API] [PATCH] Fix RRD syncing on shutdown Thread-Topic: [Xen-API] [PATCH] Fix RRD syncing on shutdown Thread-Index: AcsRPj5o+U1rOLcYTX6aVuiRDeOIZwAILMcQ Message-ID: <81A73678E76EA642801C8F2E4823AD218080C98A15@LONPMAILBOX01.citrite.net> References: <7ade3f4c3a34d4596edc.1277123682@snoosnoo2.uk.xensource.com> In-Reply-To: <7ade3f4c3a34d4596edc.1277123682@snoosnoo2.uk.xensource.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277137794 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.01 X-Barracuda-Spam-Status: No, SCORE=0.01 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_SC0_SA_TO_FROM_DOMAIN_MATCH X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33151 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.01 BSF_SC0_SA_TO_FROM_DOMAIN_MATCH Sender Domain Matches Recipient Domain Cc: X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Thanks -- I've applied this to the XCP stable branch. > -----Original Message----- > From: xen-api-bounces@lists.xensource.com [mailto:xen-api- > bounces@lists.xensource.com] On Behalf Of Jonathan Ludlam > Sent: 21 June 2010 12:35 > To: xen-api@lists.xensource.com > Subject: [Xen-API] [PATCH] Fix RRD syncing on shutdown >=20 > Only bad things can happen if the exception gets out. >=20 > Signed-off-by: Jon Ludlam >=20 >=20 > ocaml/xapi/xapi_fuse.ml | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) >=20 _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Mon Jun 21 09:33:07 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 21 Jun 2010 09:33:07 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OQjvn-0000QB-PL; Mon, 21 Jun 2010 09:33:07 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OQjvh-0000No-6a for xen-api@lists.xensource.com; Mon, 21 Jun 2010 09:33:01 -0700 X-ASG-Debug-ID: 1277137978-5f3800840000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 7020329DE77 for ; Mon, 21 Jun 2010 09:32:59 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 5IdmHOwSB9iFiufI (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 21 Jun 2010 09:32:59 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,454,1272844800"; d="scan'208";a="514736" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 21 Jun 2010 16:32:55 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.160]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Mon, 21 Jun 2010 17:32:55 +0100 From: Dave Scott To: 'Ben Pfaff' , "xen-api@lists.xensource.com" Date: Mon, 21 Jun 2010 17:32:55 +0100 X-ASG-Orig-Subj: RE: [Xen-API] [PATCH] Increase SSL private key from 512 to 1024 bits Subject: RE: [Xen-API] [PATCH] Increase SSL private key from 512 to 1024 bits Thread-Topic: [Xen-API] [PATCH] Increase SSL private key from 512 to 1024 bits Thread-Index: AcsPFsK0XGBsnrosRWqd9CIe7phLKwCSDyrw Message-ID: <81A73678E76EA642801C8F2E4823AD218080C98A16@LONPMAILBOX01.citrite.net> References: <1cb91e8f0b3fbca60d39.1276886855@hardrock.nicira.com> In-Reply-To: <1cb91e8f0b3fbca60d39.1276886855@hardrock.nicira.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277137980 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33151 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Cc: X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi, Thanks for this-- patch pushed. Cheers, Dave > -----Original Message----- > From: xen-api-bounces@lists.xensource.com [mailto:xen-api- > bounces@lists.xensource.com] On Behalf Of Ben Pfaff > Sent: 18 June 2010 18:48 > To: xen-api@lists.xensource.com > Subject: [Xen-API] [PATCH] Increase SSL private key from 512 to 1024 > bits >=20 > # HG changeset patch > # User Ben Pfaff > # Date 1276886800 25200 > # Node ID 1cb91e8f0b3fbca60d392a5108ecb3ba63e1ed62 > # Parent 2fa5560e38434b07089e04e2542ea50c00586864 > Increase SSL private key from 512 to 1024 bits. >=20 > At Nicira, we are experimenting with the idea of converting XAPI > SSL keys to SSH keys. In some cases this might be convenient for > giving XenServers access to remote resources without distributing > a second set of keys. >=20 > OpenSSH, however, refuses to accept RSA keys shorter than 768 bits > for use in authentication. So this change is necessary, to make > XAPI generate keys longer than the current default of 512 bits. >=20 > Additionally, RSA says "512-bit keys no longer provide sufficient > security for anything more than very short-term security needs" > (http://www.rsa.com/rsalabs/node.asp?id=3D2218), so this change seems > like a good idea in any case. >=20 > Increasing the key length makes generating the key at installation > time take a bit longer, but the difference is not significant: > on my desktop, "openssl genrsa 512" takes about 10 ms and "openssl > genrsa 1024" takes about 100 ms. >=20 > Signed-off-by: Ben Pfaff >=20 > diff -r 2fa5560e3843 -r 1cb91e8f0b3f scripts/generate_ssl_cert > --- a/scripts/generate_ssl_cert Thu Jun 17 17:31:00 2010 +0100 > +++ b/scripts/generate_ssl_cert Fri Jun 18 11:46:40 2010 -0700 > @@ -33,7 +33,7 @@ > CN =3D ${CN} > @eof >=20 > -openssl genrsa > privkey.rsa > +openssl genrsa 1024 > privkey.rsa > openssl req -batch -new -x509 -key privkey.rsa -days 3650 -config > config -out cert.csr > openssl dhparam 512 > dh.pem >=20 >=20 > _______________________________________________ > xen-api mailing list > xen-api@lists.xensource.com > http://lists.xensource.com/mailman/listinfo/xen-api _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Tue Jun 22 01:49:43 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 22 Jun 2010 01:49:43 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OQzAs-0008Q9-Jh; Tue, 22 Jun 2010 01:49:43 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OQzAl-0008Nz-8U for xen-api@lists.xensource.com; Tue, 22 Jun 2010 01:49:35 -0700 X-ASG-Debug-ID: 1277196574-55bc00290000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from maild-aa.linkedin.com (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 6C86029E429 for ; Tue, 22 Jun 2010 01:49:34 -0700 (PDT) Received: from maild-aa.linkedin.com (maild-aa.linkedin.com [70.42.142.163]) by spam.xensource.com with ESMTP id HDtYmoCW5fiEFOZv for ; Tue, 22 Jun 2010 01:49:34 -0700 (PDT) X-Barracuda-Envelope-From: s-X1F4Gtpu3Dw8uT693cqQTw2NrDvvlT2x9JHbeuL9ebqBfVnxMwwNYU@bounce.linkedin.com DomainKey-Signature: s=prod; d=linkedin.com; c=nofws; q=dns; h=Sender:Date:From:To:Message-ID:Subject:MIME-Version: Content-Type:X-LinkedIn-Template:X-LinkedIn-Class: X-LinkedIn-fbl; b=YdtvbI4ZGgwOTmoDF4O+88Cvv6KikaM4SxHk96G4FjMxN7u0PP5btTW0 IgBJyRwOm2lhks0VHRnsGA5vmyvX2hXG/yCfjyYKeZsN9QMUKuPRTvuQy BsTnXHJpay1VXbt; Date: Tue, 22 Jun 2010 01:49:34 -0700 (PDT) From: Victoria Ghores To: Message-ID: <1147083122.647364.1277196574134.JavaMail.app@ech3-cdn13.prod> X-ASG-Orig-Subj: =?UTF-8?Q?Invitation_=C3=A0_se_connecter_sur_LinkedIn?= MIME-Version: 1.0 X-LinkedIn-Template: invite_guest_59 X-LinkedIn-Class: INVITE-GUEST X-LinkedIn-fbl: s-X1F4Gtpu3Dw8uT693cqQTw2NrDvvlT2x9JHbeuL9ebqBfVnxMwwNYU X-Barracuda-Connect: maild-aa.linkedin.com[70.42.142.163] X-Barracuda-Start-Time: 1277196574 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33216 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Subject: [Xen-API] =?utf-8?q?Invitation_=C3=A0_se_connecter_sur_LinkedIn?= X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0972292568==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============0972292568== Content-Type: multipart/alternative; boundary="----=_Part_647363_750991163.1277196574132" ------=_Part_647363_750991163.1277196574132 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable LinkedIn ------------ =20 J'aimerais vous inviter =C3=A0 rejoindre mon r=C3=A9seau professionnel en l= igne, sur le site LinkedIn. Victoria Victoria Ghores DBA Junior chez Ippon Technologies=20 R=C3=A9gion de Paris , France Veuillez confirmer que vous connaissez Victoria Ghores https://www.linkedin.com/e/isd/1405156467/6IVX4nnR/ =20 ------ (c) 2010, LinkedIn Corporation ------=_Part_647363_750991163.1277196574132 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =20
=20

LinkedIn=

=20 =20

J'aimerais vous inviter =C3=A0 rejoindre mon r=C3=A9seau professionne= l en ligne, sur le site LinkedIn.

Victoria

=20
Victoria Ghores
DBA Junior chez Ippon Technologies=20
Région de Paris , France

Veuillez confirmer que vous connaissez Victoria

=C2=A9 2010, LinkedIn Corporation

------=_Part_647363_750991163.1277196574132-- --===============0972292568== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0972292568==-- From xen-api-bounces@lists.xensource.com Tue Jun 22 07:13:17 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 22 Jun 2010 07:13:17 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OR4E1-00010w-6y; Tue, 22 Jun 2010 07:13:17 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OR4Dx-0000zE-GN for xen-api@lists.xensource.com; Tue, 22 Jun 2010 07:13:13 -0700 X-ASG-Debug-ID: 1277215990-20b301880000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 3913F29E853; Tue, 22 Jun 2010 07:13:11 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id eXwslK22aGArtyDP (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Tue, 22 Jun 2010 07:13:11 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,460,1272844800"; d="scan'208";a="533090" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 22 Jun 2010 14:13:09 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.160]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Tue, 22 Jun 2010 15:13:08 +0100 From: Dave Scott To: "xen-api@lists.xensource.com" , "xen-devel@lists.xensource.com" Date: Tue, 22 Jun 2010 15:08:50 +0100 X-ASG-Orig-Subj: XCP: RFC: compressing VM exports by default Thread-Topic: XCP: RFC: compressing VM exports by default Thread-Index: AcsSFQlksVrZUSijTQisn7Tl3qnx+A== Message-ID: <81A73678E76EA642801C8F2E4823AD218080C98A1E@LONPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277215992 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33237 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: Subject: [Xen-API] XCP: RFC: compressing VM exports by default X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi, In XCP a VM "export" is a serialized VM, including metadata and usually raw= disk blocks. The format is a very simple tar file (really stream) with an = XML file at the front containing version information and metadata. Unfortunately VM exports containing raw disk blocks can be very large and t= heir size makes them difficult to store and distribute over the network. I = propose to turn on compression by default by filtering the exports through = gzip and to auto-detect both compressed and uncompressed exports on import. I've written up my proposal on the wiki: http://wiki.xensource.com/xenwiki/Compressing_VM_exports One implication is that new (compressed) exports will fail to import on old= er servers. However (a) there's an easy workaround (gunzip); and (b) I thin= k being able to import an old (uncompressed) export on a new server is more= important than the other way around. Comments appreciated! Cheers, Dave _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-devel-bounces@lists.xensource.com Tue Jun 22 08:03:37 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 22 Jun 2010 08:03:37 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OR50i-0006zW-Jl; Tue, 22 Jun 2010 08:03:36 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OR4u9-0005WQ-Kj for xen-devel@lists.xensource.com; Tue, 22 Jun 2010 07:56:49 -0700 X-ASG-Debug-ID: 1277218607-20b301e60000-8pertM X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id CC63629E593; Tue, 22 Jun 2010 07:56:47 -0700 (PDT) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) by spam.xensource.com with ESMTP id whmGv2E8CPBH2QZW (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Tue, 22 Jun 2010 07:56:47 -0700 (PDT) X-Barracuda-Envelope-From: stephen.spector@citrix.com X-IronPort-AV: E=Sophos;i="4.53,460,1272859200"; d="scan'208,217";a="9068669" Received: from ftlpmailmx01.citrite.net ([10.9.154.223]) by FTLPIPO01.CITRIX.COM with ESMTP/TLS/RC4-MD5; 22 Jun 2010 10:56:46 -0400 Received: from FTLPMAILBOX01.citrite.net ([10.13.98.208]) by FTLPMAILMX01.citrite.net ([10.9.154.223]) with mapi; Tue, 22 Jun 2010 10:56:46 -0400 From: Stephen Spector To: "xen-api@lists.xensource.com" , "xen-devel@lists.xensource.com" Date: Tue, 22 Jun 2010 10:54:30 -0400 X-ASG-Orig-Subj: XCP Community Meeting #2 Thread-Topic: XCP Community Meeting #2 Thread-Index: AcsSGyKqoM655xZER2WaESNt6hAP5A== Message-ID: <652FFB2C8F91E3428799B1FFF8B490C9857C25CF1C@FTLPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Barracuda-Connect: smtp.citrix.com[66.165.176.89] X-Barracuda-Start-Time: 1277218607 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33239 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Cc: Subject: [Xen-devel] XCP Community Meeting #2 X-BeenThere: xen-devel@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0838444890==" Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com --===============0838444890== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF1CFTLPMAILBOX01_" --_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF1CFTLPMAILBOX01_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Team: It is time to start thinking about our 2nd XCP meeting for the Xen.org XCP = team. The last meeting was held on May 25, 2010 at 14:00 UTC. Notes are at= http://wiki.xensource.com/xenwiki/XCP_Monthly_Meetings. For the next meet= ing I hope to schedule a time that is better for our Asian participants so = please contact me with a time that would be best if you live in Japan, Kore= a, Australia, etc. Also, please send me any items you would like to discuss= so I can create an agenda ahead of time. I am targeting July 6-8 as possible dates for this meeting so please let me= know if any day is better for you as I will do my best to get as many atte= ndees as possible on the call. Unfortunately, I cannot satisfy everyone but= I will do my best. Finally, I would like to have an online meeting tool used in this meeting s= o people can add their name to the attendee list, post questions, etc. I wa= s thinking of using IRC but am open to any solution you would like to use. = I am open to your suggestion. Thanks. Stephen Spector Xen.org Community Manager T: (772) 621-5062 | M: (954) 854-4257 stephen.spector@xen.org http://blog.xen.org | @xen_com_mgr Network World Open Source Exposed Blog --_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF1CFTLPMAILBOX01_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Team:

 

It is time to start thinking about our 2nd = XCP meeting for the Xen.org XCP team.  The last meeting was held on May 25= , 2010 at 14:00 UTC. Notes are at http://wiki= .xensource.com/xenwiki/XCP_Monthly_Meetings.  For the next meeting I hope to schedule a time that is better for our Asian participants so please contact me with a time that would be best if y= ou live in Japan, Korea, Australia, etc. Also, please send me any items you wo= uld like to discuss so I can create an agenda ahead of time.

 

I am targeting July 6-8 as possible dates for this mee= ting so please let me know if any day is better for you as I will do my best to = get as many attendees as possible on the call. Unfortunately, I cannot satisfy everyone but I will do my best.

 

Finally, I would like to have an online meeting tool u= sed in this meeting so people can add their name to the attendee list, post questi= ons, etc. I was thinking of using IRC but am open to any solution you would like= to use. I am open to your suggestion.

 

Thanks.

 

 

Stephen Spector

 

Xen.org Community Manager

T: (772) 621-5062 | M: (954) 854-4257

stephen.spector@xen.org

http://blog.xen.org | @xen_com_mgr

Network World Open Source Exposed Blog

 

 

 

--_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF1CFTLPMAILBOX01_-- --===============0838444890== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0838444890==-- From xen-api-bounces@lists.xensource.com Tue Jun 22 08:12:36 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Tue, 22 Jun 2010 08:12:36 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OR59Q-0001Sy-Je; Tue, 22 Jun 2010 08:12:36 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OR58d-0001AR-2Q for xen-api@lists.xensource.com; Tue, 22 Jun 2010 08:11:47 -0700 X-ASG-Debug-ID: 1277219505-20b302090000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from dark.recoil.org (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with SMTP id 82D2829E05F for ; Tue, 22 Jun 2010 08:11:45 -0700 (PDT) Received: from dark.recoil.org (recoil.dh.bytemark.co.uk [89.16.177.154]) by spam.xensource.com with SMTP id CKGWgVwRGTLPsG8m for ; Tue, 22 Jun 2010 08:11:45 -0700 (PDT) X-Barracuda-Envelope-From: anil@recoil.org Received: (qmail 8175 invoked by uid 634); 22 Jun 2010 15:11:44 -0000 X-Spam-Level: * X-Spam-Status: No, hits=-1.4 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: dark.recoil.org Received: from Unknown (HELO [131.106.57.148]) (64.80.90.199) (smtp-auth username remote@recoil.org, mechanism cram-md5) by dark.recoil.org (qpsmtpd/0.83) with ESMTPA; Tue, 22 Jun 2010 16:11:44 +0100 References: <81A73678E76EA642801C8F2E4823AD218080C98A1E@LONPMAILBOX01.citrite.net> Message-Id: <23296A4C-06C8-4A64-909A-AFCA0B6CE3B9@recoil.org> From: Anil Madhavapeddy To: Dave Scott In-Reply-To: <81A73678E76EA642801C8F2E4823AD218080C98A1E@LONPMAILBOX01.citrite.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Mailer: iPad Mail (7B367) Mime-Version: 1.0 (iPad Mail 7B367) X-ASG-Orig-Subj: Re: [Xen-API] XCP: RFC: compressing VM exports by default Subject: Re: [Xen-API] XCP: RFC: compressing VM exports by default Date: Tue, 22 Jun 2010 08:12:29 -0700 X-Virus-Checked: Checked by ClamAV on dark.recoil.org X-Barracuda-Connect: recoil.dh.bytemark.co.uk[89.16.177.154] X-Barracuda-Start-Time: 1277219506 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33241 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com This is possibly out of scope, but I think a really common use-case is = to shuffle VHD files around. Have you considered an output format that = just moves the VHD from the backend directly into the VM export? In the case of a non-VHD backend then the compressed stream form is = good, but it seems a pity to duplicate the sparseness checking for the = common (VHD on LVM or NFS) case. Anil =20 On 22 Jun 2010, at 07:08, Dave Scott wrote: > Hi, >=20 > In XCP a VM "export" is a serialized VM, including metadata and = usually raw disk blocks. The format is a very simple tar file (really = stream) with an XML file at the front containing version information and = metadata. >=20 > Unfortunately VM exports containing raw disk blocks can be very large = and their size makes them difficult to store and distribute over the = network. I propose to turn on compression by default by filtering the = exports through gzip and to auto-detect both compressed and uncompressed = exports on import. >=20 > I've written up my proposal on the wiki: >=20 > http://wiki.xensource.com/xenwiki/Compressing_VM_exports >=20 > One implication is that new (compressed) exports will fail to import = on older servers. However (a) there's an easy workaround (gunzip); and = (b) I think being able to import an old (uncompressed) export on a new = server is more important than the other way around. >=20 > Comments appreciated! >=20 > Cheers, > Dave >=20 >=20 >=20 > _______________________________________________ > xen-api mailing list > xen-api@lists.xensource.com > http://lists.xensource.com/mailman/listinfo/xen-api >=20 _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 23 02:07:08 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 23 Jun 2010 02:07:08 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ORLvI-0004XT-44; Wed, 23 Jun 2010 02:07:08 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OREts-0000g9-Iz for xen-api@lists.xensource.com; Tue, 22 Jun 2010 18:37:12 -0700 X-ASG-Debug-ID: 1277257031-509500050000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from EXHUB018-3.exch018.msoutlookonline.net (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 09B6829A3DE for ; Tue, 22 Jun 2010 18:37:11 -0700 (PDT) Received: from EXHUB018-3.exch018.msoutlookonline.net (exhub018-3.exch018.msoutlookonline.net [64.78.17.18]) by spam.xensource.com with ESMTP id LeWpDoSEIBvWEF8x (version=TLSv1 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 22 X-Barracuda-Envelope-From: abhishek@cloud.com Received: from [192.168.1.192] (99.57.184.141) by smtpx18.msoutlookonline.net (64.78.17.38) with Microsoft SMTP Server (TLS) id 8.2.234.1; Tue, 22 Jun 2010 18:37:11 -0700 Message-ID: <4C216546.6000100@cloud.com> Date: Tue, 22 Jun 2010 18:37:10 -0700 From: Abhishek Joshi User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: xen-api@lists.xensource.com X-ASG-Orig-Subj: Trying to gather statistics by parsing the rrd data files Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Barracuda-Connect: exhub018-3.exch018.msoutlookonline.net[64.78.17.18] X-Barracuda-Start-Time: 1277257032 X-Barracuda-Encrypted: RC4-MD5 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33281 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Mailman-Approved-At: Wed, 23 Jun 2010 02:05:14 -0700 Subject: [Xen-API] Trying to gather statistics by parsing the rrd data files X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hello All, I am trying to gather xenserver statistics by parsing the xenserver rrd files that reside on the xen host, by retrieving them via a python plugin I have written. I have a few issues I face here: 1. I see that some of the rdd files on the xenserver hosts under /var/xapi/blobs/rrds are substantially bigger than the others. What this leads to is a timeout at my end, when I encounter a big file and try to read it back for parsing. 2. I saw quite a few NaN values when I looked at these files. 3. I was curious to know how the xen center collected statistics, and if it indeed used the rrd files to parse through to collect statistics. In any case, since the original java api is deprecated, this was the only way out as far as collecting stats was concerned. Please let me know if there is a better way to resolve this. Any help would be highly appreciated. Regards, Abhishek _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 23 04:59:17 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 23 Jun 2010 04:59:17 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ORObt-00005Z-8Z; Wed, 23 Jun 2010 04:59:17 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ORObK-0008Mz-VL for xen-api@lists.xensource.com; Wed, 23 Jun 2010 04:58:43 -0700 X-ASG-Debug-ID: 1277294319-28b200760000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 13B6F29EB2C for ; Wed, 23 Jun 2010 04:58:41 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id 6Bmxzw2SvsxsF57l (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 23 Jun 2010 04:58:41 -0700 (PDT) X-Barracuda-Envelope-From: Jonathan.Ludlam@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,466,1272844800"; d="scan'208";a="549573" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 23 Jun 2010 11:58:28 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.160]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Wed, 23 Jun 2010 12:58:28 +0100 From: Jonathan Ludlam To: Abhishek Joshi Date: Wed, 23 Jun 2010 12:58:24 +0100 X-ASG-Orig-Subj: Re: [Xen-API] Trying to gather statistics by parsing the rrd data files Subject: Re: [Xen-API] Trying to gather statistics by parsing the rrd data files Thread-Topic: [Xen-API] Trying to gather statistics by parsing the rrd data files Thread-Index: AcsSy2P93Yvluh0eTCezktM/31ySGA== Message-ID: References: <4C216546.6000100@cloud.com> In-Reply-To: <4C216546.6000100@cloud.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277294322 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33323 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Have you looked here: http://wiki.xensource.com/xenwiki/XAPI_RRDs It might help? Jon On 23 Jun 2010, at 02:37, Abhishek Joshi wrote: > Hello All, >=20 > I am trying to gather xenserver statistics by parsing the xenserver rrd=20 > files that reside on the xen host, by retrieving them via a python=20 > plugin I have written. >=20 > I have a few issues I face here: >=20 > 1. I see that some of the rdd files on the xenserver hosts under=20 > /var/xapi/blobs/rrds are substantially bigger than the others. What this= =20 > leads to is a timeout at my end, when I encounter a big file and try to=20 > read it back for parsing. >=20 > 2. I saw quite a few NaN values when I looked at these files. >=20 > 3. I was curious to know how the xen center collected statistics, and if= =20 > it indeed used the rrd files to parse through to collect statistics. >=20 > In any case, since the original java api is deprecated, this was the=20 > only way out as far as collecting stats was concerned. Please let me=20 > know if there is a better way to resolve this. >=20 > Any help would be highly appreciated. >=20 > Regards, >=20 > Abhishek >=20 > _______________________________________________ > xen-api mailing list > xen-api@lists.xensource.com > http://lists.xensource.com/mailman/listinfo/xen-api _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 23 10:01:37 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 23 Jun 2010 10:01:37 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ORTKR-0005bQ-RI; Wed, 23 Jun 2010 10:01:35 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ORTKF-0005ZK-VW for xen-api@lists.xensource.com; Wed, 23 Jun 2010 10:01:24 -0700 X-ASG-Debug-ID: 1277312483-563f00b10000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from EXHUB018-4.exch018.msoutlookonline.net (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 52E3229F0A4 for ; Wed, 23 Jun 2010 10:01:23 -0700 (PDT) Received: from EXHUB018-4.exch018.msoutlookonline.net (exhub018-4.exch018.msoutlookonline.net [64.78.17.19]) by spam.xensource.com with ESMTP id HEJz3rt6Ez8j70Om (version=TLSv1 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 23 X-Barracuda-Envelope-From: abhishek@cloud.com Received: from [192.168.1.192] (99.57.184.141) by smtpx18.msoutlookonline.net (64.78.17.39) with Microsoft SMTP Server (TLS) id 8.2.234.1; Wed, 23 Jun 2010 10:01:22 -0700 Message-ID: <4C223DE2.9080203@cloud.com> Date: Wed, 23 Jun 2010 10:01:22 -0700 From: Abhishek Joshi User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: Jonathan Ludlam X-ASG-Orig-Subj: Re: [Xen-API] Trying to gather statistics by parsing the rrd data files Subject: Re: [Xen-API] Trying to gather statistics by parsing the rrd data files References: <4C216546.6000100@cloud.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Barracuda-Connect: exhub018-4.exch018.msoutlookonline.net[64.78.17.19] X-Barracuda-Start-Time: 1277312483 X-Barracuda-Encrypted: RC4-MD5 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33343 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: Kevin Kluge , "xen-api@lists.xensource.com" X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi Jon, Thanks for the link. I think I am doing something very similar to this. I have a python plugin written, which gets rrd updates on my localhost. I read the updates, and then parse them in Java. However, for some of the calls to retrieve these rrd updates, my read times out. I am unable to figure out as to why this happens for only some cases (i.e. this happens only for some hosts I gather stats on). Perhaps this has got to do something with the load on that host? Also, as I said, some of the rrd files are substantially larger than the others on the respective hosts. Is there any way to limit the size of the file one reads, so that the read from the plugin never times out? More specifically, is the read timeout expected, or this seems like some deficiency in my code? Thanks, Abhishek On 06/23/2010 04:58 AM, Jonathan Ludlam wrote: > Have you looked here: > > http://wiki.xensource.com/xenwiki/XAPI_RRDs > > It might help? > > Jon > > On 23 Jun 2010, at 02:37, Abhishek Joshi wrote: > > >> Hello All, >> >> I am trying to gather xenserver statistics by parsing the xenserver rrd >> files that reside on the xen host, by retrieving them via a python >> plugin I have written. >> >> I have a few issues I face here: >> >> 1. I see that some of the rdd files on the xenserver hosts under >> /var/xapi/blobs/rrds are substantially bigger than the others. What this >> leads to is a timeout at my end, when I encounter a big file and try to >> read it back for parsing. >> >> 2. I saw quite a few NaN values when I looked at these files. >> >> 3. I was curious to know how the xen center collected statistics, and if >> it indeed used the rrd files to parse through to collect statistics. >> >> In any case, since the original java api is deprecated, this was the >> only way out as far as collecting stats was concerned. Please let me >> know if there is a better way to resolve this. >> >> Any help would be highly appreciated. >> >> Regards, >> >> Abhishek >> >> _______________________________________________ >> xen-api mailing list >> xen-api@lists.xensource.com >> http://lists.xensource.com/mailman/listinfo/xen-api >> > _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-users-bounces@lists.xensource.com Thu Jun 24 03:32:52 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Thu, 24 Jun 2010 03:32:52 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ORjjo-0007gg-Ip; Thu, 24 Jun 2010 03:32:52 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1ORjiZ-0007L6-Jn for xen-users@lists.xensource.com; Thu, 24 Jun 2010 03:31:36 -0700 X-ASG-Debug-ID: 1277375492-72b2001a0000-xM1yvO X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 17B1A29F7F8; Thu, 24 Jun 2010 03:31:33 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id zK0L0GGRu5uPzUPW (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Thu, 24 Jun 2010 03:31:33 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,473,1272844800"; d="scan'208";a="568363" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 24 Jun 2010 10:31:31 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.160]) by LONPMAILMX01.citrite.net ([10.30.224.162]) with mapi; Thu, 24 Jun 2010 11:31:31 +0100 From: Dave Scott To: "'xen-api@lists.xensource.com'" , "'xen-devel@lists.xensource.com'" , "'xen-users@lists.xensource.com'" Date: Thu, 24 Jun 2010 11:31:31 +0100 X-ASG-Orig-Subj: RE: [XCP]: RC1 of XCP 0.5 available for testing Thread-Topic: [XCP]: RC1 of XCP 0.5 available for testing Thread-Index: AcsJpIcrHkfzvFFiQgSIbGTkzIZqEAJ4fuLA Message-ID: <81A73678E76EA642801C8F2E4823AD218080C98A3B@LONPMAILBOX01.citrite.net> References: <81A73678E76EA642801C8F2E4823AD21807FFE696B@LONPMAILBOX01.citrite.net> In-Reply-To: <81A73678E76EA642801C8F2E4823AD21807FFE696B@LONPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.eu.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277375494 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33411 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: Subject: [Xen-users] RE: [XCP]: RC1 of XCP 0.5 available for testing X-BeenThere: xen-users@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Xen user discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-users-bounces@lists.xensource.com Errors-To: xen-users-bounces@lists.xensource.com Hi everyone, The second release candidate of the Xen Cloud Platform (XCP) version 0.5 is= now available for testing from: http://www.xen.org/products/cloud_source_0.5.html The changes since the RC1 are: * VCPU weight/cap/affinity are now preserved over VM migrate, resume * CLI command 'xe get-vms-which-prevent-evacuation' now follows the usual C= LI pattern and '--minimal' works as expected * Failure to manually change the pool master when there is a large amount o= f RRD data has been fixed[1] * pygrub now supports ext4 filesystems ... leading to ... * experimental support for Ubuntu Lucid Lynx 10.04[2] Please download and test! :) [1] if there are a large number of RRD datasources (eg corresponding to a l= arge number of VLANs) then the RRD XML becomes large and serializing it wil= l fail. This failure nolonger causes the pool master transition to fail but= it does prevent the XML being saved to disk. Hopefully this will be fixed = in the unstable branch for the next release. [2] thanks to Alex Zeffertt, David Markey and Ian Campbell for sorting this= out. Note that you should select the network install option if you are usi= ng a console like OpenXenManager. Cheers, Dave > -----Original Message----- > From: Dave Scott > Sent: 11 June 2010 20:28 > To: 'xen-api@lists.xensource.com'; 'xen-devel@lists.xensource.com'; > 'xen-users@lists.xensource.com' > Subject: [XCP]: RC1 of XCP 0.5 available for testing >=20 > Hi everyone, >=20 > The first release candidate of the Xen Cloud Platform (XCP) version 0.5 > is > now available for testing from: >=20 > http://www.xen.org/products/cloud_source_0.5.html >=20 > XCP-0.5 is intended to be a *stable* release, suitable for long-term > production use. > Please download this release candidate and give it a thorough workout! >=20 > Cheers, > Dave _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users From xen-users-bounces@lists.xensource.com Mon Jun 28 05:49:45 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 28 Jun 2010 05:49:45 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OTDmT-00038O-55; Mon, 28 Jun 2010 05:49:45 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OTDl9-0002n4-6x for xen-users@lists.xensource.com; Mon, 28 Jun 2010 05:48:23 -0700 X-ASG-Debug-ID: 1277729299-16f5000a0000-xM1yvO X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id F00A82A1B41; Mon, 28 Jun 2010 05:48:19 -0700 (PDT) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) by spam.xensource.com with ESMTP id bJkQ1VJMYZKdybp3 (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Mon, 28 Jun 2010 05:48:19 -0700 (PDT) X-Barracuda-Envelope-From: stephen.spector@citrix.com X-IronPort-AV: E=Sophos;i="4.53,497,1272859200"; d="scan'208,217";a="9144934" Received: from ftlpmailmx02.citrite.net ([10.9.154.224]) by FTLPIPO01.CITRIX.COM with ESMTP/TLS/RC4-MD5; 28 Jun 2010 08:48:18 -0400 Received: from FTLPMAILBOX01.citrite.net ([10.13.98.208]) by FTLPMAILMX02.citrite.net ([10.9.154.224]) with mapi; Mon, 28 Jun 2010 08:48:19 -0400 From: Stephen Spector To: "xen-devel@lists.xensource.com" , "xen-api@lists.xensource.com" , "xen-users@lists.xensource.com" Date: Mon, 28 Jun 2010 08:44:49 -0400 X-ASG-Orig-Subj: XCP Community Meeting #2 Thread-Topic: XCP Community Meeting #2 Thread-Index: AcsWwC6+WM2wJBJdQzOJTqpLtTM6DQ== Message-ID: <652FFB2C8F91E3428799B1FFF8B490C9857C25CF3E@FTLPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Barracuda-Connect: smtp.citrix.com[66.165.176.89] X-Barracuda-Start-Time: 1277729299 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33805 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Cc: Subject: [Xen-users] XCP Community Meeting #2 X-BeenThere: xen-users@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Xen user discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0032857800==" Sender: xen-users-bounces@lists.xensource.com Errors-To: xen-users-bounces@lists.xensource.com --===============0032857800== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF3EFTLPMAILBOX01_" --_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF3EFTLPMAILBOX01_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On July 7, 2010 the Xen.org community will be hosting the 2nd Xen Community= Meeting to discuss XCP development issues. This meeting will be the follow= -up to meeting #1 .= Details follow: Meeting Date: July 7, 2010 Time: 14:00 UTC / 2:00 pm UK (London) / 9:00 pm US EST Location: IRC #xen-api on Freenode Dial-In: 1.888.371.8921 Code: 275279 International Toll Free Numbers: http://btconferencing.com/citrix/globalaccess/ Agenda: * Status of XCP 0.5 Testing/Release * XCP Support for libvirt * Cloud Frontends / APIs o Eucalyptus / OpenNebula / etc. * Open Issues - please email Stephen.spector@xen.org with items Thanks. Stephen Spector Xen.org Community Manager T: (772) 621-5062 | M: (954) 854-4257 stephen.spector@xen.org http://blog.xen.org | @xen_com_mgr Network World Open Source Exposed Blog --_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF3EFTLPMAILBOX01_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

On July 7, 2010 the Xen.org community will be hosting = the 2nd Xen Community Meeting to discuss XCP development issues. This meeting will = be the follow-up to meeting #1 <http://wiki.xensource.com/xenwiki/XCP_Month= ly_Meetings>. Details follow:

 

Meeting Date:   July 7, 2010

Time:        &= nbsp;            14:= 00 UTC /  2:00 pm UK (London) / 9:00 pm US EST

Location:       &nb= sp;      IRC #xen-api on Freenode

Dial-In:       &nbs= p;          1.888.371.8921&nbs= p; Code: 275279

 

Internatio= nal Toll Free Numbers:

http://btconferenci= ng.com/citrix/globalaccess/

 

Agenda:

 

·         Status of XCP 0.5 Testing/Release=

·         XCP Support for libvirt

·         Cloud Frontends / APIs

o&nb= sp;  Eucalyptus / OpenNebula / etc.

·         Open Issues – please email Stephen.spector@xen.org with it= ems

 

Thanks.

 

 

Stephen Spector

 

Xen.org Community Manager

T: (772) 621-5062 | M: (954) 854-4257

stephen.spector@xen.org

http://blog.xen.org | @xen_com_mgr

Network World Open Source Exposed Blog

 

 

 

 

 

--_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF3EFTLPMAILBOX01_-- --===============0032857800== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users --===============0032857800==-- From xen-api-bounces@lists.xensource.com Mon Jun 28 09:20:54 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Mon, 28 Jun 2010 09:20:54 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OTH4o-0002zB-7y; Mon, 28 Jun 2010 09:20:54 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OTH3B-0002SY-Vl for xen-api@lists.xensource.com; Mon, 28 Jun 2010 09:19:14 -0700 X-ASG-Debug-ID: 1277741951-1d5400020000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 6ED582A2202 for ; Mon, 28 Jun 2010 09:19:12 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id hPXFl1zgRo4UMQBh (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Mon, 28 Jun 2010 09:19:12 -0700 (PDT) X-Barracuda-Envelope-From: Alex.Zeffertt@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,498,1272844800"; d="scan'208";a="631578" Received: from lonpmailmx01.citrite.net ([10.30.224.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 28 Jun 2010 16:19:11 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by LONPMAILMX01.citrite.net (10.30.224.162) with Microsoft SMTP Server id 8.2.254.0; Mon, 28 Jun 2010 17:19:11 +0100 Received: from galois.uk.xensource.com ([10.80.2.38] helo=[127.0.1.1]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1OTH39-0004Vq-3y for xen-api@lists.xensource.com; Mon, 28 Jun 2010 17:19:11 +0100 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-ASG-Orig-Subj: [PATCH] PR-1098: Add templates for RHEL 5.5 based distros X-Mercurial-Node: 19ac4330bdfcd63f3a8ef0b399143997fae30ba5 Message-ID: <19ac4330bdfcd63f3a8e.1277741945@galois> User-Agent: Mercurial-patchbomb/1.4.3 Date: Mon, 28 Jun 2010 17:19:05 +0100 From: Alex Zeffertt To: xen-api@lists.xensource.com X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277741953 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.33819 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Subject: [Xen-API] [PATCH] PR-1098: Add templates for RHEL 5.5 based distros X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com # HG changeset patch # User Alex Zeffertt # Date 1277741614 -3600 # Node ID 19ac4330bdfcd63f3a8ef0b399143997fae30ba5 # Parent 5fb71efcee166e38e03f8cb553aceb66616644ed PR-1098: Add templates for RHEL 5.5 based distros Signed-off-by: Alex Zeffertt diff -r 5fb71efcee16 -r 19ac4330bdfc ocaml/xapi/create_templates.ml --- a/ocaml/xapi/create_templates.ml Mon Jun 28 17:07:26 2010 +0100 +++ b/ocaml/xapi/create_templates.ml Mon Jun 28 17:13:34 2010 +0100 @@ -444,11 +444,13 @@ rhel5x_template "Red Hat Enterprise Linux 5.2" X32 [l; ]; rhel5x_template "Red Hat Enterprise Linux 5.3" X32 [l; ]; rhel5x_template "Red Hat Enterprise Linux 5.4" X32 [ ]; + rhel5x_template "Red Hat Enterprise Linux 5.5" X32 [ ]; rhel5x_template "Red Hat Enterprise Linux 5.0" X64 [ ]; rhel5x_template "Red Hat Enterprise Linux 5.1" X64 [ ]; rhel5x_template "Red Hat Enterprise Linux 5.2" X64 [ ]; rhel5x_template "Red Hat Enterprise Linux 5.3" X64 [ ]; rhel5x_template "Red Hat Enterprise Linux 5.4" X64 [ ]; + rhel5x_template "Red Hat Enterprise Linux 5.5" X64 [ ]; rhel4x_template "CentOS 4.5" X32 [ s;]; rhel4x_template "CentOS 4.6" X32 [ s;]; @@ -459,22 +461,26 @@ rhel5x_template "CentOS 5.2" X32 [l; ]; rhel5x_template "CentOS 5.3" X32 [l; ]; rhel5x_template "CentOS 5.4" X32 [ ]; + rhel5x_template "CentOS 5.5" X32 [ ]; rhel5x_template "CentOS 5.0" X64 [ ]; rhel5x_template "CentOS 5.1" X64 [ ]; rhel5x_template "CentOS 5.2" X64 [ ]; rhel5x_template "CentOS 5.3" X64 [ ]; rhel5x_template "CentOS 5.4" X64 [ ]; + rhel5x_template "CentOS 5.5" X64 [ ]; rhel5x_template "Oracle Enterprise Linux 5.0" X32 [ ]; rhel5x_template "Oracle Enterprise Linux 5.1" X32 [ ]; rhel5x_template "Oracle Enterprise Linux 5.2" X32 [l; ]; rhel5x_template "Oracle Enterprise Linux 5.3" X32 [l; ]; rhel5x_template "Oracle Enterprise Linux 5.4" X32 [ ]; + rhel5x_template "Oracle Enterprise Linux 5.5" X32 [ ]; rhel5x_template "Oracle Enterprise Linux 5.0" X64 [ ]; rhel5x_template "Oracle Enterprise Linux 5.1" X64 [ ]; rhel5x_template "Oracle Enterprise Linux 5.2" X64 [ ]; rhel5x_template "Oracle Enterprise Linux 5.3" X64 [ ]; rhel5x_template "Oracle Enterprise Linux 5.4" X64 [ ]; + rhel5x_template "Oracle Enterprise Linux 5.5" X64 [ ]; sles_9_template "SUSE Linux Enterprise Server 9 SP4" X32 [ ]; sles10sp1_template "SUSE Linux Enterprise Server 10 SP1" X32 [ ]; _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api From xen-api-bounces@lists.xensource.com Wed Jun 30 06:55:40 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 30 Jun 2010 06:55:40 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OTxlM-0002AU-K2; Wed, 30 Jun 2010 06:55:40 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OTxl7-00027v-Mb for xen-api@lists.xensource.com; Wed, 30 Jun 2010 06:55:25 -0700 X-ASG-Debug-ID: 1277906124-12b2003f0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP02.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id C956E2A32CF for ; Wed, 30 Jun 2010 06:55:24 -0700 (PDT) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) by spam.xensource.com with ESMTP id UinPncGL8IRvx1Qj for ; Wed, 30 Jun 2010 06:55:24 -0700 (PDT) X-Barracuda-Envelope-From: stephen.spector@citrix.com X-IronPort-AV: E=Sophos;i="4.53,513,1272859200"; d="scan'208,217";a="103738699" Received: from ftlpmailmx02.citrite.net ([10.9.154.224]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 30 Jun 2010 09:55:23 -0400 Received: from FTLPMAILBOX01.citrite.net ([10.13.98.208]) by FTLPMAILMX02.citrite.net ([10.9.154.224]) with mapi; Wed, 30 Jun 2010 09:55:24 -0400 From: Stephen Spector To: "xen-api@lists.xensource.com" Date: Wed, 30 Jun 2010 09:55:22 -0400 X-ASG-Orig-Subj: XCP Project Home page on Xen.org Wiki Thread-Topic: XCP Project Home page on Xen.org Wiki Thread-Index: AcsYW+JW43g9QAhBRVSbtWlFuYtsHQ== Message-ID: <652FFB2C8F91E3428799B1FFF8B490C9857C25CF56@FTLPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Barracuda-Connect: smtp02.citrix.com[66.165.176.63] X-Barracuda-Start-Time: 1277906124 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.34000 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Subject: [Xen-API] XCP Project Home page on Xen.org Wiki X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1690082389==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com --===============1690082389== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF56FTLPMAILBOX01_" --_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF56FTLPMAILBOX01_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Team: I have updated the XCP Project Overview page at http://wiki.xensource.com/x= enwiki/Project_Overview to better serve users and developers looking for in= formation. Later this week I anticipate making changes to higher level page= s to enable people to find this page with less trouble than it takes today. Please update any of the information you are aware of on this page, etc. Thanks. ...spector --_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF56FTLPMAILBOX01_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Team:

 

I have updated the XCP Project Overview page at http://wiki.xen= source.com/xenwiki/Project_Overview to better serve users and developers looking for information. Later this we= ek I anticipate making changes to higher level pages to enable people to find th= is page with less trouble than it takes today.

 

Please update any of the information you are aware of = on this page, etc.

 

Thanks.

 

…spector

 

 

--_000_652FFB2C8F91E3428799B1FFF8B490C9857C25CF56FTLPMAILBOX01_-- --===============1690082389== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1690082389==-- From xen-api-bounces@lists.xensource.com Wed Jun 30 07:02:20 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 30 Jun 2010 07:02:20 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OTxro-0002PH-55; Wed, 30 Jun 2010 07:02:20 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OTxrd-0002NL-GB for xen-api@lists.xensource.com; Wed, 30 Jun 2010 07:02:09 -0700 X-ASG-Debug-ID: 1277906528-12b2004a0000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from aa011msr.fastwebnet.it (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 037922A2F5C for ; Wed, 30 Jun 2010 07:02:08 -0700 (PDT) Received: from aa011msr.fastwebnet.it (aa011msr.fastwebnet.it [85.18.95.71]) by spam.xensource.com with ESMTP id WABA5JHBOm972Kdg for ; Wed, 30 Jun 2010 07:02:08 -0700 (PDT) X-Barracuda-Envelope-From: cluster@xinet.it Received: from fgmobile (37.4.86.66) by aa011msr.fastwebnet.it (8.5.016.6) id 4C163E1A01FC25A0 for xen-api@lists.xensource.com; Wed, 30 Jun 2010 16:02:07 +0200 From: To: X-ASG-Orig-Subj: XCP: centos 5.5 template Date: Wed, 30 Jun 2010 16:01:54 +0200 Message-ID: <001801cb185c$cb8f5fe0$62ae1fa0$@it> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsYMC4I03DrKfJkStqpqPb97mI8twALJP4Q Content-Language: it X-Barracuda-Connect: aa011msr.fastwebnet.it[85.18.95.71] X-Barracuda-Start-Time: 1277906529 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE, NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.34000 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.00 HTML_MESSAGE BODY: HTML included in message Subject: [Xen-API] XCP: centos 5.5 template X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0563024587==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com This is a multi-part message in MIME format. --===============0563024587== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0019_01CB186D.8F182FE0" Content-Language: it This is a multi-part message in MIME format. ------=_NextPart_000_0019_01CB186D.8F182FE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Do anyone know if Is there a new template to download? Thanks and regards, FG ------=_NextPart_000_0019_01CB186D.8F182FE0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Do anyone know if Is there a new = template to download?

 

Thanks and = regards,

FG

 

------=_NextPart_000_0019_01CB186D.8F182FE0-- --===============0563024587== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============0563024587==-- From xen-api-bounces@lists.xensource.com Wed Jun 30 07:02:43 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 30 Jun 2010 07:02:43 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OTxsB-0002VW-Ju; Wed, 30 Jun 2010 07:02:43 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OTxs1-0002Ru-3W for xen-api@lists.xensource.com; Wed, 30 Jun 2010 07:02:33 -0700 X-ASG-Debug-ID: 1277906528-12b2004a0001-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from aa011msr.fastwebnet.it (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id 8FFFB2A3301 for ; Wed, 30 Jun 2010 07:02:32 -0700 (PDT) Received: from aa011msr.fastwebnet.it (aa011msr.fastwebnet.it [85.18.95.71]) by spam.xensource.com with ESMTP id pgiyaKtI4Uh8OgpD for ; Wed, 30 Jun 2010 07:02:32 -0700 (PDT) X-Barracuda-Envelope-From: cluster@xinet.it Received: from fgmobile (37.4.86.66) by aa011msr.fastwebnet.it (8.5.016.6) id 4C163E1A01FC2B76 for xen-api@lists.xensource.com; Wed, 30 Jun 2010 16:02:31 +0200 From: To: X-ASG-Orig-Subj: XCP: Backup Scenario Date: Wed, 30 Jun 2010 16:02:18 +0200 Message-ID: <001d01cb185c$da23fac0$8e6bf040$@it> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsTkG/8J6qL1TWxT+OkWt83uNkCZwEzGC/g Content-Language: it X-Barracuda-Connect: aa011msr.fastwebnet.it[85.18.95.71] X-Barracuda-Start-Time: 1277906552 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE, NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.34000 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.00 HTML_MESSAGE BODY: HTML included in message Subject: [Xen-API] XCP: Backup Scenario X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1131718247==" Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com This is a multi-part message in MIME format. --===============1131718247== Content-Type: multipart/alternative; boundary="----=_NextPart_000_001E_01CB186D.9DACCAC0" Content-Language: it This is a multi-part message in MIME format. ------=_NextPart_000_001E_01CB186D.9DACCAC0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi all, i would like to receive suggestions about this scenario: I have an XCP pool of 4 Machine. All the server in the pool are connected to the storage via FC. I wont to mirror the storage content in a 1TB disk installed into the XCP server. The idea is to mirror the storage content to have a fast recovery if the storage fails. Do you think it could be a good idea? How can I implement a data sync between the storage repository and the local disk? RSYNC or something else? Thanks for any suggestion. Best regards, FG ------=_NextPart_000_001E_01CB186D.9DACCAC0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi all,

 

i would like to receive = suggestions about this scenario:

 

I have an XCP pool of 4 Machine. = All the server in the pool are connected  to the storage via FC. I wont to = mirror the storage content in a 1TB disk installed into the XCP server. The = idea is to mirror the storage content to have a fast recovery if the storage = fails.

 

Do you think it could be a good = idea? How can I implement a data sync between the storage repository and the local = disk? RSYNC or something else?

 

Thanks for any = suggestion.

 

Best = regards,

FG

------=_NextPart_000_001E_01CB186D.9DACCAC0-- --===============1131718247== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api --===============1131718247==-- From xen-api-bounces@lists.xensource.com Wed Jun 30 10:23:18 2010 Return-path: Envelope-to: www-data@lists.xensource.com Delivery-date: Wed, 30 Jun 2010 10:23:18 -0700 Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1OU10H-0006IB-Mm; Wed, 30 Jun 2010 10:23:17 -0700 Received: from spam.xensource.com ([70.42.241.90]) by lists.xensource.com with esmtp (Exim 4.43) id 1OU101-0006F2-Aq for xen-api@lists.xensource.com; Wed, 30 Jun 2010 10:23:01 -0700 X-ASG-Debug-ID: 1277918577-27fd00010000-trChs3 X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi Received: from SMTP.EU.CITRIX.COM (localhost [127.0.0.1]) by spam.xensource.com (Spam & Virus Firewall) with ESMTP id B1FBA2A0098; Wed, 30 Jun 2010 10:22:58 -0700 (PDT) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [62.200.22.115]) by spam.xensource.com with ESMTP id CLbHFIaEnU3XCY13 (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO); Wed, 30 Jun 2010 10:22:58 -0700 (PDT) X-Barracuda-Envelope-From: Dave.Scott@eu.citrix.com X-IronPort-AV: E=Sophos;i="4.53,514,1272844800"; d="scan'208";a="677023" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 30 Jun 2010 17:22:55 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.160]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Wed, 30 Jun 2010 18:22:55 +0100 From: Dave Scott To: "'xen-api@lists.xensource.com'" , "'xen-devel@lists.xensource.com'" , "'xen-users@lists.xensource.com'" Date: Wed, 30 Jun 2010 18:21:24 +0100 X-ASG-Orig-Subj: [XCP]: RC3 (the final one?) of XCP 0.5 available for testing Thread-Topic: [XCP]: RC3 (the final one?) of XCP 0.5 available for testing Thread-Index: AcsJpIcrHkfzvFFiQgSIbGTkzIZqEAJ4fuLAATxuMUA= Message-ID: <81A73678E76EA642801C8F2E4823AD218080C98A6D@LONPMAILBOX01.citrite.net> References: <81A73678E76EA642801C8F2E4823AD21807FFE696B@LONPMAILBOX01.citrite.net> <81A73678E76EA642801C8F2E4823AD218080C98A3B@LONPMAILBOX01.citrite.net> In-Reply-To: <81A73678E76EA642801C8F2E4823AD218080C98A3B@LONPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: smtp.ctxuk.citrix.com[62.200.22.115] X-Barracuda-Start-Time: 1277918579 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at xensource.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.34014 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Cc: Subject: [Xen-API] [XCP]: RC3 (the final one?) of XCP 0.5 available for testing X-BeenThere: xen-api@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of API issues surrounding Xen List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-api-bounces@lists.xensource.com Errors-To: xen-api-bounces@lists.xensource.com Hi everyone, The third (final?) release candidate of the Xen Cloud Platform (XCP) versio= n 0.5 is now available for testing from: http://www.xen.org/products/cloud_source_0.5.html The changes since the RC2 are: * it should now be possible to upgrade from previous RCs as well as 0.1* * a template for 64-bit Ubuntu 10.04 now exists (previously only a 32-bit o= ne was present) * experimental templates for 32-bit and 64-bit Debian Squeeze are included Please download and test! :) Cheers, Dave > -----Original Message----- > From: Dave Scott > Sent: 24 June 2010 10:32 > To: 'xen-api@lists.xensource.com'; 'xen-devel@lists.xensource.com'; > 'xen-users@lists.xensource.com' > Subject: RE: [XCP]: RC1 of XCP 0.5 available for testing >=20 > Hi everyone, >=20 > The second release candidate of the Xen Cloud Platform (XCP) version > 0.5 is now available for testing from: >=20 > http://www.xen.org/products/cloud_source_0.5.html >=20 > The changes since the RC1 are: >=20 > * VCPU weight/cap/affinity are now preserved over VM migrate, resume > * CLI command 'xe get-vms-which-prevent-evacuation' now follows the > usual CLI pattern and '--minimal' works as expected > * Failure to manually change the pool master when there is a large > amount of RRD data has been fixed[1] > * pygrub now supports ext4 filesystems > ... leading to ... > * experimental support for Ubuntu Lucid Lynx 10.04[2] >=20 > Please download and test! :) >=20 > [1] if there are a large number of RRD datasources (eg corresponding to > a large number of VLANs) then the RRD XML becomes large and serializing > it will fail. This failure nolonger causes the pool master transition > to fail but it does prevent the XML being saved to disk. Hopefully this > will be fixed in the unstable branch for the next release. >=20 > [2] thanks to Alex Zeffertt, David Markey and Ian Campbell for sorting > this out. Note that you should select the network install option if you > are using a console like OpenXenManager. >=20 > Cheers, > Dave >=20 >=20 > > -----Original Message----- > > From: Dave Scott > > Sent: 11 June 2010 20:28 > > To: 'xen-api@lists.xensource.com'; 'xen-devel@lists.xensource.com'; > > 'xen-users@lists.xensource.com' > > Subject: [XCP]: RC1 of XCP 0.5 available for testing > > > > Hi everyone, > > > > The first release candidate of the Xen Cloud Platform (XCP) version > 0.5 > > is > > now available for testing from: > > > > http://www.xen.org/products/cloud_source_0.5.html > > > > XCP-0.5 is intended to be a *stable* release, suitable for long-term > > production use. > > Please download this release candidate and give it a thorough workout! > > > > Cheers, > > Dave _______________________________________________ xen-api mailing list xen-api@lists.xensource.com http://lists.xensource.com/mailman/listinfo/xen-api