The recipe has the code
apt_repository “haproxy” do
uri "http://ppa.launchpad.net/vbernat/haproxy-1.5/ubuntu"
distribution node[‘lsb’][‘codename’]
components [‘main’]
…
When chef-solo is run with that recipe, I get
Failed to fetch
http://ppa.launchpad.net/vbernat/haproxy-1.5/dists/precise/main/…
Where did the ‘ubuntu’ component of the path go?
mjb.
On Thursday, January 9, 2014 at 1:36 PM, Mark J Bradakis wrote:
The recipe has the code
apt_repository "haproxy" do
uri "Index of /vbernat/haproxy-1.5/ubuntu"
distribution node['lsb']['codename']
components ['main']
...
When chef-solo is run with that recipe, I get
Failed to fetch
http://ppa.launchpad.net/vbernat/haproxy-1.5/dists/precise/main/...
Where did the 'ubuntu' component of the path go?
mjb.
HTTP redirect:
$ curl -I Index of /vbernat/haproxy-1.5/ubuntu
HTTP/1.1 301 Moved Permanently
Date: Thu, 09 Jan 2014 21:37:55 GMT
Server: Apache/2.2.14 (Ubuntu)
Location: Index of /vbernat/haproxy-1.5/ubuntu
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
--
Daniel DeLeo
On Thursday, January 9, 2014 at 1:38 PM, Daniel DeLeo wrote:
On Thursday, January 9, 2014 at 1:36 PM, Mark J Bradakis wrote:
The recipe has the code
apt_repository "haproxy" do
uri "Index of /vbernat/haproxy-1.5/ubuntu"
distribution node['lsb']['codename']
components ['main']
...
When chef-solo is run with that recipe, I get
Failed to fetch
http://ppa.launchpad.net/vbernat/haproxy-1.5/dists/precise/main/...
Where did the 'ubuntu' component of the path go?
mjb.
HTTP redirect:
$ curl -I Index of /vbernat/haproxy-1.5/ubuntu
HTTP/1.1 301 Moved Permanently
Date: Thu, 09 Jan 2014 21:37:55 GMT
Server: Apache/2.2.14 (Ubuntu)
Location: Index of /vbernat/haproxy-1.5/ubuntu
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
--
Daniel DeLeo
Oops, responded too soon, the redirect just adds a trailing slash. #DERP. Though adding it might fix your issue.
Daniel DeLeo wrote:
HTTP redirect:
$ curl -I Index of /vbernat/haproxy-1.5/ubuntu
HTTP/1.1 301 Moved Permanently
Date: Thu, 09 Jan 2014 21:37:55 GMT
Server: Apache/2.2.14 (Ubuntu)
Location: Index of /vbernat/haproxy-1.5/ubuntu
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
But doing a wget of
http://ppa.launchpad.net/vbernat/haproxy-1.5/ubuntu/dists/precise/main/binary-amd64/Packages
fetches the file just fine, so I thought that apt_repository would also
be able to find it.
mjb.
Mike
5
You may have to add arch
to your apt_repository declaration.
Can you provide the rendered /etc/apt/sources.list.d/haproxy.list
file?
As well as the rest of the log line from "Failed to fetch" - or is that it?
On Thu, Jan 9, 2014 at 4:47 PM, Mark J Bradakis mark@bradakis.com wrote:
Daniel DeLeo wrote:
HTTP redirect:
$ curl -I Index of /vbernat/haproxy-1.5/ubuntu
HTTP/1.1 301 Moved Permanently
Date: Thu, 09 Jan 2014 21:37:55 GMT
Server: Apache/2.2.14 (Ubuntu)
Location: Index of /vbernat/haproxy-1.5/ubuntu
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
But doing a wget of
Index of /vbernat/haproxy-1.5/ubuntu
dists/precise/main/binary-amd64/Packages
fetches the file just fine, so I thought that apt_repository would also be
able to find it.
mjb.
Mike wrote:
Can you provide the rendered /etc/apt/sources.list.d/haproxy.list
file?
That was the clue. I removed the old file, let the recipe generate a
new on and it
worked fine.
mjb.