mineshaftgap / d4m-nfs

Docker for Mac with NFS for performance improvements over osxfs
296 stars 26 forks source link

How long does `[d4m-nfs] Wating until d4m-nfs setup is done` typically take to complete? #23

Closed davidjeddy closed 7 years ago

davidjeddy commented 7 years ago

Process: Removed all shares from docker FileShare App/Restart sudo rm /etc/exports git clone https://github.com/IFSight/d4m-nfs.git cd ./d4m-nfs ./d4m-nfs.sh {enter p/w}

screen shot 2016-12-13 at 2 45 58 pm

...and it will keep going on an OSX system. Stopped it after ~ 5 minutes. Any ideas?

if-kyle commented 7 years ago

Have you tried stable docker for mac? The version we run on is 1.12.

https://docs.docker.com/docker-for-mac/

if-kenn commented 7 years ago

@davidjeddy d4m-nfs previously worked with the beta version of D4M, but I have not tried it recently. You might want to do what @if-kyle suggested and try with the stable channel of D4M.

silvamerica commented 7 years ago

I'm seeing this issue with the stable channel.

if-kenn commented 7 years ago

@davidjeddy you mentioned that you "Removed all shares from docker FileShare" if you did this then d4m-nfs cannot work. As mentioned in the README, you need to have at least the /tmp share so that it can pass off information.

If either of you want/need further help, please provide the following:

  1. screenshot of Docker for Mac's Preferences -> File Sharing
  2. attachment of d4m-nfs/etc/d4m-nfs-mounts.txt
  3. attachment of /tmp/d4m-mount-nfs.sh
  4. attachment of /tmp/d4m-nfs-mounts.txt
  5. attachment of /etc/exports
dfee commented 7 years ago

@if-kenn I'll give it a shot (same problem).

  1. screen shot 2016-12-15 at 8 10 29 pm

  2. d4m-nfs/etc/d4m-nfs-mounts.txt (doesn't exist – didn't create it)

  3. /tmp/d4m-mount-nfs.sh

    
    ln -nsf /tmp/d4m-apk-cache /etc/apk/cache
    apk update
    apk add nfs-utils sntpc
    rpcbind -s > /dev/null 2>&1

DEFGW=$(ip route|awk '/default/{print $3}') FSTAB="\n\n# d4m-nfs mounts\n"

if true && ! $(grep ':/mnt' /tmp/d4m-nfs-mounts.txt > /dev/null 2>&1); then mkdir -p /mnt

FSTAB="${FSTAB}${DEFGW}:/Users/dfee /mnt nfs nolock,local_lock=all 0 0" fi

if [ -e /tmp/d4m-nfs-mounts.txt ]; then while read MOUNT; do DSTDIR=$(echo "$MOUNT" | cut -d: -f2) mkdir -p ${DSTDIR} FSTAB="${FSTAB}\n${DEFGW}:$(echo "$MOUNT" | cut -d: -f1) ${DSTDIR} nfs nolock,local_lock=all 0 0" done < /tmp/d4m-nfs-mounts.txt fi

if ! $(grep "d4m-nfs mounts" /etc/fstab > /dev/null 2>&1); then echo adding d4m nfs config to /etc/fstab: echo -e $FSTAB | tee /etc/fstab else echo d4m nfs mounts already exist in /etc/fstab fi

sntpc -i 10 ${DEFGW} &

sleep .5 mount -a touch /tmp/d4m-done


4. /tmp/d4m-nfs-mounts.txt (also, does not exist)

5. /etc/exports

d4m-nfs exports

"/Users/dfee" -alldirs -mapall=501:20 localhost

davidjeddy commented 7 years ago

@if-kyle after restarting the docker native client my share list is exactly like @dfee 's. /tmp is listed yet the issue persists. Is there any additional information I can provide?

if-kyle commented 7 years ago

@davidjeddy @dfee - the attached screenshot of docker above it appears different then the stable version that this is currently working on. What version of docker are you on? I don't see a proxies option on my version.

docker -v

screen shot 2016-12-19 at 10 17 15 am

davidjeddy commented 7 years ago

@if-kyle you were correct, we using the beta native client; down graded to the stable binary and d4m seemed to work correctly. Will test again tomorrow to confirm.

davidkelley commented 7 years ago

I'm also seeing this issue but I believe it is because the script running on Moby VM is failing. When attempting to use screen to connect to the VM, various commands cannot be found, like apk. Perhaps this provides some insight into the problem?

Attachment of File Sharing

image

mounts.txt

Is an empty file.

/tmp/d4m-mount-nfs.sh

ln -nsf /tmp/d4m-apk-cache /etc/apk/cache
apk update
apk add nfs-utils sntpc
rpcbind -s > /dev/null 2>&1

DEFGW=$(ip route|awk '/default/{print $3}')
FSTAB="\n\n# d4m-nfs mounts\n"

if true && ! $(grep ':/mnt' /tmp/mounts.txt > /dev/null 2>&1); then
  mkdir -p /mnt

  FSTAB="${FSTAB}${DEFGW}:/Users/davidk /mnt nfs nolock,local_lock=all 0 0"
fi

if [ -e /tmp/mounts.txt ]; then
  while read MOUNT; do
    DSTDIR=$(echo "$MOUNT" | cut -d: -f2)
    mkdir -p ${DSTDIR}
    FSTAB="${FSTAB}\n${DEFGW}:$(echo "$MOUNT" | cut -d: -f1) ${DSTDIR} nfs nolock,local_lock=all 0 0"
  done < /tmp/mounts.txt
fi

if ! $(grep "d4m-nfs mounts" /etc/fstab > /dev/null 2>&1); then
    echo adding d4m nfs config to /etc/fstab:
    echo -e $FSTAB | tee /etc/fstab
else
    echo d4m nfs mounts already exist in /etc/fstab
fi

sntpc -i 10 ${DEFGW} &

sleep .5
mount -a
touch /tmp/d4m-done

/tmp/d4m-nfs-mounts.txt

Does not exist.

/etc/exports

# d4m-nfs exports

"/Users/davidk" -alldirs -mapall=0:0 localhost

When attempting to execute the script manually via screen, I get the following:

bash-3.2$ sh /tmp/d4m-mount-nfs.sh
ln: /etc/apk/cache: No such file or directory
/tmp/d4m-mount-nfs.sh: line 2: apk: command not found
/tmp/d4m-mount-nfs.sh: line 3: apk: command not found
/tmp/d4m-mount-nfs.sh: line 6: ip: command not found
mkdir: /mnt: Permission denied
adding d4m nfs config to /etc/fstab:
tee: /etc/fstab: Permission denied
-e 

# d4m-nfs mounts
:/Users/davidk /mnt nfs nolock,local_lock=all 0 0
/tmp/d4m-mount-nfs.sh: line 30: sntpc: command not found
GetMasterBlock: Error 13 opening /dev/rdisk1
mount_hfs: error on mount(): error = -1.
mount_hfs: Operation not permitted

Any help would be greatly appreciated as I'd really like to get this running. Thanks in advance!

if-kyle commented 7 years ago

@davidkelley can you please make a new issue? You seem to be using docker for mac 1.12 stable, so I believe your issue is different then the ones listed here.

if-kenn commented 7 years ago

@davidkelley as @if-kyle mentioned, for the sake of other users and our sanity please open a new issue when it is a new issue, conflating issues will only slow down our ability to help and others to understand.

When you do open a new issue, please provide more information, you state that "When attempting to execute the script manually via screen" yet we don't see any command to run screen. I say this because in your example above it is pretty obvious that you are not actually attached to the Moby VM. The Moby VM does not contain bash and has to have apk for it to function as a BusyBox Linux offshoot, unless Docker completely changed the underlying VM. With the information provided so far it is impossible to help.

(edited since addressed wrong user)

davidkelley commented 7 years ago

@if-kenn ok will do

davidjeddy commented 7 years ago

@if-kyle I mean it works fine w/ the stable branch of the native client. Problem solved from my end.

if-kyle commented 7 years ago

@davidjeddy thanks for your response, closing this one out.