-
kurtjx
man i can't do it
-
i would but wife is passed out basically sick from insomnia
-
ruaok
thanks for trying. I appreciate it. good luck with the one woman horror show. :)
-
kurtjx
i can't just dip - that would be way too shady
-
well there's two actually if you count my wife ;-)
-
ruaok
lol
-
thankfully she's sleeping. :)
-
ocharles
ruaok: do we have a running nginx on hobbes?
-
ruaok
we do not. we need to bug djce about that today.
-
want me to push my stats branch so you can keep playing with it?
-
ocharles could copy the lingling one
-
might be a good starting point.
-
ruaok pedals to the office
-
lfranchi
ok we gotta head out
-
his email is still not here...
-
when he gets back, can someone ask him to text or call 781-249-1362? thanks
-
alastairp: kurtjx ^
-
alastairp
sweet
-
ocharles
Is there anyway to check if a file is under debian management?
-
like the inverse of dpkg -L ?
-
alastairp
-S
-
ocharles
ta
-
ruaok joined the channel
-
ruaok
lfranchi: mail arrive
-
?
-
nikki
[19:39] lfranchi: when he gets back, can someone ask him to text or call 781-249-1362? thanks
-
djce joined the channel
-
ruaok: that was for you
-
ruaok
thanks nikki.
-
nikki: are any of the proposed meeting times acceptable to you?
-
ruaok waves at djce
-
nikki
all of them
-
djce
%T!
-
ruaok
nikki: thanks!
-
djce: we have two things for you.
-
one I got two backup disk reminders. one for sex, one for drugs.
-
which one should I heed?
-
djce
Ah. Should be SEX, shouldn't it? It's because I ran the script twice not once.
-
and the script says, "if it's Monday, rotate the disks".
-
ocharles
djce: while you're here, how do I setup the "supervise" directory in /usr/local/mb_server-fastcgi?
-
ruaok
SEX sounds right.
-
djce: and over to ocharles for the second issue.
-
djce
ocharles: ignore it.
-
it's created automatically.
-
ocharles
djce: it won't let me start the service without it
-
MBChatLogger
-
ruaok
we need to expose hobbes port 80 and change
test.mb.org to point from lingling to hobbes.
-
ocharles
but I'm probably doing it wrong :)
-
I've added the initscript and the service run file to git
-
djce
Is this on hobbes?
-
ocharles
yea
-
djce looks
-
see /usr/local/mb_server-fastcgi and the same /etc files as lingling
-
I've tried to copy the layout and links
-
djce
Roughly the way to set up a daemontools service is:
-
- choose a directory, mkdir it (usually supervise will run as root, so do all this as root)
-
mkdir "log"
-
create executables called "run" and "log/run"
-
(one runs the service, one runs the logger to handle the service's stdout)
-
ocharles
ah, missed the logger, but ok
-
djce
Symlink the service dir into the svscan directory, e.g. "ln -s $PWD /etc/service/"
-
Wait up to 5 seconds.
-
Service starts.
-
done.
-
If you want the service to be stopped by default (e.g. to be started by something else, perhaps something in init.d), "touch ./down"
-
ocharles
ok, that's all pretty simple
-
but I wonder what's missing that's stopping the fastcgi workers to spawn now
-
djce
Is it meant to be running right now?
-
ocharles
well, I'd like it to :)
-
Then I was going to use curl against localhost to make sure it was all working, then we can expose it
-
djce
The fact that daemontools isn't installed on hobbes yet :-)
-
ocharles
I just installed that though I thought
-
hrm.
-
djce
ah, /me checks...
-
ocharles
yea, it's installed
-
djce
daemontools-run
-
Ubuntu splits it into two packages: daemontools == just the toolset, daemontools-run == actually runs it.
-
ocharles
ah
-
ok, got run - do I need to start a service?
-
djce
hmm, not sure. /me reads docs
-
ocharles
it only gives the update-service binary it seems
-
djce
"sudo start svscan" would be my guess
-
(or reboot :-)
-
ocharles
heh
-
no errors now
-
djce
not working though...
-
ps -C readproctitle ww
-
ocharles
mm, no logs either
-
djce
You have no "run" script yet
-
and log/run needs chmod +x
-
ocharles
oops, it's called mb_server
-
djce
Often a good idea to test by hand first:
-
ocharles
oh wait no, I didn't link it
-
djce
svc -d . log
-
cd log ; echo test | ./run
-
cd ..
-
./run
-
^C
-
then when it all looks good, svc -u . log
-
ocharles
ok
-
now to figure out how this local::lib stuff will work :)
-
alastairp
<3 local lib
-
ocharles
awesome eh?
-
alastairp
eval `perl -Mlocal::lib`
-
done/done
-
ocharles
not quite here though...
-
alastairp
doh
-
ocharles
local::lib is setup as the musicbrainz user
-
I can't seem to get it to import environment variables into the correct environment in our runscript
-
alastairp
ah, yeah
-
can you put it in .bash* ?
-
ocharles
roots?
-
we have a run script and I tried putting it in there, but it doesn't seem to do anything
-
"eval $(perl -I/home/musicbrainz/perl5/lib/perl5 -Mlocal::lib)"
-
alastairp
you start it as root and it drops to teh mb user?
-
ocharles
yea, in an exec block
-
but that eval is outside the exec
-
maybe that's why?
-
alastairp
hrm
-
yes
-
ocharles
it's also before setuidgid
-
alastairp
you need the environment inside the setuid
-
I think
-
maybe you can pass an environment parameter?
-
ocharles
djce: halps! :)
-
djce reads
-
can you see /usr/local/mb_server-fastcgi/run?
-
alastairp
gist the startup script?
-
ocharles
-
setuidgid: fatal: unable to run eval: file does not exist
-
djce
ocharles: try something like:
-
exec setuidgid musicbrainz bash -c '
-
eval foo
-
whatever
-
set up stuff
-
exec fastcgi
-
'
-
alastairp
yeah
-
djce
or, create a script under mb_server which assumes only that the uid and cwd is correct, then sets up the env and execs fastcgi.
-
alastairp
or, you may be able to get rid of the evan $()
-
er, the eval
-
since then it'll be like going
-
FOO=1 echo $FOO
-
djce
I've addressed this before by creating a script called (say) with-local-lib
-
which does stuff like the eval, then execs "$@"
-
alastairp
you just set the environment for the fgci script
-
ocharles
I think we'll need to do that
-
now local::Lib is trying to create /root/perl5 as the musicbrainz user, which doesn't work either
-
djce
then you write: setuidgid foo with-local-lib fastcgi.pl ...
-
don't assume $HOME is set up.