Errol Neal
2013-Feb-06 17:51 UTC
[XCP] recompiling xapi rpm changes version and licensing details.
Hi there. I needed to recompile xapi to fix a bug that was resolved regarding vdi-create not setting the sharable flag. I used the sources provided in the source-1.iso from xen.org. Everything is good in this regard, and creating a vdi that has "sharable=true" is possible, but I had a problem that forced me to revert to the older copy of the xapi binary because my XCP box was now being identified as a XenServer box. Here''s a screen shot: http://picpaste.com/pics/xapi-Dyfq5vhO.1360171933.jpg The actual problem happened on a real host pool member that I had installed the new RPMs. As I mentioned, I had to revert back to a backup copy of the xapi binary because I could not start any of my VMs on that host. The error from xe was: There are no suitable hosts to start this VM on. The following table provides per-host reasons for why the VM could not be starte d: DCSC-XEN03 : Cannot start here [Not enough free memory] DCSC-XEN01: Cannot start here [Api_errors.Server_error("VM_HOST_INCOMPATIBLE_VERSION", _)] My question is how do I go about modifying the version and platform information for XAPI? My xensource-inventory file looks fine: BUILD_NUMBER=''61809c'' SOFTWARE_VERSION=''1.6.10'' DOM0_MEM=''752'' MANAGEMENT_INTERFACE=''xenbr0'' INSTALLATION_UUID=''718e7db1-cf3d-46ea-bcc9-cee8c456ed4d'' COMPANY_NAME_SHORT=''xen.org'' PLATFORM_NAME=''XCP'' PLATFORM_VERSION=''1.6.10'' KERNEL_VERSION=''2.6.32.43-0.4.1.xs1.6.10.734.170748xen'' BRAND_CONSOLE=''a console'' COMPANY_NAME=''xen.org'' XEN_VERSION=''4.1.3'' PRIMARY_DISK=''/dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001'' CONTROL_DOMAIN_UUID=''969c742c-9b46-46ca-85d1-7f7eb249d913'' MANAGEMENT_ADDRESS_TYPE=''IPv4'' BACKUP_PARTITION=''/dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001-part2'' PRODUCT_VERSION=''XCP'' INSTALLATION_DATE=''2013-02-05 13:50:23.445194'' It is almost as if the new xapi binary doesn''t care about xensource-inventory?
Mike McClurg
2013-Feb-06 19:17 UTC
Re: [Xen-users] [XCP] recompiling xapi rpm changes version and licensing details.
On 06/02/13 17:51, Errol Neal wrote:> Hi there. I needed to recompile xapi to fix a bug that was resolved regarding vdi-create not setting the sharable flag. I used the sources provided in the source-1.iso from xen.org. Everything is good in this regard, and creating a vdi that has "sharable=true" is possible, but I had a problem that forced me to revert to the older copy of the xapi binary because my XCP box was now being identified as a XenServer box.Hi Errol, Our build system uses environment variables to inject the PLATFORM_NAME and PLATFORM_VERSION into the RPM. (See the Makefile snippet below). Before you do rpmbuild, you should do: export PLATFORM_NAME=XCP export PLATFORM_VERSION=1.6.10 You may also want to export a BUILD_NUMBER, but I don''t think that this is used for anything so you can probably ignore it. Mike The interesting bit from Xapi''s Makefile: .PHONY: version version: @printf "(* This file is autogenerated. Grep for e17512ce-ba7c-11df-887b-0026b9799147 (random uuid) to see where it comes from. ;o) *) \n \ let git_id = \"$(shell git show-ref --head | grep -E '' HEAD$$'' | cut -f 1 -d '' '')\" \n \ let hostname = \"$(shell hostname)\" \n \ let date = \"$(shell date -u +%Y-%m-%d)\" \n \ let product_version = Util_inventory.lookup ~default:\"\" \"PRODUCT_VERSION\" \n \ let product_version_text = Util_inventory.lookup ~default:\"\" \"PRODUCT_VERSION_TEXT\" \n \ let product_version_text_short = Util_inventory.lookup ~default:\"\" \"PRODUCT_VERSION_TEXT_SHORT\" \n \ let platform_name = \"$(PLATFORM_NAME)\" \n \ let platform_version = \"$(PLATFORM_VERSION)\" \n \ let product_brand = Util_inventory.lookup ~default:\"\" \"PRODUCT_BRAND\" \n \ let build_number = Util_inventory.lookup ~default:\"$(BUILD_NUMBER)\" \"BUILD_NUMBER\" \n \ let xapi_version_major = $(shell cut -d. -f1 VERSION) \n \ let xapi_version_minor = $(shell cut -d. -f2 VERSION) \n" \ > ocaml/util/version.ml
Errol Neal
2013-Feb-06 20:18 UTC
Re: [Xen-users] [XCP] recompiling xapi rpm changes version and licensing details.
On Wed, 02/06/2013 02:17 PM, Mike McClurg <mike.mcclurg-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org> wrote:> On 06/02/13 17:51, Errol Neal wrote: > > Hi there. I needed to recompile xapi to fix a bug that was resolved regarding vdi-create not setting the sharable flag. I used the sources provided in the source-1.iso from xen.org. Everything is good in this regard, and creating a vdi that has "sharable=true" is possible, but I had a problem that forced me to revert to the older copy of the xapi binary because my XCP box was now being identified as a XenServer box. > > Hi Errol, > > Our build system uses environment variables to inject the PLATFORM_NAME > and PLATFORM_VERSION into the RPM. (See the Makefile snippet below). > Before you do rpmbuild, you should do: > > export PLATFORM_NAME=XCP > export PLATFORM_VERSION=1.6.10 >Jackpot! Thanks a ton!