You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the laydown of /tmp/chef-install.sh, the file doesn't contain the requisite #!/path/to/interpreter and we call sh -c /tmp/chef-install.sh.
This results in an exit code of 126, due to chef-install.sh not being a valid stand alone command.
We either need to update the content of chef-install.sh (in mixlib-installer?), or call the sh script directly as input to sh rather than attempting to call an invalid script.
[2016-02-01T09:56:34-05:00] INFO: Completed stat -c '%a %U %G %n' /tmp/chef-install.sh on [email protected]: exit status 0
[2016-02-01T09:56:34-05:00] INFO: Executing sudo chmod 755 /tmp/chef-install.sh on [email protected]
[2016-02-01T09:56:34-05:00] INFO: Completed chmod 755 /tmp/chef-install.sh on [email protected]: exit status 0
- [awsusw2-test] change mode of /tmp/chef-install.sh on awsusw2-test from 0 to 755
[2016-02-01T09:56:34-05:00] INFO: Executing sudo sh -c /tmp/chef-install.sh on [email protected]
[2016-02-01T09:56:34-05:00] INFO: Completed chmod 755 /tmp/chef-install.sh on [email protected]: exit status 0
[2016-02-01T09:56:35-05:00] INFO: Completed sh -c /tmp/chef-install.sh on [email protected]: exit status 126
To verify the chef-install.sh manually:
ec2-user@ip-10-113-68-9:/tmp$ sh -c /tmp/chef-install.sh
sh: 1: /tmp/chef-install.sh: Permission denied
ec2-user@ip-10-113-68-9:/tmp$ echo $?
126
ec2-user@ip-10-113-68-9:/tmp$ ls -la /tmp/chef-install.sh
-rwxr-xr-x 1 ec2-user ec2-user 5270 Feb 1 14:56 /tmp/chef-install.sh
ec2-user@ip-10-113-68-9:/tmp$ id
uid=1000(ec2-user) gid=1000(ec2-user) groups=1000(ec2-user),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),102(netdev)
As a simple fix, I suggest removing -c from the sh command so that the content is interpreted as sh.
ec2-user@ip-10-113-68-9:/tmp$ sh /tmp/chef-install.sh
-----> Chef Omnibus installation detected (11.16.4)
The text was updated successfully, but these errors were encountered:
hh
linked a pull request
Feb 1, 2016
that will
close
this issue
During the laydown of /tmp/chef-install.sh, the file doesn't contain the requisite
#!/path/to/interpreter
and we callsh -c /tmp/chef-install.sh
.This results in an exit code of 126, due to chef-install.sh not being a valid stand alone command.
We either need to update the content of chef-install.sh (in mixlib-installer?), or call the sh script directly as input to sh rather than attempting to call an invalid script.
To verify the chef-install.sh manually:
As a simple fix, I suggest removing
-c
from the sh command so that the content is interpreted as sh.The text was updated successfully, but these errors were encountered: