You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Alasdair Hodge <al...@cloudsoftcorp.com> on 2014/09/08 14:33:37 UTC

VanillaSoftwareProcess and 'sudo' in YAML

Brooklyn-ers,

I've been playing around with VanillaSoftwareProcess, configured via 
YAML with launch and stop commands that invoke 'sudo'. However, these 
fail over SSH with:

> sudo: sorry, you must have a tty to run sudo

I guess the Brooklyn SSH utility classes are capable of mitigating this, 
but are there any workarounds available from YAML?

A.
-- 
Alasdair Hodge
Principal Engineer,
Cloudsoft Corporation


Re: VanillaSoftwareProcess and 'sudo' in YAML

Posted by Aled Sage <al...@gmail.com>.
Hi Alasdair,

I don't think we configure it from YAML yet.

There's a utility in BashCommands.dontRequireTtyForSudo that should be 
helpful. But it doesn't look like it's configurable through YAML for 
whether this is called. Its usage also seems a bit ad hoc in just a few 
entities.

Can you take a look at the usage of dontRequireTtyForSudo, and see what 
you think about whether it should be the default behaviour? It would be 
good to be configurable from YAML for the VanillaSoftwareProcess at 
least (to turn it off/on).

Aled

p.s. for anyone interested in background, see 
http://unix.stackexchange.com/questions/122616/why-do-i-need-a-tty-to-run-sudo-if-i-can-sudo-without-a-password


On 08/09/2014 13:33, Alasdair Hodge wrote:
> Brooklyn-ers,
>
> I've been playing around with VanillaSoftwareProcess, configured via 
> YAML with launch and stop commands that invoke 'sudo'. However, these 
> fail over SSH with:
>
>> sudo: sorry, you must have a tty to run sudo
>
> I guess the Brooklyn SSH utility classes are capable of mitigating 
> this, but are there any workarounds available from YAML?
>
> A.