[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#704148: marked as done (Pre-approved unblock: xen-api/1.3.2-15)



Your message dated Tue, 16 Apr 2013 19:04:51 +0100
with message-id <1366135491.27862.4.camel@jacala.jungle.funky-badger.org>
and subject line Re: Bug#704148: Pre-approved unblock: xen-api/1.3.2-15
has caused the Debian Bug report #704148,
regarding Pre-approved unblock: xen-api/1.3.2-15
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
704148: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704148
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Hi,

I well understand that we are really so close form the release, that
the rules for fixing bugs in Wheezy are tight. However, I really would
like to fix #695221 and add some corrections to the README.Debian.

The fix for #695221 is comming from upstream, and is a 2 lines patch,
so probably, that is acceptable in the view of the release team, even
at this point of the release.

The rest of the changes are only in the README.Debian, which has been
reviewed by upstream (eg: someone from Citrix working on XAPI).

The diff is attached. Please let me know if I can upload xen-api/1.3.2-15
in SID, and later ask for the unblock, or if the release team prefers
that I wait after the release, through wheezy-proposed-updates.

Cheers,

Thomas Goirand (zigo)
diff -Nru xen-api-1.3.2/debian/changelog xen-api-1.3.2/debian/changelog
--- xen-api-1.3.2/debian/changelog	2012-12-27 13:18:26.000000000 +0000
+++ xen-api-1.3.2/debian/changelog	2013-03-28 16:09:39.000000000 +0000
@@ -1,3 +1,11 @@
+xen-api (1.3.2-15) unstable; urgency=low
+
+  * Fixes xe pif-reconfigure-ip with a netmask smaller than /24, thanks to
+    Marc Lebel & Daniel Pocock for reporting (Closes: #695221).
+  * Lots of fixes in the README.Debian (Closes: #702337).
+
+ -- Thomas Goirand <zigo@debian.org>  Sat, 23 Mar 2013 04:45:10 +0800
+
 xen-api (1.3.2-14) unstable; urgency=low
 
   * Fixes: if apt-get was used to install xcp-networkd instead of dpkg -i, then
diff -Nru xen-api-1.3.2/debian/patches/fix-logic-in-netmask_to_prefixlen.patch xen-api-1.3.2/debian/patches/fix-logic-in-netmask_to_prefixlen.patch
--- xen-api-1.3.2/debian/patches/fix-logic-in-netmask_to_prefixlen.patch	1970-01-01 00:00:00.000000000 +0000
+++ xen-api-1.3.2/debian/patches/fix-logic-in-netmask_to_prefixlen.patch	2013-03-28 16:09:39.000000000 +0000
@@ -0,0 +1,20 @@
+Description: CA-72709: Fix logic in netmask_to_prefixlen 
+ This bug caused the wrong netmask to be set for static IP configuration, in
+ some cases.
+Origin: upstream, https://github.com/xen-org/xen-api/commit/abed1d6321a9f56822e5c7a5ce3b183e25c90bb9
+Author: Rob Hoes <rob.hoes@citrix.com>
+Bug-Debian: http://bugs.debian.org/695221
+Last-Update: 2013-03-23
+
+--- xen-api-1.3.2.orig/ocaml/xapi/nm.ml
++++ xen-api-1.3.2/ocaml/xapi/nm.ml
+@@ -63,7 +63,8 @@ let netmask_to_prefixlen netmask =
+ 			else
+ 				l
+ 		in
+-		List.fold_left length 0 [a; b; c; d]
++		let masks = List.map ((-) 255) [a; b; c; d] in
++		32 - (List.fold_left length 0 masks)
+ 	)
+ 
+ let determine_mtu ~__context pif_rc bridge =
diff -Nru xen-api-1.3.2/debian/patches/series xen-api-1.3.2/debian/patches/series
--- xen-api-1.3.2/debian/patches/series	2012-12-27 13:18:26.000000000 +0000
+++ xen-api-1.3.2/debian/patches/series	2013-03-28 16:09:39.000000000 +0000
@@ -41,3 +41,4 @@
 Fixes-bashism-in-ocaml-rt-install-debian-pv.sh.patch
 Fixes-bashism-in-interface-visualise.patch
 fixes-set-hostname-was-designed-for-centos.patch
+fix-logic-in-netmask_to_prefixlen.patch
diff -Nru xen-api-1.3.2/debian/README.Debian xen-api-1.3.2/debian/README.Debian
--- xen-api-1.3.2/debian/README.Debian	2012-12-27 13:18:26.000000000 +0000
+++ xen-api-1.3.2/debian/README.Debian	2013-03-28 16:09:39.000000000 +0000
@@ -1,21 +1,51 @@
-xen-api for Debian author's notes
----------------------------------
+XCP-XAPI for Debian author's notes
+----------------------------------
 
 This is the XCP toolstack ported to Debian. Installing these packages will turn
 a Debian system into an XCP virtualization host. While we aim to be
 functionally equivalent to a standard XCP system, not all features are
-currently ported to Debian. Noteably, block-based storage repositories have
-been disabled.
+currently ported to Debian.
 
  -- Jon Ludlam <jonathan.ludlam@eu.citrix.com>  Thu, 07 Jul 2011 21:50:18 +0100
 
+Deciding whether to use XCP - XAPI
+----------------------------------
+
+XCP-XAPI has a rigid structure.  If you install and use this
+virtualisation suite, it must completely take over your physical machine
+in various ways.
+
+In particular, you should be aware of the following:
+
+* xcp-networkd manages your host network.  You can no longer set
+  IP addresses and routing using other mechanisms such as
+  /etc/network/interfaces.  xcp-networkd doesn't support all the
+  things you may implement in a normal host.
+* The storage system wants your raw disks.  It does NOT use your
+  existing LVM PV or VG, rather, it needs to create it's own PV,
+  VG and LVs on demand.  If you do tell it to work within an LV
+  that you have created, it will use the LV as a PV, and
+  you will end up with a nested VG.
+
+That said, you still have significant discretion to customise
+the dom0 environment in some ways, just keep away from the
+things that the XCP infrastructure wants to control.
+
+If you don't like this approach and want fine grained control of
+network addresses, bridging and firewalling, consider using the 
+XL toolstack instead of XCP.
+
+On the other hand, the benefit of this rigidity is that you
+can quickly build a system that supports scaling, XenMotion and other
+enterprise paradigms.
+
 Quick setup and howto
 ---------------------
-0/ Important nodes
+0/ Important notes
 ------------------
 In this howto, we will pretend that you'll be setting-up a server called
-node1234 with IP address 12.34.56.78. Obviously, the reader will adapt and replace
-these values to match his own configuration.
+node1234 with IP address 12.34.56.78. Obviously, the reader will adapt and
+replace these values to match his own configuration.
 
 Before we start, remember that many "xe" commands are simply outputing a UUID
 uppon success. This UUID can later be used as a unique reference for the object
@@ -24,20 +54,21 @@
 a virtual machine network interface, a storage repository, an iso image, etc.
 
 When we write:
-network=$(xe network-list bridge=xenbr0 --minimal)
+NETWORK=$(xe network-list bridge=xenbr0 --minimal)
 
-that means we want the $network shell script variable to contain the UUID of
+that means we want the $NETWORK shell script variable to contain the UUID of
 the network attached to our xenbr0, but you could also type:
+
 xe network-list bridge=xenbr0
 
 and copy/paste the information somewhere for later use as well.
 
-1/ Install Debian squeeze
--------------------------
-Make sure you use LVM, and leave enough free space on the VG to be able to host
-VMs. What I use is a 2GB RAID1 rootfs on 2 disks, then a 990 GB RAID10 array on
-which I have LVM as a host for swap (1GB), usr (8 to 16 GB), var (the amount of
-RAM + 4GB), tmp (1GB).
+1/ Install Debian Wheezy
+------------------------
+Install Debian Wheezy on your machine. Make sure you use LVM, and leave enough
+free space on the VG to be able to host VMs. What I use is a 2GB RAID1 rootfs
+on 2 disks, then a 990 GB RAID10 array on which I have LVM as a host for swap
+(1GB), usr (8 to 16 GB), var (the amount of RAM + 4GB), tmp (1GB).
 
 Important note: For performance reasons, it is recommended to use a 32 bits
 dom0 kernel (with of course a 32 bits userland OS), and a 64 bits hypervisor
@@ -47,14 +78,9 @@
 Also, make sure you install the 686-bigmem (otherwised called as -pae in SID),
 if you want your dom0 to be able to run on more than 1GB.
 
-2/ Upgrade to SID or testing
-----------------------------
-XCP is currently only in SID (not even in Wheezy yet as of writing, but it
-should soon migrate).
-
-3/ Install Xen and XCP
+2/ Install Xen and XCP
 ----------------------
-3.1/ Installing XCP itself.
+2.1/ Installing XCP itself.
 You can just do:
 
 apt-get install xcp-xapi
@@ -65,17 +91,23 @@
 apt-get install xcp-xapi xcp-vncterm xcp-guest-templates \
     linux-headers-686-pae bridge-utils qemu-keymaps qemu-utils libc6-xen
 
-3.2/ Samba or NFS
+2.2/ Set default Toolstack
+Switch to using xapi instead of xm or xend to control Xen, you do that with the
+following:
+
+sed -i "s/TOOLSTACK=.*/TOOLSTACK=xapi/" /etc/default/xen
+
+2.3/ Samba or NFS
 With XCP you can boot guests on iso images. To do that, you will need to use
 special iso SR (XCP uses Storage Repositories, or SR), for iso images. The .iso
 images can be stored either using NFS or Samba. So you should install support
 for one of them if you plan booting on iso images. Note that you can still
-install Debian guests without using an iso SR. Anyway, for Samba, you will need
-to do:
+install Debian guests without using an iso SR.
 
 apt-get install cifs-utils
 
-The following samba config will serve these images in the folder /iso-images:
+Applyling the following samba configuration in /etc/samba/smb.conf will serve
+these images in the folder /iso-images:
 
 [isoimg]
         comment = XCP iso image SR
@@ -85,7 +117,7 @@
         browseable = yes
         guest ok = yes
 
-3.3/ Bash completion
+2.4/ Bash completion
 Since you'll be using xe, I would highly recommend that you install
 bash-completion as well. The xcp-xe package contains a
 /etc/bash_completion.d/xe file with all the commands. So do:
@@ -95,45 +127,43 @@
 and uncomment the use of it in /etc/bash.bashrc so that everyone in the
 system may use completion.
 
-4/ Configuring Xen and XCP
---------------------------
-4.1/ Switch using xapi instead of xm and xend to control Xen
-As of writing, you should do that:
-sed -i "s/TOOLSTACK=.*/TOOLSTACK=xapi/" /etc/default/xen
+2.5/ Reboot
+Reboot and choose XEN 4.1-amd64 in the grub menu. To ensure Xen is running you
+can do the following:
+
+cat /proc/xen/capabilities
+
+If everything is working correctly this should output "control_d". To check if
+xapi is running:
+
+/etc/init.d/xcp-xapi status
+
+This should output "[ ok ] xapi is running.".
 
-It is later planned to change this in Debian with 3 switches: xm, xl and xe.
-Since this is not yet implemented, please refer to the /etc/default/xen
-file for an eventual explanation.
-
-4.2/ Configure network to use a bridge xenbr0
-The following will convert a static IP configuration on eth0 to a bridged
-physical interface using xenbr0:
-sed -i "s/allow-hotplug eth0/auto xenbr0/" /etc/network/interfaces
-sed -i "s/iface eth0/iface xenbr0/"/etc/network/interfaces
-echo "  bridge_ports eth0" >>/etc/network/interfaces
+3/ Configuring Xen and XCP
+--------------------------
+3.1/ Configure network to use a bridge xenbr0
 
-In other words, the following /etc/network/interfaces would do:
+You need to deliberately clobber your interfaces file like so:
 
+cp -n /etc/network/interfaces /etc/network/interfaces.bak-xcp
+cat > /etc/network/interfaces << EOF
 auto lo
 iface lo inet loopback
+EOF
 
-auto xenbr0
-iface xenbr0 inet static
-        bridge_ports eth0
-        address 12.34.56.78
-        netmask 255.255.255.0
-        network 12.34.56.0
-        broadcast 12.34.56.255
-        gateway 12.34.56.1
+Note that you will need to be running Xen and have xe as your TOOLSTACK (see
+2.2) to be able to execute xe and configure your network:
 
-If you are using DHCP, then this will fit you:
-auto lo xenbr0
-iface lo inet loopback
+PIF_UUID=$(xe pif-list device=eth0 --minimal)
+xe pif-reconfigure-ip mode=static DNS=1.2.3.4 \
+	ip=12.34.56.78 netmask=255.255.255.0 gateway=12.34.56.1 \
+	uuid=$PIF_UUID
 
-iface eth0 inet manual
+Note that it will survive reboots. If you use dhcp, then simply use:
 
-iface xenbr0 inet dhcp
-        bridge_ports eth0
+PIF_UUID=$(xe pif-list device=eth0)
+xe pif-reconfigure-ip uuid=$PIF_UUID mode=dhcp
 
 Note that if you are using openvswitch together with XCP, and the xcp-networkd
 daemon, it is overly important that you do setup your xenbr0 as per above,
@@ -144,19 +174,7 @@
 
 If you intend to run XCP using Open vSwitch (that is, if your
 /etc/xcp/network.conf contains "openvswitch" and not "bridge), then you should
-tell XCP about your network configuration:
-
-PIF_UUID=`xe pif-list device=eth0 --minimal`
-xe pif-reconfigure-ip uuid=$PIF_UUID mode=static \
-	IP=1.2.3.4 netmask=255.255.255.0 gateway=1.2.3.1
-
-Note that it will survive reboots. If you use dhcp, then simply use:
-
-PIF_UUID=`xe pif-list device=eth0`
-xe pif-reconfigure-ip uuid=$PIF_UUID mode=dhcp
-
-Note that you will need to be running Xen and have xe as your TOOLSTACK (see
-below) to be able to execute xe and configure your network.
+tell XCP about your network configuration.
 
 If you want xe to listen on the public IP address, you will need to have your
 MANAGEMENT_INTERFACE variable set as the default bridge interface in the
@@ -169,19 +187,18 @@
 MANAGEMENT_INTERFACE='xenbr0'
 INSTALLATION_UUID='7f4f3149-2e9d-7bb5-bb99-fd51420a8cd6'
 
-4.3/ Set Xen as default in GRUB
-Hackish way:
-cd /etc/grub.d
-mv 10_linux 25_linux
+3.2/ Set Xen as default in GRUB
+Using deb package to move xen to boot first:
 
-Or using a more definitive way:
 dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
 
-Then set reasonable defaults for the dom0 RAM, and boot only from Xen:
+3.3/ Set dom0 Defaults
+Set reasonable defaults in /etc/default/grub for the dom0 RAM and Virtual
+Central Processing Units, and boot only from Xen:
 
 echo "
-# Start dom0 with less RAM
-GRUB_CMDLINE_XEN_DEFAULT=\"dom0_mem=1024M\"
+# Start dom0 with 1024 MB of RAM
+GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=1024M,max:1024M"
 
 # Disable OS prober to prevent virtual machines on logical volumes from
 # appearing in the boot menu.
@@ -191,36 +208,38 @@
 update-grub2 or dpkg-reconfigure grub-pc (the later is needed to check that
 you've installed Grub on both MBR of your freshly installed Debian anyway).
 
-4.4/ Reboot (under Xen)
-Since you've just configure to run under Xen and with the correct $TOOLSTACK
-above, you should be booting under the correct environment.
-
-5/ Setting-up storage repositories (SRs)
-5.1/ VM SR
+4/ Setting-up storage repositories (SRs)
+4.1/ VM SR
 For your virtual machines, XCP uses storage repositories. To create a new
 one, you need a big block device on your server. For example, if you use
 LVM, you could do something like that to create it:
-lvcreate -L500G -nsr0 node1234vg0
+
+lvcreate -L500G -n <name> <volume group>
 
 to create a 500 GB LVM, then tell XCP to use it:
-xe sr-create type=ext name-label=node1234sr0 \
-   device-config:device=/dev/mapper/node1234vg0-sr0
+
+xe sr-create type=ext name-label=<volume group> \
+   device-config:device=/dev/mapper/<volume group>-<name>
 
 By default, this will print the new UUID of the SR, but you can also get it
 with:
-SR=`xe sr-list type=ext --minimal`
+
+xe sr-list type=ext --minimal
 
 You should then attach it as the default for the pool of storage for XCP:
-pool=`xe pool-list --minimal`
-xe pool-param-set uuid=$pool default-SR=$SR
+
+SR=`xe sr-list type=ext --minimal`
+POOL=`xe pool-list --minimal`
+xe pool-param-set uuid=$POOL default-SR=$SR
 
 If later, you want to use that SR with openstack, you should also do:
+
 xe sr-param-set uuid=$SR other-config:i18n-key=local-storage
 
 this will, by default, use mkfs.ext3, so expect it to take some time
 if you gave xe sr-create a big partition.
 
-5.2/ ISO SR using samba
+4.2/ ISO SR using samba
 If you have some ISO images that you want to use in your VMs, then you
 should export them through NFS or a samba share, then do as below for
 samba:
@@ -231,6 +250,7 @@
 right?).
 
 as like this for NFS:
+
 xe-mount-iso-sr nfs-server:/path/to/isos
 
 Once you've done that, you will be able to do:
@@ -247,21 +267,26 @@
 or
 apt-get install nfs-common
 
-6/ Using XCP: let the fun begins
+5/ Using XCP: let the fun begins
 --------------------------------
-6.1/ Choosing a template
+5.1/ Choosing a template
 Now that you have XCP up and running on your server, let's play and setup some
-virtual machines.
+virtual machines. You can list available VM templates with:
+
+xe template-list
+
+once you've done your choice, you will need to do something like this:
 
-You can list available VM templates with "xe template-list", once you've done
-your choice, you will need to do something like this:
-template=$(xe template-list name-label="Debian Squeeze 6.0 (32-bit)" --minimal)
+TEMPLATE=$(xe template-list name-label="Debian Wheezy 7.0 (32-bit)" --minimal)
 
 Creating a VM instance may be done using:
-vm=$(xe vm-install template=$template new-name-label=debian)
+
+VM=$(xe vm-install template=$template new-name-label=debian)
 
 Note that if you have installed bash completion, then you can do:
+
 xe vm-install template=[ TAB ]
+
 to show the list of templates. You could use both a real template name, or
 its UUID.
 
@@ -269,62 +294,80 @@
 way so you don't have to worry about them (eg: if your VM needs hardware
 virtualization, for example, or if we should use pygrub, etc.).
 
-6.2/ Configuration for our VM before it starts
+5.2/ Configuration for our VM before it starts
 Get the UID of your xenbr0 network to use it when creating the vif below:
-network=$(xe network-list bridge=xenbr0 --minimal)
+
+NETWORK=$(xe network-list bridge=xenbr0 --minimal)
 
 And use it to attach a new virtual network interface to your VM:
-vif=$(xe vif-create vm-uuid=$vm network-uuid=$network device=0)
+
+VIF=$(xe vif-create vm-uuid=$vm network-uuid=$NETWORK device=0)
 
 Tell the VM that we want to boot using a debian repo:
+
 xe vm-param-set uuid=$vm \
    other-config:install-repository=http://ftp.uk.debian.org/debian
 
 Let's say you wanted to use an iso image rather than the ftp repository,
 which image would be in your iso SR (see above), then you could have done
 this way:
-xe vm-cd-add vm=windows cd-name=squeeze.iso device=3
+
+xe vm-cd-add vm=windows cd-name=wheezy.iso device=3
 
 Before you start it, you can set its memory to 1GB:
+
 xe vm-memory-limits-set static-min=1024MiB static-max=1024MiB \
    dynamic-min=1024MiB dynamic-max=1024MiB \
-   vm=$vm
+   vm=$VM
 
 If you want to resize the HDD of a VM, you should first get the UUID
 of its VDI:
 
-xe vm-disk-list vm=$vm
+xe vm-disk-list vm=$VM
 
 Then resize its VDI:
 
 xe vdi-resize uuid=<UUID-OF-THE-VDI> disk-size=10GiB
 
-6.3/ Cloning the newly created VM
+5.3/ Cloning the newly created VM
 Since we've done quite some work, it could be possible to clone our virtual
 machine to later do another install:
-xe vm-clone new-name-label=squeeze-32-bits-1024mb vm=$vm
 
-6.4/ Life and death of a VM
+xe vm-clone new-name-label=wheezy-32-bits-1024mb vm=$VM
+
+5.4/ Life and death of a VM
 Finally start the VM:
-xe vm-start uuid=$vm
+
+xe vm-start uuid=$VM
 
 And access its console:
-xe console vm=$vm
+
+xe console vm=$VM
 
 When you're done with the VM, you can do:
-xe vm-shutdown uuid=$vm
+
+xe vm-shutdown uuid=$VM
 
 And if you want to completely get rid of the VM, we do:
-xe vm-destroy uuid=$vm
 
-7/ Pool of servers
+xe vm-destroy uuid=$VM
+
+5.5/ Acces to VM console
+For more information on the different options to acces your VM console:
+
+http://wiki.xen.org/wiki/Xen_Cloud_Platform:_Access_to_VM_console
+
+6/ Pool of servers
 ------------------
 If you want to add a new machine in the pool, then:
+
 xe pool-join master-address=<ip-of-your-other-dom0> \
    master-username=<username> master-password=<pass>
 
-8/ XCP with Openstack
+7/ XCP with Openstack
 ---------------------
+There's a (currently unfinished) howto available in the nova-xcp-plugins
+package.
 
 999/ Feedback
 -------------

--- End Message ---
--- Begin Message ---
On Wed, 2013-04-17 at 01:48 +0800, Thomas Goirand wrote:
> On 04/13/2013 11:37 PM, Adam D. Barratt wrote:
> > On Fri, 2013-03-29 at 00:19 +0800, Thomas Goirand wrote:
> >> I well understand that we are really so close form the release, that
> >> the rules for fixing bugs in Wheezy are tight. However, I really would
> >> like to fix #695221 and add some corrections to the README.Debian.
> > 
> > I'm a little dubious from reading through the bug log for #695221 as to
> > whether it's a particular issue or not. However, if the upload occurred
> > soon (ideally this weekend) I'd be prepared to accept it on the basis
> > that shipping wheezy with packages documenting functionality in a way
> > that only applies correctly to squeeze is not in our best interests.
[...]
> I've just uploaded 1.3.2-15.

Unblocked.

Regards,

Adam

--- End Message ---

Reply to: