dlite
dlite copied to clipboard
dlite init: Error modifying /etc/exports
Bug Reports
-
dlite version in use (run
dlite --version
): dlite version 2.0.0-beta9 -
expected behavior: initialize VM
-
actual behavior:
sudo dlite init
Virtual machine hostname [local.docker]:
Disk size (in gigabytes) [20]:
CPU cores to allocate to VM [2]:
Memory to allocate to VM (in gigabytes) [2]:
DNS server [192.168.64.1]:
Docker version [latest]:
Extra flags to pass to the docker daemon:
Allow direct connections to containers [yes]:
Saving configuration: done
Creating ssh key pair: done
Adding host to ssh config: done
Creating tool binaries: done
Creating disk: done
Downloading OS: done
Next we'll run a few steps that require sudo, you may be prompted for your password.
Creating /etc/resolver/docker: done
Modifying /etc/exports: ERROR!
Here is what /etc/exports looks like:
# BEGIN: dlite
/Users -network 192.168.64.0 -mask 255.255.255.0 -alldirs -maproot=root:wheel
# END: dlite
/Users/lindsay -network 192.168.64.0 -mask 255.255.255.0 -alldirs -maproot=root:wheel
/var/root -network 192.168.64.0 -mask 255.255.255.0 -alldirs -maproot=root:wheel
- steps to reproduce
used the latest beta, ran
sudo dlite init
I have the same issue, but after running second or third time sudo dlite init
➜ ~ sudo /Applications/dlite init
Virtual machine hostname [local.docker]:
Disk size (in gigabytes) [20]:
CPU cores to allocate to VM [2]:
Memory to allocate to VM (in gigabytes) [2]:
DNS server [192.168.64.1]:
Docker version [latest]:
Extra flags to pass to the docker daemon:
Allow direct connections to containers [yes]:
Saving configuration: done
Creating ssh key pair: done
Adding host to ssh config: done
Creating tool binaries: done
Creating disk: done
Downloading OS: done
Next we'll run a few steps that require sudo, you may be prompted for your password.
Creating /etc/resolver/docker: done
Modifying /etc/exports: ERROR!
➜ ~ sudo /Applications/dlite init
WARNING: It appears you have already initialized dlite. Continuing will destroy your current virtual machine and its configuration.
Continue? (y/n):
the issue here is a conflict in /etc/exports
. you've already got an export that covers what dlite is trying to add, so the nfs daemon is refusing to start. i need to figure out the best way to resolve this still.
short term workaround, if you remove the export that conflicts, init dlite, then change it back if you need to (assuming the one you removed was the more relaxed one), everything should work fine
removed but still the same problem
➜ ~ sudo rm /etc/exports
➜ ~ ll /etc/export*
-rw-r--r-- 1 root wheel 278B Feb 14 22:44 /etc/exports_old
➜ ~ sudo /Applications/dlite init
WARNING: It appears you have already initialized dlite. Continuing will destroy your current virtual machine and its configuration.
Continue? (y/n): y
Virtual machine hostname [local.docker]:
Disk size (in gigabytes) [20]:
CPU cores to allocate to VM [2]:
Memory to allocate to VM (in gigabytes) [2]:
DNS server [192.168.64.1]:
Docker version [latest]:
Extra flags to pass to the docker daemon:
Allow direct connections to containers [yes]:
Saving configuration: done
Creating ssh key pair: done
Adding host to ssh config: done
Creating tool binaries: done Creating tool binaries: |
Creating disk: done
Downloading OS: done
Next we'll run a few steps that require sudo, you may be prompted for your password.
Creating /etc/resolver/docker: done
Modifying /etc/exports: ERROR!
What happens if you delete /etc/exports
and run this without sudo
?
I don't think I've ever tried to run dlite init
with sudo
.
@tripox thanks, without sudo works fine
No problem, @luchianenco.
I just noticed both you and @lindsaylandry ran the command with sudo
and I usually don't. 😃
Good catch @tripox! I didn't notice, init should be run without sudo. I'll have to add some checks to make sure that's the case