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

puppet:bootstrap:puppetlabs:ubuntu is confused about sudo #65

Open
chrchr opened this issue Mar 18, 2015 · 3 comments
Open

puppet:bootstrap:puppetlabs:ubuntu is confused about sudo #65

chrchr opened this issue Mar 18, 2015 · 3 comments

Comments

@chrchr
Copy link

chrchr commented Mar 18, 2015

rchurch$ bundle exec cap --trace vm puppet:bootstrap:puppetlabs:ubuntu
** Invoke vm (first_time)
** Execute vm
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke puppet:bootstrap:puppetlabs:ubuntu (first_time)
** Execute puppet:bootstrap:puppetlabs:ubuntu
INFO [cf8dd8ab] Running /usr/bin/env sudo as [email protected]
DEBUG [cf8dd8ab] Command: /usr/bin/env sudo
DEBUG [cf8dd8ab]    usage: sudo -h | -K | -k | -V
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]    [command]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]    prompt] [-u user] [VAR=value] [-i|-s] [<command>]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]
DEBUG [cf8dd8ab]    prompt] [-u user] file ...
DEBUG [cf8dd8ab]
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: sudo exit status: 1
sudo stdout: Nothing written
sudo stderr: usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
            [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-u user] file ...
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
SSHKit::Command::Failed: sudo exit status: 1
sudo stdout: Nothing written
sudo stderr: usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
            [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-u user] file ...
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/command.rb:95:in `exit_status='
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:179:in `block in _execute'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/lib/capistrano/dsl.rb:28:in `sudo'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/supply_drop-1.0.0.beta2/lib/supply_drop/tasks.rb:52:in `block (5 levels) in <top (required)>'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/rchurch/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => puppet:bootstrap:puppetlabs:ubuntu
@pitluga
Copy link
Owner

pitluga commented Mar 18, 2015

You're not giving me a lot to go on here. Supply drop version? ubuntu version? Capistrano version? can you sudo other stuff in the VM?

As a workaround you can always just apt-get install puppet in the VM. These bootstrap methods are really just for convenience and not required.

@chrchr
Copy link
Author

chrchr commented Mar 18, 2015

Sorry. Here's all the info:

'supply_drop', '~>1.0.0beta1'
Ubuntu 14.04
Capistrano Version: 3.4.0 (Rake Version: 10.4.2)

cap vm puppet:bootstrap:ubuntu works fine. It's not a problem with sudo generally, but it looks to me like something not great happens here with the sudo on the right side of the pipe:

execute :echo, :deb, "http://apt.puppetlabs.com/ $(lsb_release -sc) main | #{sudo} tee /etc/apt/sources.list.d/puppet.list"

@prachetasp
Copy link
Collaborator

@chrchr Looks like this is the same issue as #53

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

3 participants