=== marrusl is now known as marrusl_afk | ||
=== marrusl_afk is now known as marrusl | ||
JohnTeddy | http://paste.pound-python.org/show/5215/ | 07:44 |
---|---|---|
JohnTeddy | What is wrong with that script? | 07:44 |
JohnTeddy | I want an ssh tunnel to start, everytime my computer connects to a network. | 07:45 |
JohnTeddy | Since my chrome, pidgin, and everything else is setup with ssh tunneling/localhost socks proxy | 07:45 |
sneumann | Hi, I am currently creating upstart scripts for the batch queueing system gridengine. | 07:48 |
sneumann | The pre-start script needs NFS directories to be present, so I have | 07:48 |
sneumann | start on (local-filesystems and remote-filesystems and net-device-up IFACE!=lo) | 07:48 |
sneumann | and yet my /tmp/my-log output shows /vol/local/bin/register_sge.sh: No such file or directory | 07:48 |
sneumann | Script is on http://pastebin.com/QKnP8neJ anything obvious I missed ? | 07:48 |
JohnTeddy | sneumann: You know more about upstart than I do, what's wrong with my script? | 07:58 |
sneumann | what's the error ? | 08:01 |
sneumann | starting too early ? | 08:01 |
JohnTeddy | It just keeps restarting. | 08:01 |
JohnTeddy | I'm not sure why, I don't know how to debug it.. or I can't find the log. | 08:02 |
sneumann | remove the respawn for now, enable it once it works | 08:02 |
sneumann | I guess it is started too early, namely before networking to mybox can happen | 08:02 |
sneumann | try my http://pastebin.com/QKnP8neJ line exec > /tmp/my-log 2>&1 | 08:03 |
sneumann | Any Canonical people there ? | 08:03 |
sneumann | upstart.canonical.com is down | 08:03 |
JohnTeddy | I see, so gridengine is how you debug? | 08:05 |
sneumann | no thats a batch system, debugging is via sending stdout/stderr to /tmp/my-log | 08:05 |
JanC | about upstart.canonical.com being down: there is upstart.at now | 12:27 |
JanC | would be nice if the old site would refer to that though... | 12:28 |
JanC | JohnTeddy: first of all, the /etc/init/*.conf files are not scripts but configuration files ;) | 12:32 |
JanC | also, what is the post-start script supposed to do? | 12:32 |
JanC | and how does ssh login work? | 12:45 |
JohnTeddy | JanC: I am in Shanghai.. so I can't visit facebook, youtube, twitter, and a large selection of other websites. | 13:25 |
JohnTeddy | So everytime I login, I type that ssh command. It forms an ssh tunnel to a remote server in California I own (the company owns). So chrome and pidgin are setup to use localhost:1080 as a socks proxy. So I can visit whatever websites I want, and not worry about certain things being blocked, or being snooped on. | 13:25 |
JohnTeddy | The annoying this is typing that command a few times a day. | 13:26 |
JohnTeddy | Each time I move my laptop, say from one office to another. Or sometimes the great Chinese firewall will kill off my ssh tunnel, so I have to start it again. | 13:26 |
JohnTeddy | I'd li ke upstart to type this ssh command, as soon as I connect to the network, either over WiFi0 or eth0. I don't know anything about upstart, or programming in general.. so I'm struggling. | 13:27 |
JanC | do you need to type any password when connecting with ssh ? | 13:28 |
JohnTeddy | no, I have sftp'd my ssh DSA certificate to the remote server in remote:/home/me/.ssh/known_hosts | 13:28 |
JohnTeddy | So if I do 'ssh john@remote', I just get a shell with no password prompt. | 13:28 |
JanC | so you haven't encrypted your private key... | 13:29 |
JanC | okay, now one problem is that upstart runs ssh as root, and root probably doesn't have a private key that you uploaded... | 13:30 |
JohnTeddy | mmm, my disk is encrypted. | 13:30 |
JohnTeddy | I am using cryptsetup, so when I boot my system.. busybox pops up.. and asks for a key before my large file system can be mounted (which included .ssh). | 13:31 |
JohnTeddy | So I don't believe my private key is easily accessible, and is not shared with anyone. | 13:31 |
JohnTeddy | JanC: hmm, I see. | 13:31 |
JohnTeddy | I don't want to run ssh as root anyway, that seems like a bad idea. | 13:31 |
JohnTeddy | Can I just manually do 'su john; ssh blah blah;'? | 13:32 |
JanC | you can do su -c "ssh blah blah" john | 13:33 |
JanC | I think you also shouldn't use the -f option | 13:37 |
JanC | because when it forks to the background, upstart will probably think it exits | 13:38 |
JohnTeddy | I see. | 13:39 |
JohnTeddy | JanC: So besides those changes, the script should work? | 13:39 |
JohnTeddy | I googled for this ping command, it seemslike a better condition to be met, relative to the interface starting up. | 13:39 |
JanC | like I said, it's not a script but a configuration file ;) | 13:40 |
JanC | JohnTeddy: the problem is that it gets run *after* ssh | 13:41 |
JanC | so if you have no connection, ssh will always be run | 13:42 |
JanC | and it will probably fail because early during boot there is no connection, exit with an error, get restarted by upstart, repeat until there is a connection--then you test if there is a connection | 13:43 |
JanC | so it should be a pre-start script really | 13:47 |
JanC | and it's probably better to make "start on" depend on a network device comming up | 13:47 |
sneumann | hi, I am still trying to create an upstart job for the gridengine daemon, facing two problems: | 15:53 |
sneumann | 1) my job is not executed upon booting | 15:54 |
sneumann | 2) service gridengine stop simply hangs, and I don't know what it is waiting for. | 15:54 |
sneumann | The job is started with "expect fork", but I also tried "expect daemon" | 15:55 |
sneumann | Any clues ? The full script is at http://pastebin.com/QKnP8neJ | 15:56 |
sneumann | I tried "start on (startup and remote-filesystems)" but it is not triggered | 15:57 |
Keybuk | it strikes me that the Upstart documentation is sorely missing the page from the Make documentation that explains that there are really two separate syntaxes in the files | 22:22 |
Keybuk | upstart and shell | 22:22 |
ion | heh | 22:24 |
JanC | or that they are configuration files that contain snippets of shell code ;) | 22:25 |
ion | A lot of people do seem to talk about Upstart “scripts”. That might indicate they have the wrong impression of the semantics of the job definitions. | 22:27 |
Keybuk | indeed | 22:29 |
ion | Of course, nothing would prevent a very similar syntax that is in fact a DSL in a scripting language. | 22:30 |
JanC | you can say that about HTML too ;) | 22:37 |
ion | of course | 22:37 |
ion | (html (head (title "foo") (script (on-click 'foo (alert "bar")))) (body (h1 "o hai") (p (id 'foo) "quux"))) | 22:38 |
ion | Web scripting in the same language as the markup of content, anyone? :-P | 22:39 |
JanC | Mozilla configuration files are sort of JavaScript scripts too ;) | 22:40 |
JanC | Mozilla/Firefox/etc. | 22:41 |
JanC | or were (maybe not anymore nowadays that they have SQLite?) | 22:41 |
ion | prefs.js still exists. | 22:42 |
=== robbiew is now known as robbiew_ |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!