/snap/bin is not in path when executing user-data scripts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Given user-data:
#!/bin/bash
snap install aws-cli --classic
echo $PATH
aws help # command shipped in the snap
We see the following failure in /var/log/
Cloud-init v. 18.2 running 'modules:config' at Fri, 18 May 2018 20:10:57 +0000. Up 15.17 seconds.
aws-cli 1.15.21 from 'aws' installed
/usr/local/
/var/lib/
Cloud-init v. 18.2 running 'modules:final' at Fri, 18 May 2018 20:11:05 +0000. Up 23.18 seconds.
Expected results: commands shipped in snaps should work in user-data without hard-coded paths
$ apt-cache policy cloud-init
cloud-init:
Installed: 18.2-27-
Candidate: 18.2-27-
Version table:
*** 18.2-27-
500 http://
100 /var/lib/
18.
500 http://
Either a duplicate of, or related to, bug #1771858.