[Gluster-users] gluster debian build repo redirection loop on apt-get update on docker
Paul Anderson
pha at umich.edu
Wed Mar 7 16:10:28 UTC 2018
Thanks for the feedback! I was able to fix my problem... turns out,
the standard docker debian and php-cli images don't include a critical
package: apt-transport-https
So to test gluster FS client using docker, start with a file like this:
# you can also use 'FROM debian'
FROM php:cli
# use up to date gluster.org built packages
RUN apt-get update
# this is key - you can't install gluster packages without it:
RUN apt-get --assume-yes install apt-transport-https
RUN apt-get --assume-yes install wget gnupg gnupg1 gnupg2
RUN wget -O - http://download.gluster.org/pub/gluster/glusterfs/3.13/rsa.pub
| apt-key add -
RUN echo deb [arch=amd64]
https://download.gluster.org/pub/gluster/glusterfs/3.13/LATEST/Debian/stretch/amd64/apt
stretch main > /etc/apt/sources.list.d/gluster.list
RUN apt-get update
# now install gluster fs client code and a few other fun things
RUN apt-get --assume-yes install glusterfs-client
RUN apt-get --assume-yes install iputils-ping
RUN apt-get --assume-yes install iproute2
RUN apt-get --assume-yes install strace
# setup to mount gluster fs
RUN mkdir -pv /etc/glusterfs
COPY fstab /etc/fstab
COPY dockerstore.vol /etc/glusterfs
# copy our test php file in
COPY sqlite_tester_flock.php /usr/bin
And also, as you noted, my package path was botched - I'd tried a lot
of different ones, and gotten the same redirect loop for all, but this
was due to the apt-transport-https package not being installed. On
Ubuntu, there is a symlink for the https transport file, but on
debian, it appears to have to be a real file.
Paul
On Tue, Mar 6, 2018 at 10:28 PM, Kaleb S. KEITHLEY <kkeithle at redhat.com> wrote:
> On 03/06/2018 05:50 PM, Paul Anderson wrote:
>> When I follow the directions at
>> http://docs.gluster.org/en/latest/Install-Guide/Install/ to install
>> the latest gluster on a debian 9 docker container, I get the following
>> error:
>
> Files in the .../3.13/3.13.2 directory had the wrong owner/group,
> (rsync_aide). I'm not sure why, maybe an incomplete rsync? I've fixed
> the owners and reset the selinux context, although nobody else has
> complained about it not being able to install Debian packages from the
> repos.
>
> But independent of that, your package path looks wrong. You have:
> https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/...
> but I believe it should be:
> https://download.gluster.org/pub/gluster/glusterfs/3.13/LATEST/Debian/...
>
> Double check that your /etc/apt/sources.list.d/gluster.list file
> consists of the single line:
>
> deb [arch=amd64]
> https://download.gluster.org/pub/gluster/glusterfs/3.13/LATEST/Debian/stretch/amd64/apt
> stretch main
>
>
>>
>> Step 6/15 : RUN echo deb [arch=amd64]
>> https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt/
>> stretch main > /etc/apt/sources.list.d/gluster.list
>> ---> Running in 1ef386afb192
>> Removing intermediate container 1ef386afb192
>> ---> f3c99b2a7c7a
>> Step 7/15 : RUN apt-get update
>> ---> Running in 3a4744736ab0
>> Ign:1 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch InRelease
>> Ign:2 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch Release
>> Ign:3 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main all Packages
>> Ign:4 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main amd64 Packages
>> Ign:3 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main all Packages
>> Hit:5 http://security.debian.org stretch/updates InRelease
>> Ign:4 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main amd64 Packages
>> Ign:3 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main all Packages
>> Ign:4 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main amd64 Packages
>> Ign:3 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main all Packages
>> Ign:4 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main amd64 Packages
>> Ign:3 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main all Packages
>> Ign:4 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main amd64 Packages
>> Ign:3 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main all Packages
>> Ign:6 http://cdn-fastly.deb.debian.org/debian stretch InRelease
>> Err:4 https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch/main amd64 Packages
>> Redirection loop encountered
>> Hit:7 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease
>> Hit:8 http://cdn-fastly.deb.debian.org/debian stretch Release
>> Reading package lists...
>> W: The repository
>> 'https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt
>> stretch Release' does not have a Release file.
>> E: Failed to fetch
>> https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt/dists/stretch/main/binary-amd64/Packages
>> Redirection loop encountered
>> E: Some index files failed to download. They have been ignored, or old
>> ones used instead.
>> The command '/bin/sh -c apt-get update' returned a non-zero code: 100
>>
>>
>> I suspect I may be missing some needed packages to get apt to work
>> right, except it appears to work fine for the regular debian packages.
>>
>> This is my Dockerfile:
>>
>> FROM php:cli
>> # use up to date gluster.org built packages
>> RUN apt-get update
>> RUN apt-get --assume-yes install wget gnupg gnupg1 gnupg2
>> RUN wget -O - http://download.gluster.org/pub/gluster/glusterfs/3.13/rsa.pub
>> | apt-key add -
>> RUN ln -s /usr/lib/apt/methods/http /usr/lib/apt/methods/https
>> RUN echo deb [arch=amd64]
>> https://download.gluster.org/pub/gluster/glusterfs/3.13/9/Debian/stretch/amd64/apt/
>> stretch main > /etc/apt/sources.list.d/gluster.list
>> RUN apt-get update
>> RUN apt-get --assume-yes install glusterfs-client
>>
>>
>> Thanks,
>>
>> Paul
>> _______________________________________________
>> Gluster-users mailing list
>> Gluster-users at gluster.org
>> http://lists.gluster.org/mailman/listinfo/gluster-users
>>
>
More information about the Gluster-users
mailing list