fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.08k stars 111 forks source link

Plugin resulting in password prompt? #132

Closed HSPDev closed 9 years ago

HSPDev commented 9 years ago

I'm on a slow connection so I would like to try out this plugin.

I am using the chef/debian-7.4 image. Nothing special going on there.

But as soon as I have run: vagrant plugin install vagrant-cachier

And put in the relevant provided code from the Quickstart, my VM will boot up, but ask me for a password. Vagrant won't even be allowed access doing provisioning.

vagrant ssh doesn't worker either.

Also, if I exit using CTRL+C, my terminal will be entirely messed up, and have to be reopened (I can't type anything into it, I suspect this is a Vagrant issue however from exiiting the password prompt).. I know this sounds A LOT like a problem on my end, and it might be, but it happens only when using this plugin.

If I run "vagrant plugin uninstall vagrant-cachier" everything is fine. And that's the only thing I change. When using this plugin, my vagrant installation is completely broken. When not, it's completely fine.

Also I'm on OS X Yosemite 10.10.

I'm trying to use the Ansible provider as follows (This is my Vagrant file wihtou - The ansible script never even runs, so it's not that ):

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    if Vagrant.has_plugin?("vagrant-cachier")
        # Configure cached packages to be shared between instances of the same base box.
        # More info on the "Usage" link above
        config.cache.scope = :box

        # OPTIONAL: If you are using VirtualBox, you might want to use that to enable
        # NFS for shared folders. This is also very useful for vagrant-libvirt if you
        # want bi-directional sync
        config.cache.synced_folder_opts = {
            type: :nfs,
            # The nolock option can be useful for an NFSv3 client that wants to avoid the
            # NLM sideband protocol. Without this option, apt-get might hang if it tries
            # to lock files needed for /var/cache/* operations. All of this can be avoided
            # by using NFSv4 everywhere. Please note that the tcp option is not the default.
            mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
        }
    end
    #Provision dem alle ved brug af Ansible.
    config.vm.provision 'ansible' do |ansible|
        ansible.playbook = 'provisioning/main.yaml'
    end

    config.vm.define 'DevWeb1' do |machine|
        #Tæt nok på den Debian 7.0 vi kører på vores servere.
        machine.vm.box = "chef/debian-7.4"

        #Sæt maskinens hostname
        machine.vm.hostname = "DevWeb1"

        #Så vi kan browse skidtet.
        machine.vm.network "forwarded_port", guest: 80, host: 8080

        #Så den kan snakke med databasen
        machine.vm.network "private_network", ip: "192.168.77.22"
    end

end
HSPDev commented 9 years ago

Lol. I fixed it.... That was quite a mistake I made :blush: ....

The password is my local machines sudo password, to be able to mount /etc/exports as read here: https://openstackr.wordpress.com/tag/icehouse/

Call me a newb, but that should be more clear in the documentation. When I see a password prompt after running a command which has never asked me for my own password before, I don't just go typing in my admin password. Also when using vagrant, I was completely convinced that it was the VM's password that was being messed up.

Please add it to the docs. xD

millerjp commented 9 years ago

:+1: for adding this to the docs. Made the same mistake :smiley: