kamal icon indicating copy to clipboard operation
kamal copied to clipboard

interactive server exec doesn't run hooks

Open cromega opened this issue 1 year ago • 0 comments

Kamal v2.2.2

Running kamal server exec with the interactive flag doesn't execute the pre-connect hook

$ kamal server exec -d qa -i /bin/bash
Running '/bin/bash' on x.x.x.x interactively...
[email protected]: Permission denied (publickey).

(the authentication failure is down to the fact that the pre-connect hook uses EC2 instance connect to send a throwaway SSH key to the instance before the connection attempt)

$ kamal server exec -d qa date
Running 'date' on x.x.x.x...
Running the pre-connect hook...
  INFO [] Running /usr/bin/env .kamal/hooks/pre-connect as cromega@localhost
  INFO [] Finished in 6.877 seconds with exit status 0 (successful).
  INFO [] Running /usr/bin/env date on x.x.x.x
  INFO [] Finished in 0.219 seconds with exit status 0 (successful).
App Host: x.x.x.x
Thu Oct 24 11:16:36 AM UTC 2024

cromega avatar Oct 24 '24 11:10 cromega