Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dlite init: Error modifying /etc/exports #218

Open
lindsaylandry opened this issue Jan 18, 2017 · 7 comments
Open

dlite init: Error modifying /etc/exports #218

lindsaylandry opened this issue Jan 18, 2017 · 7 comments
Labels

Comments

@lindsaylandry
Copy link

lindsaylandry commented Jan 18, 2017

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
@luchianenco
Copy link

luchianenco commented Feb 14, 2017

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):

@nlf
Copy link
Owner

nlf commented Feb 14, 2017

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

@luchianenco
Copy link

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!

@tripox
Copy link

tripox commented Feb 15, 2017

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.

@luchianenco
Copy link

@tripox thanks, without sudo works fine

@tripox
Copy link

tripox commented Feb 15, 2017

No problem, @luchianenco.
I just noticed both you and @lindsaylandry ran the command with sudo and I usually don't. 😃

@nlf
Copy link
Owner

nlf commented Feb 15, 2017

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

@nlf nlf added the bug label Feb 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants