Mailing List Archive

Intel CQM feature enabling in XenAPI
Hi Everyone,

This email is about CQM (a new feature implemented in Intel Xeon processors) enabling in XenAPI. And we have to ask you for help.

CQM (Cache QoS Monitoring) allows an Operating System, Hypervisor or similar system management agent to determine the usage of cache by applications running on the platform. The hardware is not publicly available yet, but Red Hat and others should have some of these platforms for testing. For details on the implementation, please refer to the Intel Software Development Manual, Volume 3, Chapter 17.14: Cache Quality of Service Monitoring

Now we have to enable this new feature in XenAPI, in order to Openstack can use it with Xen environment. As you know, for Openstack, XenAPI is the best way to use Xen Hypervisor, and libvirt.xen could not be supported smoothly by Openstack.

In order to add CQM support in XenAPI, we maybe modify some public structures or functions, including host info, vm info, etc., to add cache usage related information. It means we will have to patch the latest code from XenAPI repo. But unfortunately, we tried some ways to setup XenAPI development environment, and it is not ready yet. There are a lot of package dependence issues or build issues, so that I can't not build XenAPI code successfully.

- According to README, I used opam to build XenAPI code. But some packages, including vhd, xenstore, etc., could not be built successfully. And with CentOS, opam must use GLIBC 2.14, which is not provided by CentOS 6.5.

- I once asked Zheng Li for help. Thanks for Zheng's help.:) Zheng told me that we could build xenserver-core probject (https://github.com/xenserver/xenserver-core), with which we should be able to build most xenserver components (including xapi) on a vanilla CentOS.
We tried this way, and xenserver-core could be built smoothly on CentOS6.5 or Ubuntu1304. But after that, XenAPI could not be built successfully, and said some packages could not be found (stdext, xml-light2, uuid, etc..)

So, could anyone tell me how to setup XenAPI development environment, or how to add new feature into XenAPI? Or could any citrix guys help us enable this new feature in XenAPI? :)

Thanks,
Qiaowei
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi,

> I once asked Zheng Li for help. Thanks for Zheng's help.:)
> Zheng told me that we could build xenserver-core probject
> (https://github.com/xenserver/xenserver-core), with which we should be
> able to build most xenserver components (including xapi) on a vanilla
> CentOS.
>
> We tried this way, and xenserver-core could be built smoothly on CentOS6.5
> or Ubuntu1304. But after that, XenAPI could not be built successfully, and
> said some packages could not be found (stdext, xml-light2, uuid, etc..)

This is happening because building and installing xenserver-core does
not install xen-api's build dependencies. xenserver-core builds RPMs
in temporary chroot environments, using mock, so even though you have
build xen-api as part of xenserver-core, its dependencies were not
installed on your machine. You can use 'yum-builddep' to install
them from your xenserver-core repository, but if you want to build
trunk xen-api you will need to install a couple of other dependencies
which are not yet packaged in xenserver-core.

This should do the trick:

# install the packaged dependencies
sudo yum-builddep xapi

# build and install ocaml-ctypes, needed by ocaml-opasswd below
sudo yum install libffi-devel
curl -OL https://github.com/ocamllabs/ocaml-ctypes/archive/ocaml-ctypes-0.2.3.tar.gz
tar zxvf ocaml-ctypes-0.2.3.tar.gz
cd ocaml-ctypes-ocaml-ctypes-0.2.3
make
make install
cd ..

# build and install ocaml-passwd
# ocaml-opasswd must be patched to build with the version of ocaml used by
# xenserver-core
git clone https://github.com/xapi-project/ocaml-opasswd
sudo yum install oasis
cd ocaml-opasswd
patch -p1 < ocaml-opasswd.patch
oasis setup
make
sudo make install
cd ..

# build xen-api
git clone https://github.com/xapi-project/xen-api
cd xen-api
make

Thanks,
Euan

_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Forgot to attach the patch...

Thanks,
Euan

On Tue, Apr 08, 2014 at 03:45:40PM +0100, Euan Harris wrote:
> Hi,
>
> > I once asked Zheng Li for help. Thanks for Zheng's help.:)
> > Zheng told me that we could build xenserver-core probject
> > (https://github.com/xenserver/xenserver-core), with which we should be
> > able to build most xenserver components (including xapi) on a vanilla
> > CentOS.
> >
> > We tried this way, and xenserver-core could be built smoothly on CentOS6.5
> > or Ubuntu1304. But after that, XenAPI could not be built successfully, and
> > said some packages could not be found (stdext, xml-light2, uuid, etc..)
>
> This is happening because building and installing xenserver-core does
> not install xen-api's build dependencies. xenserver-core builds RPMs
> in temporary chroot environments, using mock, so even though you have
> build xen-api as part of xenserver-core, its dependencies were not
> installed on your machine. You can use 'yum-builddep' to install
> them from your xenserver-core repository, but if you want to build
> trunk xen-api you will need to install a couple of other dependencies
> which are not yet packaged in xenserver-core.
>
> This should do the trick:
>
> # install the packaged dependencies
> sudo yum-builddep xapi
>
> # build and install ocaml-ctypes, needed by ocaml-opasswd below
> sudo yum install libffi-devel
> curl -OL https://github.com/ocamllabs/ocaml-ctypes/archive/ocaml-ctypes-0.2.3.tar.gz
> tar zxvf ocaml-ctypes-0.2.3.tar.gz
> cd ocaml-ctypes-ocaml-ctypes-0.2.3
> make
> make install
> cd ..
>
> # build and install ocaml-passwd
> # ocaml-opasswd must be patched to build with the version of ocaml used by
> # xenserver-core
> git clone https://github.com/xapi-project/ocaml-opasswd
> sudo yum install oasis
> cd ocaml-opasswd
> patch -p1 < ocaml-opasswd.patch
> oasis setup
> make
> sudo make install
> cd ..
>
> # build xen-api
> git clone https://github.com/xapi-project/xen-api
> cd xen-api
> make
>
> Thanks,
> Euan
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Euan,

>
> This is happening because building and installing xenserver-core does
> not install xen-api's build dependencies. xenserver-core builds RPMs
> in temporary chroot environments, using mock, so even though you have build
> xen-api as part of xenserver-core, its dependencies were not
> installed on your machine. You can use 'yum-builddep' to install
> them from your xenserver-core repository, but if you want to build trunk xen-api
> you will need to install a couple of other dependencies which are not yet
> packaged in xenserver-core.
>
> This should do the trick:
>
> # install the packaged dependencies
> sudo yum-builddep xapi
>
> # build and install ocaml-ctypes, needed by ocaml-opasswd below
> sudo yum install libffi-devel
> curl -OL
> https://github.com/ocamllabs/ocaml-ctypes/archive/ocaml-ctypes-0.2.3.tar.gz
> tar zxvf ocaml-ctypes-0.2.3.tar.gz
> cd ocaml-ctypes-ocaml-ctypes-0.2.3
> make
> make install
> cd ..
>
> # build and install ocaml-passwd
> # ocaml-opasswd must be patched to build with the version of ocaml used
> by
> # xenserver-core
> git clone https://github.com/xapi-project/ocaml-opasswd
> sudo yum install oasis
> cd ocaml-opasswd
> patch -p1 < ocaml-opasswd.patch
> oasis setup
> make
> sudo make install
> cd ..
>
> # build xen-api
> git clone https://github.com/xapi-project/xen-api
> cd xen-api
> make
>

Thanks much for your detail guide. I firstly built xsenserver-core, and then followed your instructions and there are not those package dependence issues when built xapi. But unfortunately, I met one make error as follow:

--- Checking for gcc... (found /usr/bin/gcc) ] 00283 / 02615
--- Checking for g++... (found /usr/bin/g++)
- build ocaml/xapi storage_proxy.o
+ ocamlfind ocamlopt -package oclock,xml-light2,cdrom,pciutil,sexpr,xcp,stunnel,http-svr,xen-utils,netdev,tapctl,rpclib,xenstore-compat,xenctrl,uuid,gzip,sha1,xcp.network,xcp.rrd,xcp.storage,xcp.xen,xcp.memory,tar,tar.unix,oPasswd,xenctrl,xenctrlext,xenstore-compat,cpuid -g -dtypes -bin-annot -thread -warn-error +a-4-6-9-27-28-29 -ccopt -fPIC -I ../idl -I ../idl/ocaml_backend -I ../autogen -I ../database/ -I ../xenops -I ../xva -I ../util -I ../auth -I ../license -I ../client_records -I ../rfb -I ../gpg -I ../rrdd/interface -I .. -c storage_proxy.ml
File "storage_proxy.ml", line 41, characters 16-31:
Error: Unbound value Client.SR.probe
*** omake: 2117/2630 targets are up to date
*** omake: failed (3 min 18.94 sec, 448/502 scans, 359/926 rules, 1235/3484 digests)
*** omake: targets were not rebuilt because of errors:
ocaml/xapi/storage_proxy.cmi
depends on: ocaml/xapi/storage_proxy.ml
ocaml/xapi/storage_proxy.cmx
depends on: ocaml/xapi/storage_proxy.ml
ocaml/xapi/storage_proxy.o
depends on: ocaml/xapi/storage_proxy.ml
make: *** [all] Error 2

Maybe I am missing something?

Thanks,
Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Qiaowei,

This sounds like it could be heading down a rabbit hole, trying to get xenserver-core building from XAPI trunk. If I remember correctly, the current issue is that you need to take a newer ocaml-xcp-idl.

I've made a number of changes which I suspect you may need at https://github.com/BobBall/xenserver-core/commit/73ad5a198e8a68ab399f8c2a07e440e2fc7121f2. Note that these changes are to enable us to build from master of all repositories on a daily basis (e.g. the RPM version numbers will contain the build date). If that's not your intention, you may need to modify the patch to suit your needs.

Some of these are to make things build with Ocaml 4.0.1 as XAPI now depends on 4.1 which is not available in any distribution.

I do not claim that these changes are all that are needed; I have not finished my investigations into building from master and I'll be getting back to it soon I hope.

Bob

> -----Original Message-----
> From: xen-api-bounces@lists.xen.org [mailto:xen-api-
> bounces@lists.xen.org] On Behalf Of Ren, Qiaowei
> Sent: 09 April 2014 04:33
> To: Euan Harris
> Cc: xen-api@lists.xen.org
> Subject: Re: [Xen-API] Intel CQM feature enabling in XenAPI
>
> Hi Euan,
>
> >
> > This is happening because building and installing xenserver-core does
> > not install xen-api's build dependencies. xenserver-core builds RPMs
> > in temporary chroot environments, using mock, so even though you have
> build
> > xen-api as part of xenserver-core, its dependencies were not
> > installed on your machine. You can use 'yum-builddep' to install
> > them from your xenserver-core repository, but if you want to build trunk
> xen-api
> > you will need to install a couple of other dependencies which are not yet
> > packaged in xenserver-core.
> >
> > This should do the trick:
> >
> > # install the packaged dependencies
> > sudo yum-builddep xapi
> >
> > # build and install ocaml-ctypes, needed by ocaml-opasswd below
> > sudo yum install libffi-devel
> > curl -OL
> > https://github.com/ocamllabs/ocaml-ctypes/archive/ocaml-ctypes-
> 0.2.3.tar.gz
> > tar zxvf ocaml-ctypes-0.2.3.tar.gz
> > cd ocaml-ctypes-ocaml-ctypes-0.2.3
> > make
> > make install
> > cd ..
> >
> > # build and install ocaml-passwd
> > # ocaml-opasswd must be patched to build with the version of ocaml
> used
> > by
> > # xenserver-core
> > git clone https://github.com/xapi-project/ocaml-opasswd
> > sudo yum install oasis
> > cd ocaml-opasswd
> > patch -p1 < ocaml-opasswd.patch
> > oasis setup
> > make
> > sudo make install
> > cd ..
> >
> > # build xen-api
> > git clone https://github.com/xapi-project/xen-api
> > cd xen-api
> > make
> >
>
> Thanks much for your detail guide. I firstly built xsenserver-core, and then
> followed your instructions and there are not those package dependence
> issues when built xapi. But unfortunately, I met one make error as follow:
>
> --- Checking for gcc... (found /usr/bin/gcc) ] 00283 / 02615
> --- Checking for g++... (found /usr/bin/g++)
> - build ocaml/xapi storage_proxy.o
> + ocamlfind ocamlopt -package oclock,xml-
> light2,cdrom,pciutil,sexpr,xcp,stunnel,http-svr,xen-
> utils,netdev,tapctl,rpclib,xenstore-
> compat,xenctrl,uuid,gzip,sha1,xcp.network,xcp.rrd,xcp.storage,xcp.xen,xcp.
> memory,tar,tar.unix,oPasswd,xenctrl,xenctrlext,xenstore-compat,cpuid -g -
> dtypes -bin-annot -thread -warn-error +a-4-6-9-27-28-29 -ccopt -fPIC -I ../idl
> -I ../idl/ocaml_backend -I ../autogen -I ../database/ -I ../xenops -I ../xva -I
> ../util -I ../auth -I ../license -I ../client_records -I ../rfb -I ../gpg -I
> ../rrdd/interface -I .. -c storage_proxy.ml
> File "storage_proxy.ml", line 41, characters 16-31:
> Error: Unbound value Client.SR.probe
> *** omake: 2117/2630 targets are up to date
> *** omake: failed (3 min 18.94 sec, 448/502 scans, 359/926 rules, 1235/3484
> digests)
> *** omake: targets were not rebuilt because of errors:
> ocaml/xapi/storage_proxy.cmi
> depends on: ocaml/xapi/storage_proxy.ml
> ocaml/xapi/storage_proxy.cmx
> depends on: ocaml/xapi/storage_proxy.ml
> ocaml/xapi/storage_proxy.o
> depends on: ocaml/xapi/storage_proxy.ml
> make: *** [all] Error 2
>
> Maybe I am missing something?
>
> Thanks,
> Qiaowei
>
>
> _______________________________________________
> Xen-api mailing list
> Xen-api@lists.xen.org
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Bob,

>
> This sounds like it could be heading down a rabbit hole, trying to get
> xenserver-core building from XAPI trunk. If I remember correctly, the current
> issue is that you need to take a newer ocaml-xcp-idl.
>
> I've made a number of changes which I suspect you may need at
> https://github.com/BobBall/xenserver-core/commit/73ad5a198e8a68ab399f8c
> 2a07e440e2fc7121f2. Note that these changes are to enable us to build from
> master of all repositories on a daily basis (e.g. the RPM version numbers will
> contain the build date). If that's not your intention, you may need to modify
> the patch to suit your needs.
>
I guess I have to use newest master code of xapi to add new feature into xapi. So you mean I should download your this commit and patch into master of xenserver-core project?

> Some of these are to make things build with Ocaml 4.0.1 as XAPI now depends
> on 4.1 which is not available in any distribution.
>
I just checked ocaml version on CentOS, and noticed it is 4.00.1. You mean current master of XAPI depends on 4.1, and if we use your patch XAPI will can be built successfully with 4.00.1, right?

> I do not claim that these changes are all that are needed; I have not finished
> my investigations into building from master and I'll be getting back to it soon I
> hope.
>
Thanks for your feedback, I will try and tell you the result.

Thanks,
Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Yes to all of the below.

If you're interested in testing it out, perhaps you can just try to use my branch from https://github.com/bobball/xenserver-core/tree/trunk-fix

Pull requests welcome to fix anything that doesn't quite work yet!

Bob

> -----Original Message-----
> From: Ren, Qiaowei [mailto:qiaowei.ren@intel.com]
> Sent: 09 April 2014 14:23
> To: Bob Ball; Euan Harris
> Cc: xen-api@lists.xen.org
> Subject: RE: [Xen-API] Intel CQM feature enabling in XenAPI
>
> Hi Bob,
>
> >
> > This sounds like it could be heading down a rabbit hole, trying to get
> > xenserver-core building from XAPI trunk. If I remember correctly, the
> current
> > issue is that you need to take a newer ocaml-xcp-idl.
> >
> > I've made a number of changes which I suspect you may need at
> > https://github.com/BobBall/xenserver-
> core/commit/73ad5a198e8a68ab399f8c
> > 2a07e440e2fc7121f2. Note that these changes are to enable us to build
> from
> > master of all repositories on a daily basis (e.g. the RPM version numbers
> will
> > contain the build date). If that's not your intention, you may need to
> modify
> > the patch to suit your needs.
> >
> I guess I have to use newest master code of xapi to add new feature into
> xapi. So you mean I should download your this commit and patch into
> master of xenserver-core project?
>
> > Some of these are to make things build with Ocaml 4.0.1 as XAPI now
> depends
> > on 4.1 which is not available in any distribution.
> >
> I just checked ocaml version on CentOS, and noticed it is 4.00.1. You mean
> current master of XAPI depends on 4.1, and if we use your patch XAPI will
> can be built successfully with 4.00.1, right?
>
> > I do not claim that these changes are all that are needed; I have not
> finished
> > my investigations into building from master and I'll be getting back to it
> soon I
> > hope.
> >
> Thanks for your feedback, I will try and tell you the result.
>
> Thanks,
> Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Ok. I will try your branch, and I guess I have no more choices. :)

Thanks,
Qiaowei

> -----Original Message-----
> From: Bob Ball [mailto:bob.ball@citrix.com]
> Sent: Wednesday, April 09, 2014 9:29 PM
> To: Ren, Qiaowei; Euan Harris
> Cc: xen-api@lists.xen.org
> Subject: RE: [Xen-API] Intel CQM feature enabling in XenAPI
>
> Yes to all of the below.
>
> If you're interested in testing it out, perhaps you can just try to use my branch
> from https://github.com/bobball/xenserver-core/tree/trunk-fix
>
> Pull requests welcome to fix anything that doesn't quite work yet!
>
> Bob
>
> > -----Original Message-----
> > From: Ren, Qiaowei [mailto:qiaowei.ren@intel.com]
> > Sent: 09 April 2014 14:23
> > To: Bob Ball; Euan Harris
> > Cc: xen-api@lists.xen.org
> > Subject: RE: [Xen-API] Intel CQM feature enabling in XenAPI
> >
> > Hi Bob,
> >
> > >
> > > This sounds like it could be heading down a rabbit hole, trying to
> > > get xenserver-core building from XAPI trunk. If I remember
> > > correctly, the
> > current
> > > issue is that you need to take a newer ocaml-xcp-idl.
> > >
> > > I've made a number of changes which I suspect you may need at
> > > https://github.com/BobBall/xenserver-
> > core/commit/73ad5a198e8a68ab399f8c
> > > 2a07e440e2fc7121f2. Note that these changes are to enable us to
> > > build
> > from
> > > master of all repositories on a daily basis (e.g. the RPM version
> > > numbers
> > will
> > > contain the build date). If that's not your intention, you may need
> > > to
> > modify
> > > the patch to suit your needs.
> > >
> > I guess I have to use newest master code of xapi to add new feature
> > into xapi. So you mean I should download your this commit and patch
> > into master of xenserver-core project?
> >
> > > Some of these are to make things build with Ocaml 4.0.1 as XAPI now
> > depends
> > > on 4.1 which is not available in any distribution.
> > >
> > I just checked ocaml version on CentOS, and noticed it is 4.00.1. You
> > mean current master of XAPI depends on 4.1, and if we use your patch
> > XAPI will can be built successfully with 4.00.1, right?
> >
> > > I do not claim that these changes are all that are needed; I have
> > > not
> > finished
> > > my investigations into building from master and I'll be getting back
> > > to it
> > soon I
> > > hope.
> > >
> > Thanks for your feedback, I will try and tell you the result.
> >
> > Thanks,
> > Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Bob,

>
> Yes to all of the below.
>
> If you're interested in testing it out, perhaps you can just try to use my branch
> from https://github.com/bobball/xenserver-core/tree/trunk-fix
>
> Pull requests welcome to fix anything that doesn't quite work yet!
>
> Bob
>
I tried your branch, and it could report something like:

[CURL] SOURCES/ocaml-opasswd-140409.tar.gz
[RPMBUILD] SRPMS/ocaml-opasswd-140409-1.el6.src.rpm
error: File ./SOURCES/ocaml-opasswd-140410.tar.gz: No such file or directory
make: *** [SRPMS/ocaml-opasswd-140409-1.el6.src.rpm] Error 1

Looks like it is due to "the RPM version numbers will contain the build date". After "configure.sh" again, the error still existed. Maybe I should finish this building in one day.

Certainly I can remove this DIR and clone it again. But I guess I'd better report it to you. :)

Thanks,
Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Just remove the "deps" file from the root and it will rebuild it and all of the RPMS - you don't need to delete the directory.

This is probably because I was actively developing it so the deps file was regularly rebuilt for me.

Bob
________________________________________
From: Ren, Qiaowei [qiaowei.ren@intel.com]
Sent: 10 April 2014 01:45
To: Bob Ball; Euan Harris
Cc: xen-api@lists.xen.org
Subject: RE: [Xen-API] Intel CQM feature enabling in XenAPI

Hi Bob,

>
> Yes to all of the below.
>
> If you're interested in testing it out, perhaps you can just try to use my branch
> from https://github.com/bobball/xenserver-core/tree/trunk-fix
>
> Pull requests welcome to fix anything that doesn't quite work yet!
>
> Bob
>
I tried your branch, and it could report something like:

[CURL] SOURCES/ocaml-opasswd-140409.tar.gz
[RPMBUILD] SRPMS/ocaml-opasswd-140409-1.el6.src.rpm
error: File ./SOURCES/ocaml-opasswd-140410.tar.gz: No such file or directory
make: *** [SRPMS/ocaml-opasswd-140409-1.el6.src.rpm] Error 1

Looks like it is due to "the RPM version numbers will contain the build date". After "configure.sh" again, the error still existed. Maybe I should finish this building in one day.

Certainly I can remove this DIR and clone it again. But I guess I'd better report it to you. :)

Thanks,
Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Bob,

>
> Just remove the "deps" file from the root and it will rebuild it and all of the
> RPMS - you don't need to delete the directory.
>
> This is probably because I was actively developing it so the deps file was
> regularly rebuilt for me.
>
Oh, got it. I am trying.

BTW, when I finish this building of your branch, I still follow Euan's guide from previous email to build XAPI?

Thanks,
Qiaowei

_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Bob,

>
> >
> > Just remove the "deps" file from the root and it will rebuild it and
> > all of the RPMS - you don't need to delete the directory.
> >
> > This is probably because I was actively developing it so the deps file
> > was regularly rebuilt for me.
> >
> Oh, got it. I am trying.
>
I just got one error when build your branch:

[MOCK] RPMS/x86_64/ocaml-nbd-0.9.2-1.el6.x86_64.rpm
[CREATEREPO] RPMS/x86_64/ocaml-nbd-0.9.2-1.el6.x86_64.rpm
make: *** No rule to make target `SOURCES/squeezed_debug.patch', needed by `SRPMS/squeezed-0.10.4-1.el6.src.rpm'. Stop.

squeezed_debug.patch could not be found. Could you tell me how to fix it?

> BTW, when I finish this building of your branch, I still follow Euan's guide from
> previous email to build XAPI?
>
After building trunk-fix, what I need to do next?

Thanks,
Qiawoei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Ah - it seems that I forgot to add the debug patch file to the repository. Unfortunately it seems the system I was using to write this patch has now been re-installed.

I'm not sure if it's needed, so please try again (I've removed the patch from the branch) and if it doesn't compile let me know what the error is (probably including the last few lines of RPMS/x86_64/build.log) and I'll draft a new patch and commit it this time.

Sorry - this proves that I've not compiled it fresh for quite some time! I'm also in the process of setting up a build for the trunk-fix branch.

Once it's been built, you should just be able to use "make install" and follow the remainder of the xenserver-core instructions (e.g. using xenserver-install-wizard) to get the system up and running.

Bob
________________________________________
From: Ren, Qiaowei [qiaowei.ren@intel.com]
Sent: 11 April 2014 06:48
To: Ren, Qiaowei; Bob Ball; Euan Harris
Cc: xen-api@lists.xen.org
Subject: RE: [Xen-API] Intel CQM feature enabling in XenAPI

Hi Bob,

>
> >
> > Just remove the "deps" file from the root and it will rebuild it and
> > all of the RPMS - you don't need to delete the directory.
> >
> > This is probably because I was actively developing it so the deps file
> > was regularly rebuilt for me.
> >
> Oh, got it. I am trying.
>
I just got one error when build your branch:

[MOCK] RPMS/x86_64/ocaml-nbd-0.9.2-1.el6.x86_64.rpm
[CREATEREPO] RPMS/x86_64/ocaml-nbd-0.9.2-1.el6.x86_64.rpm
make: *** No rule to make target `SOURCES/squeezed_debug.patch', needed by `SRPMS/squeezed-0.10.4-1.el6.src.rpm'. Stop.

squeezed_debug.patch could not be found. Could you tell me how to fix it?

> BTW, when I finish this building of your branch, I still follow Euan's guide from
> previous email to build XAPI?
>
After building trunk-fix, what I need to do next?

Thanks,
Qiawoei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Bob,

>
> Ah - it seems that I forgot to add the debug patch file to the repository.
> Unfortunately it seems the system I was using to write this patch has now
> been re-installed.
>
> I'm not sure if it's needed, so please try again (I've removed the patch from the
> branch) and if it doesn't compile let me know what the error is (probably
> including the last few lines of RPMS/x86_64/build.log) and I'll draft a new patch
> and commit it this time.
>
Ok. I will pull newest code ant try. I once manually remove this patch related lines in SPECS/squeezed.spec, but this building still fails.

> Sorry - this proves that I've not compiled it fresh for quite some time! I'm also
> in the process of setting up a build for the trunk-fix branch.
>
> Once it's been built, you should just be able to use "make install" and follow the
> remainder of the xenserver-core instructions (e.g. using
> xenserver-install-wizard) to get the system up and running.
>
You mean I don't have to clone&build XAPI project? But I guess I have to build xapi clone, because I must modify its code and add some features into it. As you know, new feature patch have to be based on newest code of master branch.

Thanks,
Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Bob,

>
> Ah - it seems that I forgot to add the debug patch file to the repository.
> Unfortunately it seems the system I was using to write this patch has now
> been re-installed.
>
> I'm not sure if it's needed, so please try again (I've removed the patch from the
> branch) and if it doesn't compile let me know what the error is (probably
> including the last few lines of RPMS/x86_64/build.log) and I'll draft a new patch
> and commit it this time.
>
With your new branch, unfortunately this building still failed. (Looks like it is so hard to build xapi smoothly. -:) Could you tell me what is your development environment? Which OSV are you using? CentOS or Rhel or ...? )

[MOCK] RPMS/x86_64/squeezed-0.10.4-1.el6.x86_64.rpm
ERROR: Exception(SRPMS/squeezed-0.10.4-1.el6.src.rpm) Config(epel-6-x86_64) 17 minutes 10 seconds
ERROR: Command failed. See logs for output.
# ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/squeezed.spec']
make: *** [RPMS/x86_64/squeezed-0.10.4-1.el6.x86_64.rpm] Error 1

The following is the output of build.log.

Configuring squeezed-0.10.4...
obuild build
Building library squeeze
[1 of 2] Compiling Memory
[2 of 2] Compiling Squeeze
Linking library dist/build/lib-squeeze/squeeze.cmxa
Linking library dist/build/lib-squeeze/squeeze.cma
Building executable squeezed
[1 of 5] Compiling Squeezed_xenstore
[2 of 5] Compiling Squeezed_state
[3 of 5] Compiling Squeeze_xen
[4 of 5] Compiling Memory_server
[5 of 5] Compiling Squeezed
uncaught exception
Fatal error: exception Filepath.EmptyFilename
RPM build errors:
make: *** [dist/build/squeezed/squeezed] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.uAHWdV (%build)
Bad exit status from /var/tmp/rpm-tmp.uAHWdV (%build)
Child return code was: 1
EXCEPTION: Command failed. See logs for output.
# ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/squeezed.spec']
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/mockbuild/trace_decorator.py", line 70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 359, in do
raise mockbuild.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
# ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/squeezed.spec']
LEAVE do --> EXCEPTION RAISED


Thanks,
Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
On 2014-06-12, Bob Ball wrote:
>> 1) how can we add patches into XenAPI upstream and test them?
>> I noticed that buildroot project will download latest XenAPI tag
>> from github to build and package. But If I git clone latest XenAPI
>> code and change it, I don't know how to have buildroot use our updated XenAPI code.
>
> You can build a set of RPMs with local directories - I don't remember
> how to do this, but hopefully those on xs-devel will know. My
> development typically involves committing to my github repository and
> using an MD5 to reference the change in the spec files. As an example,
> I typically make changes similar to
> https://github.com/BobBall/xenserver-core/commit/ac504af29ba9deb40da6b 5
> b4a98efbb0134e9f44
>
>> We should specifically build modified XenAPI and install it to
>> replace current XenAPI on system with it? Or there are some other
>> methods to do so?
>
> That's right - build the XAPI RPM and install it on the system.
>
It looks be quite difficult to build XAPI independently. I guess you mean that we should firstly create one XAPI repo, and then modify xapi.spec in buildroot to get XAPI code from that repo created just now, so changed XAPI code can be built with buildroot, right?

>> 2) how can we replace Xen 4.2 hypervisor package with latest patched Xen?
>
> The buildroot scripts depend on a version of Xen
> (https://github.com/xenserver/buildroot/blob/master/SPECS/xenopsd.spec
> #L5 6 but see also
> https://github.com/xenserver/buildroot/blob/master/scripts/lib/mappkgname
> . py#L13 - if you need to change RPM dependencies to different versions,
> you may need to change things here). The other place I know we change a
> few things relating to Xen are
> https://github.com/xenserver/buildroot/blob/master/SOURCES/xenopsd-xc-
> init #L39.
>
> Clearly buildroot compiles against Xen headers, and it depends on
> RPM/DPKG to tell us where those are.
>
According to these link, buildroot depends on that Xen hypervisor package in current distro, and if we use latest version we need to have buildroot know where its headers are.

I tried to clone/build/install Xen master just now, after installation of buildroot. And I noticed that some 'xe' commands, like 'xe host-list' and 'xe vm-list', can work also based on latest Xen 4.5. But 'xe vm-install' sholw "no available host ...." Could you tell me how you usually verify whether XAPI work?

Thanks,
Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
On 2014-06-13, Ren, Qiaowei wrote:
> On 2014-06-12, Bob Ball wrote:
>>> 1) how can we add patches into XenAPI upstream and test them?
>>> I noticed that buildroot project will download latest XenAPI tag
>>> from github to build and package. But If I git clone latest XenAPI
>>> code and change it, I don't know how to have buildroot use our
>>> updated XenAPI
> code.
>>
>> You can build a set of RPMs with local directories - I don't
>> remember how to do this, but hopefully those on xs-devel will know.
>> My development typically involves committing to my github repository
>> and using an MD5 to reference the change in the spec files. As an
>> example, I typically make changes similar to
>>
>> https://github.com/BobBall/xenserver-core/commit/ac504af29ba9deb40da6b
>> 5 b4a98efbb0134e9f44
>>
>>> We should specifically build modified XenAPI and install it to
>>> replace current XenAPI on system with it? Or there are some other
>>> methods to do so?
>>
>> That's right - build the XAPI RPM and install it on the system.
>>
> It looks be quite difficult to build XAPI independently. I guess you
> mean that we should firstly create one XAPI repo, and then modify
> xapi.spec in buildroot to get XAPI code from that repo created just
> now, so changed XAPI code can be built with buildroot, right?
>
>>> 2) how can we replace Xen 4.2 hypervisor package with latest patched Xen?
>>
>> The buildroot scripts depend on a version of Xen
>> (https://github.com/xenserver/buildroot/blob/master/SPECS/xenopsd.sp
>> ec
>> #L5 6 but see also
>> https://github.com/xenserver/buildroot/blob/master/scripts/lib/mappk
>> gn ame . py#L13 - if you need to change RPM dependencies to
>> different versions, you may need to change things here). The other
>> place I know we change a few things relating to Xen are
>> https://github.com/xenserver/buildroot/blob/master/SOURCES/xenopsd-x
>> c-
>> init #L39.
>>
>> Clearly buildroot compiles against Xen headers, and it depends on
>> RPM/DPKG to tell us where those are.
>>
> According to these link, buildroot depends on that Xen hypervisor
> package in current distro, and if we use latest version we need to
> have buildroot know where its headers are.
>
> I tried to clone/build/install Xen master just now, after installation of buildroot.
> And I noticed that some 'xe' commands, like 'xe host-list' and 'xe
> vm-list', can work also based on latest Xen 4.5. But 'xe vm-install'
> sholw "no available host ...." Could you tell me how you usually verify whether XAPI work?
>
Bob, I have to ask for your help, and seems like that no any feedback from this maillist. :(

For question 1, I can clone XenAPI master to change it, and then compress it .tar.gz to replace that in buildroot. I notice buildroot will re-build with this updated .tar.gz. :) So I guess it will solve how to add patch to latest XenAPI and test it.

For question 2, I notice that according to SPEC files there are a lot of place where require xen- package in CentOS system, like ocaml-xen-lowlevel-libs.spec and xenopsd.spec. I don't know how to modify and have them use latest Xen master. I guess it is necessary for XenAPI to use new feature in Xen and maybe you have the way to do so. Could you tell me how to do it?

In addition, after installation of XenAPI, I built & installed latest Xen and noticed many 'xe' commands could not work, like 'xe host-enable' and 'xe vm-install'. E.g.
# xe host-enable:
The host toolstack is still initializing

# xe vm-install ....
There is no available host ...

According to the result, latest Xen looks like be not able to work with XenAPI, right?

Thanks,
Qiaowei


_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Intel CQM feature enabling in XenAPI [ In reply to ]
Hi Qiaowei,

> For question 1, I can clone XenAPI master to change it, and then compress it
> .tar.gz to replace that in buildroot. I notice buildroot will re-build with this
> updated .tar.gz. :) So I guess it will solve how to add patch to latest XenAPI
> and test it.

That's a good way to do it. There is some syntax you can use but I'm not sure what it is...

> For question 2, I notice that according to SPEC files there are a lot of place
> where require xen- package in CentOS system, like ocaml-xen-lowlevel-
> libs.spec and xenopsd.spec. I don't know how to modify and have them use
> latest Xen master. I guess it is necessary for XenAPI to use new feature in
> Xen and maybe you have the way to do so. Could you tell me how to do it?

Everything is based on the packages so you'll need to build the RPMs for Xen, install them, then rebuild and the right versions of the packages will be picked up.
You may need to change the other areas I put in the previous mail, depending if paths or versions have changed:
---
The buildroot scripts depend on a version of Xen (https://github.com/xenserver/buildroot/blob/master/SPECS/xenopsd.spec#L56 but see also https://github.com/xenserver/buildroot/blob/master/scripts/lib/mappkgname.py#L13 - if you need to change RPM dependencies to different versions, you may need to change things here). The other place I know we change a few things relating to Xen are https://github.com/xenserver/buildroot/blob/master/SOURCES/xenopsd-xc-init#L39.
---

> # xe host-enable:
> The host toolstack is still initializing

There might be lots of reasons for this - try "message-cli diagnostics" to see if there are any services not running.
We've seen some cases of xenopsd-xc not starting which can easily cause this, but the fixes for that went in in the last few days so a re-compile could resolve that.

Bob

_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api