Skip to content

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

@jonancm

Description

@jonancm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions