PATH for Vagrant provisioners

Bug #1411631 reported by Ilya Dmitrichenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Invalid
Low
Unassigned

Bug Description

On Vagrant, trying to do this simple provisioning:

config.vm.provision "shell", inline: <<-SHELL
    echo PATH=$PATH
    snappy install docker
    docker pull errordeveloper/curl
SHELL

Results in:

==> default: stdin: is not a tty
==> default: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/snappy-bin
docker 4 MB [==============================================] OK ]
==> default: Part Tag Installed Available Fingerprint Active
==> default: docker edge 1.3.3.001 - 60b98945e5fc1d *
==> default: /tmp/vagrant-shell: line 3: docker: command not found

So looks like the way PATH is set, it's would expect snappy to install packages in root's home, but he instals them in ubuntu's home.

I have no problem working around this, but it's just needs fixing. This happen to manifest itself on Vargant, but it's just a more general bug anyway.

Alexander Sack (asac)
Changed in snappy-ubuntu:
assignee: nobody → Ben Howard (utlemming)
Michael Terry (mterry)
affects: snappy-ubuntu → snappy
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote : Re: [Bug 1411631] Re: PATH for Vagrant provisioners

The root cause is that the Vagrant user on Snappy is "ubuntu," not root.
So you will need to use "sudo" or switch to the root user. The root
user is not configured for SSH due to security issues, and as a result,
the provisioner will not work against root.

Revision history for this message
Michael Vogt (mvo) wrote :

Setting to low as this appears (from Bens comment) to be mostly a documentation issue, i.e. ensure that "sudo" is used.

Changed in snappy:
status: New → Triaged
importance: Undecided → Low
Changed in snappy:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.