Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[einit] versions 0.14.0.500 - 0.15.2 -- happy new year
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 16, 17, 18, 19  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sun Jan 28, 2007 10:21 pm    Post subject: Reply with quote

mdeininger wrote:
btw, might it be a problem of the daemon not working as it should because of a missing subdirectory below /var/run/ ? i see a lot of daemons add their own subdirectory to that...
naa, because in the prepare section I still take take of that....

EDIT: the pid/breakage is fixed... thanks!
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Sun Jan 28, 2007 11:18 pm    Post subject: Reply with quote

rmh3093 wrote:
mdeininger wrote:
btw, might it be a problem of the daemon not working as it should because of a missing subdirectory below /var/run/ ? i see a lot of daemons add their own subdirectory to that...
naa, because in the prepare section I still take take of that....

EDIT: the pid/breakage is fixed... thanks!

kk, excellent -- sorry for my flawed logic earlier then ;)

experienced any lockups with shell modules/fsck/etc?
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sun Jan 28, 2007 11:25 pm    Post subject: Reply with quote

mdeininger wrote:
rmh3093 wrote:
mdeininger wrote:
btw, might it be a problem of the daemon not working as it should because of a missing subdirectory below /var/run/ ? i see a lot of daemons add their own subdirectory to that...
naa, because in the prepare section I still take take of that....

EDIT: the pid/breakage is fixed... thanks!

kk, excellent -- sorry for my flawed logic earlier then ;)

experienced any lockups with shell modules/fsck/etc?


yeah actually, it not the same module every time but... sometime dbus wont start and then next time mount/local will have a cow and then next time time till be be fine, then the time after that alsa will fail....
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
swe
n00b
n00b


Joined: 07 Aug 2002
Posts: 6
Location: Germany

PostPosted: Mon Jan 29, 2007 10:34 am    Post subject: Problem starting samba with einit... Reply with quote

Hi,

just downloaded and installed einit - the difference between init and einit is just overwhelming.
I want to use einit to start my vdr box (using init it takes nearly 2 minutes to get it up and running,
using einit now it just takes around 40 seconds).
I already embedded my start script for vdr and (surprise): it does what it's meant to do - vdr starts!

Now I found one little problem that I can't solve: my samba server isn't started.
I tried adding smbd, nmdb to my services line in local.xml, also I tried samba - no smbd daemon exists
after boot..... is there some kind of error log from einit I could look into?

Anyone managed to get samba started? Any help would be greatly appreciated....

Kind regards,

Stephan
Back to top
View user's profile Send private message
BastianBalthazarBux
Retired Dev
Retired Dev


Joined: 10 Dec 2004
Posts: 78

PostPosted: Mon Jan 29, 2007 10:57 am    Post subject: Reply with quote

mdeininger wrote:

BastianBalthazarBux:

where exactly does it stop doing things? i mean, are there any [ ENAB ]s visible and it just "doesn't continue", or are there any [ ... ] that won't go ahead?

btw, tty1 is NOT initialised by default, to log into a console, you need to press alt+f2 or similar.


Using tty1 console completely tilt my box since there is already X running on that one, remember, this is a vserver, it's NOT a completely emulated box like vmware.

tryed svn version this morning (rev 704)
It's a bit difficult to debug this one, the only thing I've been able to extract is the output from:
strace einit --override-init-check
Code:

time(NULL)                              = 1170067461
time(NULL)                              = 1170067461
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 0) = 0x40000000
mprotect(0x40000000, 4096, PROT_NONE)   = 0
clone(child_stack=0x40800280, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x408009f0, tls=0x40800960, child_tidptr=0x408009f0) = 32028
time(NULL)                              = 1170067461
write(2, " >> [+1s] scheduling startup swi"..., 39 >> [+1s] scheduling startup switches.
) = 39
time(NULL)                              = 1170067461
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 0) = 0x40801000
mprotect(0x40801000, 4096, PROT_NONE)   = 0
clone(child_stack=0x41001280, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x410019f0, tls=0x41001960, child_tidptr=0x410019f0) = 32029
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 0) = 0x41002000
mprotect(0x41002000, 4096, PROT_NONE)   = 0
clone(child_stack=0x41802280, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x418029f0, tls=0x41802960, child_tidptr=0x418029f0) = 32030
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 0) = 0x41803000
mprotect(0x41803000, 4096, PROT_NONE)   = 0
clone(child_stack=0x42003280, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x420039f0, tls=0x42003960, child_tidptr=0x420039f0) = 32031
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 0) = 0x42004000
mprotect(0x42004000, 4096, PROT_NONE)   = 0
clone(child_stack=0x42804280, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x428049f0, tls=0x42804960, child_tidptr=0x428049f0) = 32032
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 0) = 0x42805000
mprotect(0x42805000, 4096, PROT_NONE)   = 0
clone(child_stack=0x43005280, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x430059f0, tls=0x43005960, child_tidptr=0x430059f0) = 32033
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 0) = 0x43006000
mprotect(0x43006000, 4096, PROT_NONE)   = 0
clone(child_stack=0x43806280, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x438069f0, tls=0x43806960, child_tidptr=0x438069f0) = 32034
futex(0x5555556665a0, FUTEX_WAIT, 0, NULL


gdb complain that it's not a fuction from einit when trying to backtrace or deassemble it.

P.S. /me hate futexes
Back to top
View user's profile Send private message
f0rk
Apprentice
Apprentice


Joined: 15 Nov 2004
Posts: 273
Location: Moscow

PostPosted: Mon Jan 29, 2007 12:19 pm    Post subject: Reply with quote

It seems like umount bug solved! ;)
But I can see sometimes "mkdir -p /dev/shm" hang... :(
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Mon Jan 29, 2007 1:43 pm    Post subject: Re: Problem starting samba with einit... Reply with quote

swe wrote:
Hi,

just downloaded and installed einit - the difference between init and einit is just overwhelming.
I want to use einit to start my vdr box (using init it takes nearly 2 minutes to get it up and running,
using einit now it just takes around 40 seconds).
I already embedded my start script for vdr and (surprise): it does what it's meant to do - vdr starts!

Now I found one little problem that I can't solve: my samba server isn't started.
I tried adding smbd, nmdb to my services line in local.xml, also I tried samba - no smbd daemon exists
after boot..... is there some kind of error log from einit I could look into?

Anyone managed to get samba started? Any help would be greatly appreciated....

Kind regards,

Stephan

well, the output on tty11 and tty12 is pretty much anything we have, not sure why samba would cough up tho -- not using it, i think ryan made the samba modules?

btw, could you post the vdr xml-module somewhere? i'm using a very weird one on my dad's pvr and i hoped to replace it sometime soon :)

BastianBalthazarBux:
oh, okay, ... well, you could disable the use of ansi codes and enable tty1, that should work on your vserver then...

check the <enable-ttys /> line of your default mode and make it contain tty1-regular (just modify one of the other entries) and modify the variable "<use-ansi-codes b="true" />" to be false, then you should get both a tty on tty1 and output on the same line...

f0rk wrote:
It seems like umount bug solved! ;)
But I can see sometimes "mkdir -p /dev/shm" hang... :(

yeah, that hang is... mean... i think i might've found a way around it tho...
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Jan 29, 2007 2:21 pm    Post subject: Reply with quote

yeah the samba module is not behaving lately, i will look into that today
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Mon Jan 29, 2007 2:49 pm    Post subject: Reply with quote

okay, THIS (-705) should've finally fixed the piping problem now :D (hopefully)...
send me a cry of agony and pain if you still experience "hangs" when executing things (like the mkdir ...)
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Jan 29, 2007 3:51 pm    Post subject: Reply with quote

mdeininger wrote:
okay, THIS (-705) should've finally fixed the piping problem now :D (hopefully)...
send me a cry of agony and pain if you still experience "hangs" when executing things (like the mkdir ...)


AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!

hows that.... when i do ps -A all i see is defunct processes, just about every prepare failed
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Mon Jan 29, 2007 3:56 pm    Post subject: Reply with quote

rmh3093 wrote:
mdeininger wrote:
okay, THIS (-705) should've finally fixed the piping problem now :D (hopefully)...
send me a cry of agony and pain if you still experience "hangs" when executing things (like the mkdir ...)


AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!

hows that.... when i do ps -A all i see is defunct processes, just about every prepare failed

foo~~
what now with -706?
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Jan 29, 2007 4:03 pm    Post subject: Reply with quote

mdeininger wrote:
rmh3093 wrote:
mdeininger wrote:
okay, THIS (-705) should've finally fixed the piping problem now :D (hopefully)...
send me a cry of agony and pain if you still experience "hangs" when executing things (like the mkdir ...)


AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!

hows that.... when i do ps -A all i see is defunct processes, just about every prepare failed

foo~~
what now with -706?


i will let you know in a few min....

by the way... why do you manually change the buildnumber in the svn repo... isnt there a commit bot that could do that automatically for each commit as well at put the commit comment in the changelog?

EDIT: weirdness in -706 everything booted fine and all my services were up and working like they should... when I do ps -A there are still lots of defunct processes
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Mon Jan 29, 2007 4:16 pm    Post subject: Reply with quote

rmh3093 wrote:
by the way... why do you manually change the buildnumber in the svn repo... isnt there a commit bot that could do that automatically for each commit as well at put the commit comment in the changelog?

i'm not sure, i thought that i could do that with a repo-side script but sf.net won't let me modify those. then i thought i might use the data in .svn to get the build number from the configure script, but i don't see these directories after the ebuild extracts them.
so, that's why i made that little "commit"-script in trunk/einit :-/

rmh3093 wrote:
EDIT: weirdness in -706 everything booted fine and all my services were up and working like they should... when I do ps -A there are still lots of defunct processes

yeah, i just booted into that myself and experienced the same, but it seems to be fixed in -707 (which i just booted into as well :) ) got no hangs and no defunct processes...
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Jan 29, 2007 4:59 pm    Post subject: Reply with quote

mdeininger wrote:
rmh3093 wrote:
by the way... why do you manually change the buildnumber in the svn repo... isnt there a commit bot that could do that automatically for each commit as well at put the commit comment in the changelog?

i'm not sure, i thought that i could do that with a repo-side script but sf.net won't let me modify those. then i thought i might use the data in .svn to get the build number from the configure script, but i don't see these directories after the ebuild extracts them.
so, that's why i made that little "commit"-script in trunk/einit :-/

rmh3093 wrote:
EDIT: weirdness in -706 everything booted fine and all my services were up and working like they should... when I do ps -A there are still lots of defunct processes

yeah, i just booted into that myself and experienced the same, but it seems to be fixed in -707 (which i just booted into as well :) ) got no hangs and no defunct processes...


yay!!! seems like everything is 99% good, the only problem I have now is for daemons that fork that I write a shell modules need to be written like this:
"enable="pexec-options no-pipe; command &amp;" with out the no-pipe and the &amp; when I boot up einit and start the shell-module instead of seeing the process that I want start with ps -A i see bash instead.... in the example below:
Code:
    <shell id="shell-apache2"
     name="httpd - Apache Hypertext Transfer Protocol Server"
     provides="apache2"
     requires="mount/critical:net-lo"
     pid="/var/run/apache2.pid"
     opts="-D DEFAULT_VHOST"
     serverroot="/usr/lib/apache2"
     configfile="/etc/apache2/httpd.conf"
     prepare="[ ! -e /var/log/apache2 ] &amp;&amp; mkdir /var/log/apache2"
     enable="pexec-options no-pipe; apache2 ${opts} -d ${serverroot} -f ${configfile} -k start&amp;"
     disable="killall -9 -q apache2"
     restart="yes" />

if I were to remove the no-pipe and &amp; I would boot and start apache2 and I would get [ENAB] but is would show "bash" and obviously apache2 would not be running.... but the above way works for now
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Jan 29, 2007 6:35 pm    Post subject: Reply with quote

i've for more comments magnus :wink:

1) i think this has been mentioned before, but can we get some sort of feedback (on stdout) from einit-control to let us know if enable/disable succeeded or if update configuration worked, one can easily misspell a command and would never catch it, not to mention it would just make people happy i think

2) what is up with reset= and restart= .... man einit-control says most modules dont implement these so I am a little confused, what is the difference between the two? I dont know if this is the case but I would like it restart is not define and someone calls einit-control rc <mod> retart to execute a (disable/enable) or execute restart= if it is defined. With that being said the only think that I can think of using reset for would be to mimic "/etc/init.d/<mod> zap" which was my 3rd comment

3) if there isnt already is there a way to reset the state of a module if it fails (with out rebooting) right now if a module goes to [ FAIL ] I cant always restart it... is there a way to set it to [ ---- ] or something so that it could re restarted
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Mon Jan 29, 2007 8:04 pm    Post subject: Reply with quote

rmh3093 wrote:
yay!!! seems like everything is 99% good, the only problem I have now is for daemons that fork that I write a shell modules need to be written like this:
"enable="pexec-options no-pipe; command &amp;" with out the no-pipe and the &amp; when I boot up einit and start the shell-module instead of seeing the process that I want start with ps -A i see bash instead.... in the example below:
Code:
    <shell id="shell-apache2"
     name="httpd - Apache Hypertext Transfer Protocol Server"
     provides="apache2"
     requires="mount/critical:net-lo"
     pid="/var/run/apache2.pid"
     opts="-D DEFAULT_VHOST"
     serverroot="/usr/lib/apache2"
     configfile="/etc/apache2/httpd.conf"
     prepare="[ ! -e /var/log/apache2 ] &amp;&amp; mkdir /var/log/apache2"
     enable="pexec-options no-pipe; apache2 ${opts} -d ${serverroot} -f ${configfile} -k start&amp;"
     disable="killall -9 -q apache2"
     restart="yes" />

if I were to remove the no-pipe and &amp; I would boot and start apache2 and I would get [ENAB] but is would show "bash" and obviously apache2 would not be running.... but the above way works for now


i think i'll add code so that daemon modules can work properly with forking/pidfile daemons, that should fix it then, no? ;)

rmh3093 wrote:
i've for more comments magnus :wink:
keep 'em comin' ;)

rmh3093 wrote:
1) i think this has been mentioned before, but can we get some sort of feedback (on stdout) from einit-control to let us know if enable/disable succeeded or if update configuration worked, one can easily misspell a command and would never catch it, not to mention it would just make people happy i think


ah, that feedback should be on, actually, as far as it will go... including command output? i mean, that was what the piping was for :)

rmh3093 wrote:
2) what is up with reset= and restart= .... man einit-control says most modules dont implement these so I am a little confused, what is the difference between the two? I dont know if this is the case but I would like it restart is not define and someone calls einit-control rc <mod> retart to execute a (disable/enable) or execute restart= if it is defined. With that being said the only think that I can think of using reset for would be to mimic "/etc/init.d/<mod> zap" which was my 3rd comment


well, i think originally i wanted reset= to be "a hard restart" (kill, reload) and restart= to be "the soft route" (shut module down, get it up normally...)

rmh3093 wrote:
3) if there isnt already is there a way to reset the state of a module if it fails (with out rebooting) right now if a module goes to [ FAIL ] I cant always restart it... is there a way to set it to [ ---- ] or something so that it could re restarted


zap's going to be quite a good idea, at least if i get "regular" daemons going the way i want :)
i think there's no way to really force something off yet... well, you could disable its service and enable it again, and the disable="" and cleanup="" commands should make sure to always succeed, but forcing a status on a module is definitely not a bad idea ... :)
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
swe
n00b
n00b


Joined: 07 Aug 2002
Posts: 6
Location: Germany

PostPosted: Mon Jan 29, 2007 8:57 pm    Post subject: Strange behaviour Reply with quote

Hello Deininger,

facing some issues (see my last post) I just upgraded to the last svn version. I know have
been able to tweak the start of samba.... but now I face to new issues:
- I just can't get einit to do alsactl (even if I explicitly call it in local.xml)
Right now, I have to do it manually to get my sound started
- On Power Down oder Power Reset einit hangs...

Also weird is that on startup sometimes the systems just hangs forever but after starting again
everything falls into place...

Nevertheless having seen the boot time I don't want to go back to sysvinit... no way! ;-)

Go ahead and einit will be a masterpiece (even if documentation right now is a bit spare)....

Kind regards,

Stephan
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Jan 29, 2007 9:08 pm    Post subject: Re: Strange behaviour Reply with quote

swe wrote:
Hello Deininger,

facing some issues (see my last post) I just upgraded to the last svn version. I know have
been able to tweak the start of samba.... but now I face to new issues:
- I just can't get einit to do alsactl (even if I explicitly call it in local.xml)
Right now, I have to do it manually to get my sound started
- On Power Down oder Power Reset einit hangs...

Also weird is that on startup sometimes the systems just hangs forever but after starting again
everything falls into place...

Nevertheless having seen the boot time I don't want to go back to sysvinit... no way! ;-)

Go ahead and einit will be a masterpiece (even if documentation right now is a bit spare)....

Kind regards,

Stephan


I need to look at the "alsasound" module as well... i had noticed that wasnt working lately
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Jan 29, 2007 9:19 pm    Post subject: Reply with quote

mdeininger wrote:
rmh3093 wrote:
1) i think this has been mentioned before, but can we get some sort of feedback (on stdout) from einit-control to let us know if enable/disable succeeded or if update configuration worked, one can easily misspell a command and would never catch it, not to mention it would just make people happy i think


ah, that feedback should be on, actually, as far as it will go... including command output? i mean, that was what the piping was for :)

no i dont care about the feedback from the module it self, i mean a simple:
Code:
Redman ~ # einit-control rc apache2 enable
 * Enabling apache2 ...                                                                                                     [ !! ]
Code:
Redman ~ # einit-control update configuration
 * Updating configuration ...                                                                                               [ OK ]

and 'einit-control update configuration' should automatically do a 'einit --wtf' first if it doesnt already

mdeininger wrote:
rmh3093 wrote:
2) what is up with reset= and restart= .... man einit-control says most modules dont implement these so I am a little confused, what is the difference between the two? I dont know if this is the case but I would like it restart is not define and someone calls einit-control rc <mod> retart to execute a (disable/enable) or execute restart= if it is defined. With that being said the only think that I can think of using reset for would be to mimic "/etc/init.d/<mod> zap" which was my 3rd comment


well, i think originally i wanted reset= to be "a hard restart" (kill, reload) and restart= to be "the soft route" (shut module down, get it up normally...)

rmh3093 wrote:
3) if there isnt already is there a way to reset the state of a module if it fails (with out rebooting) right now if a module goes to [ FAIL ] I cant always restart it... is there a way to set it to [ ---- ] or something so that it could re restarted


zap's going to be quite a good idea, at least if i get "regular" daemons going the way i want :)
i think there's no way to really force something off yet... well, you could disable its service and enable it again, and the disable="" and cleanup="" commands should make sure to always succeed, but forcing a status on a module is definitely not a bad idea ... :)

im not talking about forcing something off... im talking about when a module fails and you have already killed of the program with cli commands trying to restart a failed module dosent always seem to work even after and update config, the "zap" idea is to reset the state einit thinks that the module is in
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Mon Jan 29, 2007 9:22 pm    Post subject: Re: Strange behaviour Reply with quote

rmh3093 wrote:
swe wrote:
Hello Deininger,

facing some issues (see my last post) I just upgraded to the last svn version. I know have
been able to tweak the start of samba.... but now I face to new issues:
- I just can't get einit to do alsactl (even if I explicitly call it in local.xml)
Right now, I have to do it manually to get my sound started
- On Power Down oder Power Reset einit hangs...

Also weird is that on startup sometimes the systems just hangs forever but after starting again
everything falls into place...

Nevertheless having seen the boot time I don't want to go back to sysvinit... no way! ;-)

Go ahead and einit will be a masterpiece (even if documentation right now is a bit spare)....

Kind regards,

Stephan


I need to look at the "alsasound" module as well... i had noticed that wasnt working lately


indeed, i noticed issues on my vdr box as well...
well, need to update that to the latest version of stuff anyway (problems with wlan right now, did we do an rt2500 wpa-psk/aes module template yet? i think there's one on that box...

Stephan:
you may call me by my first name: Magnus :D

what exactly did you mean with "hang", and, which version are you using? (post the output of einit --wtf, and maybe also your local.xml (+ einit.xml if you modified that :) )

rmh3093 wrote:
Code:
Redman ~ # einit-control rc apache2 enable
 * Enabling apache2 ...                                                                                                     [ !! ]
Code:
Redman ~ # einit-control update configuration
 * Updating configuration ...                                                                                               [ OK ]

true, the current output is rather cryptic... :
Code:

helios mdeininger # einit-control rc clock disable
Set the system clock using the hardware clock: disabling
Set the system clock using the hardware clock: /sbin/hwclock --systohc ${configuration_program_options_hwclock};               /bin/true

helios mdeininger # einit-control rc clock enable
Set the system clock using the hardware clock: enabling
Set the system clock using the hardware clock: /sbin/hwclock --hctosys ${configuration_program_options_hwclock}
Set the system clock using the hardware clock: success


that's cause i only improvised that using the old non-ansi feedback... i'll try to make it look close to what you suggested :)

rmh3093 wrote:
and 'einit-control update configuration' should automatically do a 'einit --wtf' first if it doesnt already

good idea, actually... and the output should go right to the calling terminal, going to add that asap :)

rmh3093 wrote:
im not talking about forcing something off... im talking about when a module fails and you have already killed of the program with cli commands trying to restart a failed module dosent always seem to work even after and update config, the "zap" idea is to reset the state einit thinks that the module is in

well, that's kind of what i meant, it's just been late and scheme screwed my mind ;)
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Jan 29, 2007 9:31 pm    Post subject: Re: Strange behaviour Reply with quote

mdeininger wrote:
rmh3093 wrote:
swe wrote:
Hello Deininger,

facing some issues (see my last post) I just upgraded to the last svn version. I know have
been able to tweak the start of samba.... but now I face to new issues:
- I just can't get einit to do alsactl (even if I explicitly call it in local.xml)
Right now, I have to do it manually to get my sound started
- On Power Down oder Power Reset einit hangs...

Also weird is that on startup sometimes the systems just hangs forever but after starting again
everything falls into place...

Nevertheless having seen the boot time I don't want to go back to sysvinit... no way! ;-)

Go ahead and einit will be a masterpiece (even if documentation right now is a bit spare)....

Kind regards,

Stephan


I need to look at the "alsasound" module as well... i had noticed that wasnt working lately


indeed, i noticed issues on my vdr box as well...
well, need to update that to the latest version of stuff anyway (problems with wlan right now, did we do an rt2500 wpa-psk/aes module template yet? i think there's one on that box...

Stephan:
you may call me by my first name: Magnus :D

what exactly did you mean with "hang", and, which version are you using? (post the output of einit --wtf, and maybe also your local.xml (+ einit.xml if you modified that :) )


i was trying to make a wpa_supplicant template but got stuck, Magnus that im sure you make make in 2 seconds.... for some reason i have no luck when i comes to using variables in einit.xml.... here is what I had so far... it didnt work last time i tried
Code:
   <interfaces>
     .....
    <eth1 driver="wext" config="/etc/wpa_supplicant/wpa_supplicant.conf" />
   </interfaces>

    <shell-template id="template-shell-net-wpasupplicant"
     name="Network (${interface}, wpa_supplicant)"
     provides="net-${interface}"
     requires="modules"
     enable="wpa_supplicant -D ${configuration_network_interfaces_${interface}_driver} -i ${interface} -c ${cnfiguration_network_interfaces_${interface}_config} -Bw;
             wpa_cli -B -i ${interface}"
     disable="ifconfig ${interface} down"
     variables="configuration-network-interfaces-${interface}/.*" />

    <shell id="shell-net-eth1-wpasupplicant"
     based-on-template="template-shell-net-wpasupplicant"
     interface="eth1" />

_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.


Last edited by rmh3093 on Mon Jan 29, 2007 9:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
swe
n00b
n00b


Joined: 07 Aug 2002
Posts: 6
Location: Germany

PostPosted: Mon Jan 29, 2007 9:34 pm    Post subject: Strange behaviour Reply with quote

Hi Magnus,

sounds much better now (even more if I see in your signature that your located in Tübingen - I'm just a
few miles away in Reutlingen ;-) )....

indeed, i noticed issues on my vdr box as well...

Here come's my local.xml (didn't change anything in einit.xml):

<?xml version="1.0" encoding="UTF-8" ?>
<einit>
<!-- you will need to modify this file -->
<!-- <core>
<commands>
<include>
<directory s="local" />
</include>
</commands>
</core> -->

<configuration>
<system>
<swap device="/dev/hda2" affinity="0" />
</system>

<network>
<hostname s="digitainer" />
<domainname s="local" />
</network>

<peripherals>
<keyboard layout="de-latin1-nodeadkeys" />
</peripherals>

<kernel>
<modules>
<usb s="" />
<bluetooth s="" />
<hid s="" />
<sound s="snd-via82xx" />
<sensors s="i2c-isa eeprom w83627hf" />
<dvb s="saa7134-dvb budget-ci stv0299" />
<ethernet s="" />
<arbitrary s="evdev button thermal sd_mod sg lirc_mceusb" />
</modules>

<module>
</module>
</kernel>

<storage>
<!-- fstab -->
<fstab>
<source s="configuration:legacy" />
</fstab>
</storage>

<compatibility>
<!-- utmp/wtmp management: you'll need to enable the utmp service
BUG: not implemented, yet -->
<sysv utmp="yes" wtmp="yes">

<!-- enable the initctl service to make einit try and emulate standard sysv
initctl commands, i.e. make the shutdown/reboot/halt commands work - this
node is set by default, but the service is not. -->
<initctl s="/dev/initctl" i="0600" />
</sysv>
</compatibility>
</configuration>

<services>
<!-- both of the following would define a net-eth1 module, one using dhcp, the o
ther with a static address from above -->
<virtual>
<module>
<shell id="shell-net-eth1-dhcp"
based-on-template="template-shell-net-dhcp"
interface="eth1" />
<daemon id="daemon-dbus" name="D-BUS system messagebus" provides="dbus" requ
ires="mount/critical" prepare="rm -f /var/run/dbus.pid /var/run/dbus/*" cleanup=
"rm -f /var/run/dbus.pid" command="/usr/bin/dbus-daemon --system" restart="yes"/
>
<daemon id="daemon-hald" name="Hardware Abstraction Layer Daemon" provides="
hald" requires="mount/critical:dbus" prepare="rm -f /var/run/hald.pid" cleanup="
rm -f /var/run/hald.pid" command="/usr/sbin/hald --daemon=no --use-syslog" resta
rt="yes"/>
<daemon id="daemon-ivman" name="Ikke's Volume Manager (daemon)" provides="iv
man" requires="hald" prepare="rm -f /var/run/ivman.pid ; sleep 7" cleanup="rm -f
/var/run/ivman.pid" command="/usr/bin/ivman --system --nofork" restart="yes"/>
<daemon id="daemon-acpi" name="Advanced Configuration and Power Interface da
emon" provides="acpi" requires="mount/critical" command="/usr/sbin/acpid -f" res
tart="yes"/>
<daemon id="daemon-syslog-ng" name="Syslogger (syslog-ng)" provides="syslog"
requires="mount/critical" command="/usr/sbin/syslog-ng -F" restart="yes"/>
<daemon id="daemon-sshd" name="SSHd" provides="sshd" requires="network:mount
/local" command="/usr/sbin/sshd -D" restart="yes"/>
<daemon id="daemon-smbd" name="Samba-daemon" provides="smbd" requires="mount
/local:network" command="/usr/sbin/smbd -F -s /etc/samba/smb.conf" restart="yes"
/>
<daemon id="daemon-nmbd" name="NetBIOS name server" provides="nmbd" requires
="mount/local:network" command="/usr/sbin/nmbd -F" restart="yes" />
<daemon id="daemon-lirc" name="LIRC" provides="lircd" requires="mount/local"
command="/usr/local/sbin/lircd -d /dev/lirc/0" restart="yes"/>
<shell id="shell-alsactl" name="ALSA Control" provides="alsactl" requires="m
ount/local" enable="/usr/sbin/alsactl restore" disable="/usr/sbin/alsactl store:
/bin/true"/>
<shell id="shell-vdr" name="Video Disk Recorder" provides="vdr" requires="tt
y:lircd" enable="/usr/local/bin/vdrstart" disable="killall vdr; /bin/true"/>
</module>
</virtual>

<prefer>
<syslog s="daemon-syslog-ng" />
<kern-alsa s="shell-kern-audio-alsa" />
</prefer>
<alias>
<!-- service groups -->
<network group="net-lo:net-eth0" seq="most" />
<audio group="alsa:kern-sound" seq="most" />
<samba group="smbd:nmbd" seq="most" />
</alias>
</services>

<mode id="feedback">
<enable services="feedback-textual" />
</mode>

<mode id="default" base="boot">
<enable services="audio:acpi:clock:sshd:samba:lircd:swap:ivman:tts:kern-arbitrary:kern-dvb:vdr" />
<ttys s="tty2-regular:tty3-regular:tty4-regular:tty5-regular:tty6-regular" />
</mode>
</einit>

Some stuff may look weird to you (e.g. smbd) but that way I managed to get samba started everytime I boot....

My version is the svn version I pulled out of the repository about 60 minutes ago....

Best wishes (and successful bug hunting!) ;-)

Stephan
Back to top
View user's profile Send private message
BastianBalthazarBux
Retired Dev
Retired Dev


Joined: 10 Dec 2004
Posts: 78

PostPosted: Tue Jan 30, 2007 1:00 am    Post subject: Reply with quote

mdeininger wrote:
i think i'll add code so that daemon modules can work properly with forking/pidfile daemons, that should fix it then, no? ;)

That's isn't easy ;) probably the changes -704 .. -709 have fixed my problem too [vserver enter], thanks

Now the only challenge remain to redirect /dev/tty1 to a file to get a meaningful start log

thanks for the good work
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Tue Jan 30, 2007 1:26 am    Post subject: Reply with quote

BastianBalthazarBux wrote:
mdeininger wrote:
i think i'll add code so that daemon modules can work properly with forking/pidfile daemons, that should fix it then, no? ;)

That's isn't easy ;) probably the changes -704 .. -709 have fixed my problem too [vserver enter], thanks

not sure, most of the stuff is in place already, only need to glue it together :)
glad to hear the -707 probably fixed it ;)

BastianBalthazarBux wrote:
Now the only challenge remain to redirect /dev/tty1 to a file to get a meaningful start log

well, there's an option in einit.xml that specifies the stdout and stderr files, you could try that... need to mount / r/o, though, but that should be easy with a vserver :D

BastianBalthazarBux wrote:
thanks for the good work

np, hoping it's gonna get better soon, but don't forget about ryan who is doing a lot of improvement to the modules and keeps coming up with good ideas lately ;)

Stephan: going to look into that right away tomorrow (it got kinda late again :D)
nice to see someone from around the area, i'm actually driving right through Reutlingen twice a day :D
(live in Esslingen near Nürtingen, gotta go to Tübingen and back ;))
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
BastianBalthazarBux
Retired Dev
Retired Dev


Joined: 10 Dec 2004
Posts: 78

PostPosted: Tue Jan 30, 2007 4:27 pm    Post subject: Reply with quote

mdeininger wrote:

BastianBalthazarBux wrote:
Now the only challenge remain to redirect /dev/tty1 to a file to get a meaningful start log

well, there's an option in einit.xml that specifies the stdout and stderr files, you could try that... need to mount / r/o, though, but that should be easy with a vserver :D

mmh, not mounted root r/o because in that case all the output is lost, using /somepath/xyz return at least the output to stderr of "einit-control power down"

with the following configuration it work fine, however there are some hacks:

  • disable "einit-mount" module and provide faked mount/{system,critical}
  • /bin/sleep used as a no-op server
  • tweaking of einit.xml needed


einit.xml diff

Code:

diff -a einit.xml.orig einit.xml
8c8,9
<     <load pattern-allow=".*\.so" />
---
> <!--    <load pattern-allow=".*\.so" /> -->
>      <load pattern-allow=".*\.so" pattern-disallow="^einit-mount.*" />
945,952d945
<  <mode id="boot">
<   <enable services="sysconf:mount/local:hostname:tty:keyboard:ipc:syslog:network:dbus:hal:utmp" critical="mount/critical:tty" />
<   <ttys s="tty1-regular" />
<  </mode>
<  <mode id="default" base="boot">
<   <enable services="audio:portmap:clock:xdm:swap:mount/remote" />
<   <ttys s="tty2-regular:tty3-regular:tty4-regular:tty5-regular:tty6-regular" />
<  </mode>


local.xml

Code:

<?xml version="1.0" encoding="UTF-8" ?>
<einit>
<!-- you will need to modify this file -->
 <configuration>
  <feedback>
   <visual>
    <std-io stdin="/root/einit-stdin"
      stdout="/root/einit-stout"
      stderr="/root/einit-stderr"
      verbose-output="/root/einit-verbose" />
   </visual>
  </feedback>

  <network>
   <hostname s="VSERVERHOSTNAME" />
   <domainname s="VSERVERDOMAINNAME" />
  </network>
 </configuration>

 <services>
  <virtual>
   <module>
    <daemon id="mount-system"
     name="mount-system"
     provides="mount/system"
     command="/bin/sleep 3611"
     restart="yes" />

    <daemon id="mount-critical"
     name="mount-critical"
     provides="mount/critical"
     command="/bin/sleep 3611"
     restart="yes" />
   </module>
  </virtual>

  <prefer>
   <syslog s="daemon-syslog-ng" />
  </prefer>

  <alias>
   <vboot group="mount-system:mount-critical" seq="any-iop" />
  </alias>
 </services>

 <mode id="boot">
  <enable services="vboot:sysconf:hostname:keyboard:ipc:syslog" critical="ipc"/>
  <ttys s="tty2-regular" />
 </mode>
 <mode id="default" base="boot">
  <enable services="syslog" />
  <ttys s="" />
 </mode>
</einit>


EDIT Tue Jan 30 16:50:35 UTC 2007
some daemons (pdns) require a different command to shut it down, may worth to switch to the <shell> way to use enable/disable cmds ?

EDIT ... some minutes later
another nice option would be an element einit/configuration/services/virtual/monit with the same properties as daemon (at least provide) that can be used to non local daemons running.
example: we have a mysql daemon running in another chroot, /var/run/mysqld/ is bind-mounted between the various chroots, to provide mysqld it can be enough to test for the socket mysqld create:
[[ -S /var/run/mysqld/mysqld.sock ]] && echo "hurray"
, it may be a very interesting feature also for all those people running an home network

EDIT ... typo found
... in einit.xml s/vairables/variables/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3 ... 16, 17, 18, 19  Next
Page 17 of 19

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum