Comment 0 for bug 966944

Revision history for this message
Yoann Dubreuil (ydubreuil) wrote :

Building a vm image behind a proxy doesn't work (in fact, it nearly works...). VMbuilder can't connect to the network while updating the apt sources.

This command crashes :

# vmbuilder vbox ubuntu -o -v \
 --tmpfs 1536 --rootsize=4096M --swapsize=512M \
 -c openstack.cfg -d target/ubuntu-vbox --proxy=http://apt-cacher-ng-host:3142

2012-03-28 10:44:47,213 INFO : Mounting tmpfs under /tmp/tmp6WoP31tmpfs
2012-03-28 10:44:47,219 INFO : Calling hook: preflight_check
2012-03-28 10:44:47,222 INFO : Calling hook: set_defaults
2012-03-28 10:44:47,222 INFO : Calling hook: bootstrap
2012-03-28 10:45:22,542 INFO : Calling hook: configure_os
2012-03-28 10:46:25,850 INFO : W: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Unable to connect to fr.archive.ubuntu.com:http:
2012-03-28 10:46:25,850 INFO :
2012-03-28 10:46:25,851 INFO : W: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Unable to connect to fr.archive.ubuntu.com:http:
2012-03-28 10:46:25,851 INFO :
2012-03-28 10:46:25,851 INFO : W: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Unable to connect to fr.archive.ubuntu.com:http:
2012-03-28 10:46:25,851 INFO :
2012-03-28 10:46:25,851 INFO : W: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-amd64/Packages Unable to connect to fr.archive.ubuntu.com:http:

The problem is at the beginning of the configure_os phase : the /etc/apt/apt.conf file containing the proxy configuration is created after updating the apt sources. The apt update cannot work without the proxy configuration. After swapping theses two actions, building an image works.

So, here is a simple patch swapping theses two actions.

Any chance to have this fix in precise ?

Thanks,
Yoann.