Skip to content

Commit

Permalink
fix catfs download to follow redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
kahing committed Aug 30, 2017
1 parent 6cac72c commit 0d9f9d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bench/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 29,14 @@ RUN git clone --depth 1 https://github.com/skoobe/riofs && \
cd riofs && ./autogen.sh && ./configure && make -j4 && make install && \
cd .. && rm -Rf riofs

RUN curl -O https://github.com/kahing/catfs/releases/download/v0.4.0/catfs && \
RUN curl -L -O https://github.com/kahing/catfs/releases/download/v0.4.0/catfs && \
mv catfs /usr/bin && chmod 0755 /usr/bin/catfs

# ideally I want to clear out all the go deps too but there's no
# way to do that with ADD
ENV PATH=$PATH:/root/go/bin
ADD . /root/go/src/github.com/kahing/goofys
WORKDIR /root/go/src/github.com/kahing/goofys
RUN go get . && go install
RUN go get . && make install

ENTRYPOINT ["/root/go/src/github.com/kahing/goofys/bench/run_bench.sh"]
3 changes: 2 additions & 1 deletion bench/run_bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 35,14 @@ fi

S3FS_ENDPOINT="-ourl=$ENDPOINT"
GOOFYS_ENDPOINT="--endpoint $ENDPOINT"

if echo "${ENDPOINT}" | fgrep -q amazonaws.com; then
S3FS_ENDPOINT="${S3FS_ENDPOINT} -oiam_role=auto"
else
echo "${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}" > /etc/passwd-s3fs
chmod 0400 /etc/passwd-s3fs
S3FS_ENDPOINT="${S3FS_ENDPOINT} -ouse_path_request_style -osigv2"
# s3proxy is broken
# s3proxy is broken https://github.com/andrewgaul/s3proxy/issues/240
GOOFYS_ENDPOINT="${GOOFYS_ENDPOINT} --cheap"
fi

Expand Down
1 change: 1 addition & 0 deletions internal/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 421,7 @@ func PopulateFlags(c *cli.Context) (ret *FlagStorage) {
cacheArgs = append(cacheArgs, cacheDir)
cacheArgs = append(cacheArgs, flags.MountPointArg)

fuseLog.Debugln("catfs", cacheArgs)
catfs := exec.Command("catfs", cacheArgs...)
_, err = catfs.Output()
if err != nil {
Expand Down

0 comments on commit 0d9f9d0

Please sign in to comment.