Collect logs from mount.objectivefs
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-25 09:27:54 +02:00
parent 73228fbbbf
commit ac3dfc956a
2 changed files with 4 additions and 2 deletions

View File

@@ -10,8 +10,9 @@ RUN mkdir bin/ && go build -o bin/ ./...
FROM debian:bullseye-slim
RUN mkdir -p /run/docker/plugins
COPY --from=builder /usr/local/src/objectivefs-docker-volume/bin/objectivefs-docker-volume /
COPY bin/mount.objectivefs /sbin/
COPY config.json /
RUN mkdir -p /run/docker/plugins && \
chmod +x /sbin/mount.objectivefs

View File

@@ -154,6 +154,7 @@ func (d ofsDriver) Mount(r *volume.MountRequest) (*volume.MountResponse, error)
}
cmd := exec.Command("/sbin/mount.objectivefs", "-o"+v.opts, v.fs, v.volume.Mountpoint)
cmd.Env = v.env
cmd.Stderr = log.StandardLogger().Out
log.Info("Mount ObjectiveFS Volume '%s': '%s'", r.Name, cmd)
if err := cmd.Run(); err != nil {
return &volume.MountResponse{}, fmt.Errorf("unexpected error mounting '%s' check log (/var/log/syslog or /var/log/messages): %s", r.Name, err.Error())