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

Parameter cwd failed on Exec[pip_install_rpyc]: cwd must be a fully qualified path #165

Closed
jonancm opened this issue Feb 3, 2015 · 0 comments

Comments

@jonancm
Copy link

jonancm commented Feb 3, 2015

I'm using puppet-python 1.8.2 to create a virtual environment as part of the provisioning process of an ubuntu/trusty64 virtual machine created with Vagrant and VirtualBox and running Puppet 3.4.3:

config.vm.provision :shell, inline: "puppet module install --force stankevich-python"
python::virtualenv { 'venv' :
    ensure => present,
    # requirements => '/vagrant/requirements.txt',
    systempkgs => false,
    venv_dir => '/opt/venv',
    owner => 'root',
    group => 'root',
}

Then I install software using python::pip like this:

python::pip { 'rpyc' :
    ensure => '3.2.3',
    virtualenv => 'venv',
}

When Puppet is invoked, I'm getting the following error:

Error: Parameter cwd failed on Exec[pip_install_rpyc]: cwd must be a fully qualified path at /etc/puppet/modules/python/manifests/pip.pp:195

Researching a bit, I found that pull request #8 solves a similar issue in the implementation of python::requirements, but the problem I'm having is with python::virtualenv, which is apparently still unsolved.

To reproduce this issue:

  1. Create a new Vagrantfile with the following contents:

    # -*- 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|
            config.vm.box = "ubuntu/trusty64"
            config.vm.provision :shell, inline: "puppet module install --force stankevich-python"
            config.vm.provision "puppet" do |puppet|
                    puppet.manifests_path = "manifests"
                    puppet.manifest_file  = "site.pp"
            end
    end
  2. Create the manifests directory:

    $ mkdir manifests
  3. Create the Puppet manifest at manifests/site.pp with the following contents:

    python::virtualenv { 'venv' :
            ensure => present,
            # requirements => '/vagrant/requirements.txt',
            systempkgs => false,
            venv_dir => '/opt/venv',
            owner => 'root',
            group => 'root',
    }
    
    python::pip { 'rpyc' :
            ensure => '3.2.3',
            virtualenv => 'venv',
    }
  4. Start the VM:

    $ vagrant up

    or provision the VM if it's already running:

    $ vagrant provision
petems added a commit to petems/puppet-python that referenced this issue Mar 19, 2015
The issue was from voxpupuli#165, the virtualenv given didn't give the full path, we now fail early to catch this.

Also adds an rspec to catch this, and a beaker test based on the scenario given in voxpupuli#165
petems added a commit that referenced this issue Sep 1, 2015
The issue was from #165, the virtualenv given didn't give the full path, we now fail early to catch this.

Also adds an rspec to catch this, and a beaker test based on the scenario given in #165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants