[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Fix xend restarting problem on NetBSD



Hello,

I'm no NetBSD expert either, it's the first time I've worked with init
scripts (and NetBSD/xen to tell the truth), so all I'm going to say
it's what I saw on other scripts or read on the Internet.

2011/7/18 Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>:
> Roger Pau Monnà writes ("Re: [Xen-devel] [PATCH] Fix xend restarting problem 
> on NetBSD"):
>> While searching for a man page to show you the check_pidfile options
>> I've found that you can also set a variable with the path to the
>> interpreter, so no need to expand the script.
>
> Thanks. ÂThis version is much nicer :-). ÂI still have a couple of
> questions. ÂPlease forgive my ignorance about NetBSD.
>
>> +PATH="${PATH}:${SBINDIR}"
>> +export PATH

This was done in start_cmd, so I through it would be better to do it
this way. I think it's necessary, because it was on the script
already, just moved the place where it was, to make the script
cleaner.

>
> Is SBINDIR not on the path for root's daemon processes ? ÂPerhaps we
> are doing something else wrong for NetBSD (perhaps we should be using
> libexec) ?
>
>> +command_interpreter=`head -n 1 ${command} | awk '{ print substr($0,3) }'`
>
> Why does it need to know that ? ÂI'm happy to believe that it does,
> but if so I would have expected to find that there was a ready-made
> utility on NetBSD that avoids having to open-code a rune like the one
> above.

Init scripts *should* detect that the daemon is a script and find it's
parser, but I don't know why NetBSD fails to detect it (haven't looked
at it to know where the problem is). Maybe there's a better or cleaner
way to do it, but I think that since xend is going to be deprecated
the fix should do for now.

>
>> The only strange thing is that I have to use SIGKILL to kill xend,
>> SIGTERM seems to do nothing
>
> That's probably a bug in the xend python code. ÂBut I don't expect
> we'll try to fix that at this point.

No problem, SIGKILL works fine.

>
>> (also xend spawns two processes, but I guess this is normal).
>
> Yes.
>
>> Attached an updated patch, with a simpler script.
>
> Thanks. ÂI think my comments so far are small enough (and xend
> sufficiently deprecated) that I've applied it. ÂIf you would like to
> further improve it in the light of my questions above please submit
> patches which will apply on top of that one.

I'm sorry that my comments my not be very informative, as I said
before I'm new to this stuff. I hope my reasons are good enough.

Thanks, Roger.

>
> Ian.
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.