Bug#610457: bug: xen-tools - apt-setup for lucid ignores --mirror

2011-03-31 Thread Alex Tomlins

 I don't like the inheritance of the dom0 apt settings as they are
 correct only if the target VM is of the same type as dom0. IOW, using a
 debian dom0's apt setup to build an ubuntu VM is probably wrong as the
 mirror/proxy could be different.
 Leaving it as a cmdline arg would be preferable IMHO.

An alternative approach would be to be able to specify an apt proxy 
server within xen-tools.  This would then be used by debootstrap and by 
the guest system.


Some of my custom role scripts involve adding custom apt repositories, 
so this has the advantage of using the proxy for all of them as well.


I've implemented this here:  
https://gitorious.org/~alext/xen-tools/alext-xen-tools/commits/apt_proxy


thanks,
Alex
--
Alex Tomlins
Unboxed
Consulting

E: 	alex.toml...@unboxedconsulting.com 
mailto:alex.toml...@unboxedconsulting.com

M:  +44 7824 696 890
T:  +44 20 3137 2930
F:  +44 20 7183 4251


17 Blossom Street
London, E1 6PL
United Kingdom
www.unboxedconsulting.com http://www.unboxedconsulting.com




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#610457: bug: xen-tools - apt-setup for lucid ignores --mirror

2011-03-31 Thread Axel Beckert
Hi Alex,

Alex Tomlins wrote:
  I don't like the inheritance of the dom0 apt settings as they are
  correct only if the target VM is of the same type as dom0. IOW, using a
  debian dom0's apt setup to build an ubuntu VM is probably wrong as the
  mirror/proxy could be different.
  Leaving it as a cmdline arg would be preferable IMHO.

 An alternative approach would be to be able to specify an apt proxy  
 server within xen-tools.

That would be helpful in some situations anyway, and it would be a
workaround around the problem described in this bug. But I regard it
only as workaround, not as solution.

 I've implemented this here:   
 https://gitorious.org/~alext/xen-tools/alext-xen-tools/commits/apt_proxy

Thanks!

From a first glance it looks good and I'll probably include your
patches. I'd though change two things: 

* Change the option's name from apt_proxy to apt-proxy.
* Instead of prepending the environment variable to some command, I'd
  prefer to use $ENV{http_proxy}, etc.

Anyway, thanks for the patches. Will pull them at least for the next
major release.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert a...@debian.org, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-|  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#610457: bug: xen-tools - apt-setup for lucid ignores --mirror

2011-03-31 Thread Alex Tomlins

On 31/03/11 13:33, Axel Beckert wrote:

Hi Alex,

Alex Tomlins wrote:

I don't like the inheritance of the dom0 apt settings as they are
correct only if the target VM is of the same type as dom0. IOW, using a
debian dom0's apt setup to build an ubuntu VM is probably wrong as the
mirror/proxy could be different.
Leaving it as a cmdline arg would be preferable IMHO.

An alternative approach would be to be able to specify an apt proxy
server within xen-tools.

That would be helpful in some situations anyway, and it would be a
workaround around the problem described in this bug. But I regard it
only as workaround, not as solution.


I've implemented this here:
https://gitorious.org/~alext/xen-tools/alext-xen-tools/commits/apt_proxy

Thanks!

 From a first glance it looks good and I'll probably include your
patches. I'd though change two things:

* Change the option's name from apt_proxy to apt-proxy.
Makes sense.  I wasn't sure which way to go as the existing options seem 
to use a mixture.  I'll change it and push the change up into that branch.

* Instead of prepending the environment variable to some command, I'd
   prefer to use $ENV{http_proxy}, etc.
I was mostly being cautious there to make sure it didn't effect anything 
else (as the proxy is typically an apt-cacher type proxy, and not a 
general http proxy).  Having had a closer look, I can't see it effecting 
anything else, so I'll push that change up as well

Anyway, thanks for the patches. Will pull them at least for the next
major release.


That would be great,

thanks,
Alex

--
Alex Tomlins
Unboxed
Consulting

E: 	alex.toml...@unboxedconsulting.com 
mailto:alex.toml...@unboxedconsulting.com

M:  +44 7824 696 890
T:  +44 20 3137 2930
F:  +44 20 7183 4251


17 Blossom Street
London, E1 6PL
United Kingdom
www.unboxedconsulting.com http://www.unboxedconsulting.com




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#610457: bug: xen-tools - apt-setup for lucid ignores --mirror

2011-03-31 Thread Axel Beckert
Hi Alex,

Alex Tomlins wrote:
 I've implemented this here:
 https://gitorious.org/~alext/xen-tools/alext-xen-tools/commits/apt_proxy
 Thanks!

  From a first glance it looks good and I'll probably include your
 patches. I'd though change two things:

 * Change the option's name from apt_proxy to apt-proxy.
 Makes sense.  I wasn't sure which way to go as the existing options seem  
 to use a mixture.

Well, yeah, historically grown. But I'd prefer to not have underscores
in long options. Maybe we'll once change all of them to dashes, but
supoort underscores for backwards-compatibility.

 * Instead of prepending the environment variable to some command, I'd
prefer to use $ENV{http_proxy}, etc.
 I was mostly being cautious there to make sure it didn't effect anything  
 else (as the proxy is typically an apt-cacher type proxy, and not a  
 general http proxy).

Yeah, and for using $ENV{http_proxy} the opposite was the reason. I
thought it would be good if then anything uses the proxy in general.

But maybe it would be also good to distinguish between 

1) proxy setting for the installation (which happens on the Dom0)
2) proxy setting for the DomU (after installation)
3) all other things (if there are any)

 Having had a closer look, I can't see it effecting  
 anything else, so I'll push that change up as well

Your arguments made think a little bit more about this issue. Not sure
though, what's the best way to handle it.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert a...@debian.org, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-|  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#610457: bug: xen-tools - apt-setup for lucid ignores --mirror option

2011-01-18 Thread Bruce Edge

Package: xen-tools
Status: install ok installed

Priority: extra
Section: utils
Installed-Size: 1236
Maintainer: Axel Beckerta...@debian.org
Architecture: all
Version: 4.2-1
Depends: debootstrap | cdebootstrap, perl-modules,
libtext-template-perl, libconfig-inifiles-perl, libfile-slurp-perl
Recommends: xen-hypervisor-amd64 | xen-hypervisor-i386 |
xen-hypervisor-i386-pae, rinse, xen-shell, libexpect-perl
Suggests: reiserfsprogs, xfsprogs, xen-utils, cfengine2, evms-cli,
btrfs-tools
Conffiles:
  /etc/bash_completion.d/xen-tools 40ed60f9a42fe73f9e7871def615a77d
  /etc/xen-tools/role.d/minimal 262764109cc91b4d6c15e2f5e551331d
  /etc/xen-tools/role.d/xdm c9302bb3afb47f6f5d2144c60f3757ba
  /etc/xen-tools/role.d/udev 3f674cb69bd31ad063c219a5ec4167a0
  /etc/xen-tools/role.d/gdm 60de853a2abc2ae98d6e67a1c9dcbfbe
  /etc/xen-tools/role.d/tmpfs aa4dac703c6bad282636be62435d4513
  /etc/xen-tools/role.d/resolv a987f68c3bcb813b160a38aecda71b2c
  /etc/xen-tools/role.d/sudoers 31aae40d2f208fc836e030568df93dd7
  /etc/xen-tools/role.d/puppet 825ca297ca0416a0232b23777d2b214c
  /etc/xen-tools/role.d/editor a40d8b9cf9e23e6dcfd23a405459e09b
  /etc/xen-tools/role.d/builder 872c8949ff9485eb8f8090b611e98078
  /etc/xen-tools/role.d/README f240c5112fbf4fa0124c93948ce56b86
  /etc/xen-tools/role.d/cfengine 7094def4a7f2465485b9cf3a5bdab83a
  /etc/xen-tools/xm.tmpl 5b4411441bdd7c997ecfb0de79b7707b
  /etc/xen-tools/xen-tools.conf c6947176f76f64e200844343654f7768
  /etc/xen-tools/xm-nfs.tmpl bd0d9cd416bb9359cd61a377edb31e6b
  /etc/xen-tools/partitions.d/sample-server caf627e771ecc532622df7691977e56d
Description: Tools to manage Xen virtual servers
  This package contains tools to manage Debian based Xen virtual servers.
  .
  Using the scripts you can easily create fully configured Xen guest
  domains (DomU) which can be listed, updated, or copied easily.
  .
  xen-tools currently can install:
  .
* Debian 3.1 Sarge (i386 only)
* Debian 4.0 Etch
* Debian 5.0 Lenny
* Debian 6.0 Squeeze
* Debian Sid (Unstable)
* Ubuntu 6.06 Dapper Drake (LTS)
* Ubuntu 6.10 Edgy Eft
* Ubuntu 7.04 Feisty Fawn
* Ubuntu 7.10 Gutsy Gibbon
* Ubuntu 8.04 Hardy Heron (LTS)
* Ubuntu 8.10 Intrepid Ibex
* Ubuntu 9.04 Jaunty Jackaplope
* Ubuntu 9.10 Karmic Koala
* Ubuntu 10.04 Lucid Lynx (LTS)
* Ubuntu 10.10 Maverick Meerkat
Homepage: http://xen-tools.org/software/xen-tools

When creating a lucid VM with the command line

/usr/bin/xen-create-image --hostname lucid-build --mac=00:90:66:00:17:90
--dist=lucid --force --dhcp --mirror=http://wlvmirror.lsi.com/ubuntu
--size=14Gb --memory=2Gb --arch=amd64 --partitions=dpm-build
--lvm=uss004 --role=builder --boot

It hangs up trying to download packages.gz from:
http://security.ubuntu.com/ubuntu as the file
/usr/lib/xen-tools/lucid.d/20-setup-apt contains the following:

  deb-src ${mirror} ${dist} main restricted universe
  deb ${mirror} ${dist}-updates main restricted universe multiverse
  deb-src ${mirror} ${dist}-updates main restricted universe
  deb http://security.ubuntu.com/ubuntu ${dist}-security main restricted
universe
  deb-src http://security.ubuntu.com/ubuntu ${dist}-security main
restricted universe

Note that the last 2 lines ignore the mirror setting. This means that if
one is using a proxy, it will hang and eventually timeout.

Thanks

-Bruce







--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#610457: bug: xen-tools - apt-setup for lucid ignores --mirror option

2011-01-18 Thread Axel Beckert
found 610457 4.2-1
retitle 610457 xen-tools: no possibility to use a local security mirror for 
Ubuntu and Debian
kthxbye

Hi Bruce,

thanks for the bug report.

Bruce Edge wrote:
 When creating a lucid VM with the command line

 /usr/bin/xen-create-image --hostname lucid-build --mac=00:90:66:00:17:90
 --dist=lucid --force --dhcp --mirror=http://wlvmirror.lsi.com/ubuntu
 --size=14Gb --memory=2Gb --arch=amd64 --partitions=dpm-build
 --lvm=uss004 --role=builder --boot

 It hangs up trying to download packages.gz from:
 http://security.ubuntu.com/ubuntu as the file
 /usr/lib/xen-tools/lucid.d/20-setup-apt contains the following:

   deb-src ${mirror} ${dist} main restricted universe
   deb ${mirror} ${dist}-updates main restricted universe multiverse
   deb-src ${mirror} ${dist}-updates main restricted universe
   deb http://security.ubuntu.com/ubuntu ${dist}-security main restricted
 universe
   deb-src http://security.ubuntu.com/ubuntu ${dist}-security main
 restricted universe

 Note that the last 2 lines ignore the mirror setting.

This is more or less on purpose since Ubuntu (and Debian) do the same
on normal installations, too: Even if you choose a local mirror,
security updates won't be fetched from there but from the official
security repository.

Additionally, with Debian or Ubuntu, normal mirrors don't have a copy
of the security repository, so setting it up the way you expected or
want it would break most other installations.

 This means that if one is using a proxy, it will hang and eventually
 timeout.

xen-tools instructs apt to use an HTTP proxy, if one was configured in
the Dom0. See lines 31-38 of /usr/lib/xen-tools/lucid.d/20-setup-apt.
This is possibly a workaround you could use. It's though not yet
configurable via configuration file or command line options, just via
/etc/apt/apt.conf in the Dom0. But I can (now :-) imagine where this
setup is not possible.

But that's not the kind of proxy you use (something apt-proxy,
apt-cacher, etc.). That kind of proxy is indeed currently not
supported for security repositories.

So this issue and the related Acquire::HTTP::Proxy issue pointed out
above would be fixed by adding the following new features respectively
configuration options:

1) Allowing to override the security mirror used for Ubuntu and
   Debian.

2) Allow to disable the usage of an security mirror even if the Dom0
   has one configured.

3) Allow to manually configure the usage of Acquire::HTTP::Proxy in
   the DomU.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert a...@debian.org, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-|  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#610457: bug: xen-tools - apt-setup for lucid ignores --mirror option

2011-01-18 Thread Bruce Edge



On 01/18/2011 12:00 PM, Axel Beckert wrote:

found 610457 4.2-1
retitle 610457 xen-tools: no possibility to use a local security mirror for 
Ubuntu and Debian
kthxbye

Hi Bruce,

thanks for the bug report.

Bruce Edge wrote:

When creating a lucid VM with the command line

/usr/bin/xen-create-image --hostname lucid-build --mac=00:90:66:00:17:90
--dist=lucid --force --dhcp --mirror=http://wlvmirror.lsi.com/ubuntu
--size=14Gb --memory=2Gb --arch=amd64 --partitions=dpm-build
--lvm=uss004 --role=builder --boot

It hangs up trying to download packages.gz from:
http://security.ubuntu.com/ubuntu as the file
/usr/lib/xen-tools/lucid.d/20-setup-apt contains the following:

   deb-src ${mirror} ${dist} main restricted universe
   deb ${mirror} ${dist}-updates main restricted universe multiverse
   deb-src ${mirror} ${dist}-updates main restricted universe
   deb http://security.ubuntu.com/ubuntu ${dist}-security main restricted
universe
   deb-src http://security.ubuntu.com/ubuntu ${dist}-security main
restricted universe

Note that the last 2 lines ignore the mirror setting.

This is more or less on purpose since Ubuntu (and Debian) do the same
on normal installations, too: Even if you choose a local mirror,
security updates won't be fetched from there but from the official
security repository.

Additionally, with Debian or Ubuntu, normal mirrors don't have a copy
of the security repository, so setting it up the way you expected or
want it would break most other installations.


This means that if one is using a proxy, it will hang and eventually
timeout.

xen-tools instructs apt to use an HTTP proxy, if one was configured in
the Dom0. See lines 31-38 of /usr/lib/xen-tools/lucid.d/20-setup-apt.
This is possibly a workaround you could use. It's though not yet
configurable via configuration file or command line options, just via
/etc/apt/apt.conf in the Dom0. But I can (now :-) imagine where this
setup is not possible.

But that's not the kind of proxy you use (something apt-proxy,
apt-cacher, etc.). That kind of proxy is indeed currently not
supported for security repositories.

So this issue and the related Acquire::HTTP::Proxy issue pointed out
above would be fixed by adding the following new features respectively
configuration options:

1) Allowing to override the security mirror used for Ubuntu and
Debian.

2) Allow to disable the usage of an security mirror even if the Dom0
has one configured.

3) Allow to manually configure the usage of Acquire::HTTP::Proxy in
the DomU.

Regards, Axel


I vote for a --security-mirror= option as that's already used by some 
other app that I can't think of now.


I don't like the inheritance of the dom0 apt settings as they are 
correct only if the target VM is of the same type as dom0. IOW, using a 
debian dom0's apt setup to build an ubuntu VM is probably wrong as the 
mirror/proxy could be different.

Leaving it as a cmdline arg would be preferable IMHO.

Thanks

-Bruce




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org