-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Sudo and PTY mode #1154
Comments
Use it. Or migrate to v5. There pty was refactored and now it's possible to use correctly. |
okay, but im need sudo. for example for reload php-fpm When will the release be? |
Use sudores if you need |
is there a way to use I tried already |
Using pty is bad practice |
Yes, bad. But sudo works only with pty, but with pty always deploy is waiting. Deadlock happen |
What about sudores? |
Maybe you mean sudoers? |
Yes, you are understand me. |
Im use sudoers. Sudoers allow execute sudo without password, but only that. sudo must be used to restart php for example, and without sudo not work. |
So does it works without pty? |
No. See more #953 |
I see :) Fixed in v5))) |
okay. When will the release be? |
I hope next week. Need to write some docs. |
I have a similar problem in deployer 5 beta 2. Now with set('git_tty', true); Also does anybody know why we need this command "sudo systemctl restart php-fpm.service"? |
Php restart need because php fpm in production mode use opcode cache. Without restart php used old version of your code |
Thank you @vladdnepr . |
May be we need tty option for command "sudo systemctl restart php-fpm.service" only? |
@antonmedv , What do you think? |
Make pull request with some option. This option must enable analyze command for sudo and if it's present - enable pty only for that command. By default this option must be disabled. This is my solution. |
@vladdnepr Do you have same problem for version 5? |
No. Im waiting v5 release |
@itelmenko this is an example. You can add tty to run as options: run('...', ['tty' => true]); git_tty affects only git clone, not all commands. |
This is really complicated stuff what leads to bugs. There a plenty of sudo prompts to parse. |
Thank you @antonmedv
O-ho-ho, I am really inattentive |
@antonmedv ok, your variant with tty option in run function is better |
@antonmedv , sorry |
Looks like bug in openssh. Try create simple bash script with same commands and run it. |
@antonmedv , |
@itelmenko i don't know. Only way is to see what there are ssh doing (need to pass -vvvv to ssh call) |
Deployer v5 log. First run was aborted because it is very slow. |
Try to update to new openssh. |
Issue which I have looks like #1187 |
not completely sure if related, but when i have jenkins run (sf3recipe) deployer, i am getting
adding the git_tty option does not seem to help, any advice ? |
set git_tty to false |
yep thx, found out just after posting, and thx for the FAST reply !! 👍 |
Description
After commit 157a8d0
deploy always wait
It reproduced on 2 different dev PC and 2 different servers
Without pty option all works fine, but sudo not
Steps to reproduce
Im add echo to this place and get full command
Before commit changes:
After commit changes:
and wait
Content of
deploy.php
The text was updated successfully, but these errors were encountered: