Hi.
I have a CentOS server that I want to bootstrap with Chef.
If I run the command (from my workstation, 1.2.3.4 is the IP address of the computer I want to prepare):
knife solo prepare root@1.2.3.4 -VV
I end up getting a bunch of errors. The significant one (first one) is this:
DEBUG: Initial command sudo yum -y install rsync
DEBUG: Running processed command sudo -p 'knife sudo password: ’ yum -y install rsync
DEBUG: sudo -p 'knife sudo password: ’ yum -y install rsync stdout: Loaded plugins: fastestmirror
DEBUG: sudo -p 'knife sudo password: ’ yum -y install rsync stdout: Determining fastest mirrors
DEBUG: sudo -p 'knife sudo password: ’ yum -y install rsync stdout: Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: Network is unreachable"
Error: Cannot find a valid baseurl for repo: base
So it seems clear that the yum command is looking up an IPv6 address for the mirrorlist.
If I log into the server myself and do a “yum install rsync” everything works fine. I’ve also tried to disable IPv6 on the host being bootstrapped but that doesn’t work.
Does anybody know what’s going on here and how I can fix it?
I should note that the computer in question is behind a firewall and needs to use a proxy to establish a connection. I have added the proxy config in /etc/profile so my login sessions have http_proxy and https_proxy defined. However, I also tried adding the proxy definition to /etc/yum.conf and it behaved exactly the same (my login sessions could do yum install but knife prepare couldn’t).
I’d really appreciate some help here.
-Stefan Freyr.