pressly / sup

Super simple deployment tool - think of it like 'make' for a network of servers
https://pressly.github.io/sup
MIT License
2.48k stars 178 forks source link

ver 0.4 - "script" command exception #93

Closed tpaz closed 8 years ago

tpaz commented 8 years ago

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x20 pc=0x4b81e0]

goroutine 45 [running]: panic(0x6fd580, 0xc82000e130) /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6 github.com/pressly/sup.(_SSHClient).WriteClose(0xc8200d4000, 0x0, 0x0) /home/user/dev/go/src/github.com/pressly/sup/ssh.go:273 +0x40 github.com/pressly/sup.(_Stackup).Run.func4(0xc8200f0530, 0x1, 0x1, 0xc82002c040, 0xc8200e88c0) /home/user/dev/go/src/github.com/pressly/sup/sup.go:180 +0x19b created by github.com/pressly/sup.(*Stackup).Run /home/user/dev/go/src/github.com/pressly/sup/sup.go:182 +0x11cf

Sup file related section: run_some_script: desc: bla bla upload:

when using run command with upload the script runs...

VojtechVitek commented 8 years ago

I'll take a look later this week, feel free to remind me.

In the meantime, can you try removing "upload", since you're using script directly?

tpaz commented 8 years ago

yep. did, the exception was somehow gone. it works fine now :) I had another annoying issue irrelevant to this report, running a command in the background. it seems sup is running bash -c (correct?) to execute remote commands, and I couldn't understand why it was killing commands executed with & (move to bg). I even used daemonize / start-stop-daemon tools to try run my process as daemon to work-around the & issue. it didn't work either. eventually, I resolved it by wrapping the process in a script that runs whatever I wanted in the bg (running some benchmark tool in parallel to some tuning tool...) while adding "wait" in the end of the script so that sup will not fail on it. that worked nice so far.

VojtechVitek commented 8 years ago

Can you create new Github issue for the other thing, please?

tpaz commented 8 years ago

sure