Skip to content

Commit

Permalink
Create a symbolic link for /etc/mtab
Browse files Browse the repository at this point in the history
When ganesha starts, it looks for volume mount data in
/etc/mtab. However, this file does not pre-exist in the
Ubuntu image and results in the created pod hanging at
ganesha server error.

```
mount.nfs: mounting 10.43.228.161:/pvc-3d9bd71e-e7ab-4420-bffa-b158e7de9186 failed, reason given by server: No such file or directory
```

Since mostly /etc/mtab is a copy of /proc/mounts hence
it should be safe to have as a symbolic link.

Longhorn #2111

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang authored and joshimoo committed Mar 1, 2021
1 parent 0f66683 commit 819c483
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ RUN echo /usr/local/lib64 > /etc/ld.so.conf.d/local_libs.conf
# do not ask systemd for user IDs or groups (slows down dbus-daemon start)
RUN sed -i s/systemd// /etc/nsswitch.conf

# ganesha reads /etc/mtab for mounted volumes
RUN ln -sf /proc/self/mounts /etc/mtab

COPY --from=build /usr/local /usr/local/
COPY --from=build /ganesha-extra /
COPY bin/longhorn-share-manager /longhorn-share-manager
Expand Down

0 comments on commit 819c483

Please sign in to comment.