All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Adding sanity to OE startup process
@ 2007-04-05 15:27 Paul Sokolovsky
  2007-04-05 15:33 ` Sergey Lapin
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Paul Sokolovsky @ 2007-04-05 15:27 UTC (permalink / raw)
  To: openembedded-devel

Hello openembedded-devel,

  I hope many people will agree that boot process is one of the pain
points of OE. Boot/service scripts are collected from Debian and other
various sources, which are mostly intended for "desktop" systems, and
doesn't really scale for embedded usage. For example, on typical
desktop system you have:

1. Big screen and good chance to see a message before it scrolls
away.
2. Ability to pause boot process from console with common Ctrl+S/Q.
3. Scrollback buffer.

  All these are usually not available for embedded system (not
speaking that some embedded systems don't have screen at all).

  So, to start with, I'd like to propose to make it possible for boot
process to log to syslog. I have following in mind:

1. Make a convention that boot/service scripts should use "$echo"
instead of "echo" to do output.
2. Have default define of "echo=echo" for this.
3. Turn /etc/init.d/syslogd into /etc/init.d/syslogd.sh so it was
sourced by /etc/init.d/rc and could export new value for the rest of
scripts.
4. Make /etc/init.d/syslogd.sh start earlier so it could capture as
mush output as possible.
5. Using syslogd for boot messages capture is of course optional.


Thanks,

-- 
 Paul                          mailto:pmiscml@gmail.com




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-05 15:27 [RFC] Adding sanity to OE startup process Paul Sokolovsky
@ 2007-04-05 15:33 ` Sergey Lapin
  2007-04-05 15:49   ` Paul Sokolovsky
  2007-04-05 21:36 ` Rod Whitby
  2007-04-10 11:27 ` Michael 'Mickey' Lauer
  2 siblings, 1 reply; 12+ messages in thread
From: Sergey Lapin @ 2007-04-05 15:33 UTC (permalink / raw)
  To: openembedded-devel

Paul Sokolovsky wrote:
>   So, to start with, I'd like to propose to make it possible for boot
> process to log to syslog. I have following in mind:
> 
> 1. Make a convention that boot/service scripts should use "$echo"
> instead of "echo" to do output.
> 2. Have default define of "echo=echo" for this.
I think some function should suffice.
aliasing is possible too.
Function could be more flexible solution.


> 3. Turn /etc/init.d/syslogd into /etc/init.d/syslogd.sh so it was
> sourced by /etc/init.d/rc and could export new value for the rest of
> scripts.
I don't see why.

> 5. Using syslogd for boot messages capture is of course optional.
I don't see why.
We can log to multiple places.


All the best,
S.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-05 15:33 ` Sergey Lapin
@ 2007-04-05 15:49   ` Paul Sokolovsky
  0 siblings, 0 replies; 12+ messages in thread
From: Paul Sokolovsky @ 2007-04-05 15:49 UTC (permalink / raw)
  To: Sergey Lapin; +Cc: openembedded-devel

Hello Sergey,

Thursday, April 5, 2007, 6:33:54 PM, you wrote:

> Paul Sokolovsky wrote:
>>   So, to start with, I'd like to propose to make it possible for boot
>> process to log to syslog. I have following in mind:
>> 
>> 1. Make a convention that boot/service scripts should use "$echo"
>> instead of "echo" to do output.
>> 2. Have default define of "echo=echo" for this.
> I think some function should suffice.
> aliasing is possible too.
> Function could be more flexible solution.

  Well, yes, function would actually even better. I just wasn't sure
if rules for overriding builtins are portable enough. Well, I checked
that it works for both bash and busybox.


>> 3. Turn /etc/init.d/syslogd into /etc/init.d/syslogd.sh so it was
>> sourced by /etc/init.d/rc and could export new value for the rest of
>> scripts.
> I don't see why.

>> 5. Using syslogd for boot messages capture is of course optional.
> I don't see why.
> We can log to multiple places.

> All the best,
> S.


-- 
Best regards,
 Paul                            mailto:pmiscml@gmail.com




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-05 15:27 [RFC] Adding sanity to OE startup process Paul Sokolovsky
  2007-04-05 15:33 ` Sergey Lapin
@ 2007-04-05 21:36 ` Rod Whitby
  2007-04-05 21:45   ` Koen Kooi
  2007-04-10 12:27   ` Paul Sokolovsky
  2007-04-10 11:27 ` Michael 'Mickey' Lauer
  2 siblings, 2 replies; 12+ messages in thread
From: Rod Whitby @ 2007-04-05 21:36 UTC (permalink / raw)
  To: openembedded-devel

Paul Sokolovsky wrote:
>   So, to start with, I'd like to propose to make it possible for boot
> process to log to syslog. I have following in mind:
> 
> 4. Make /etc/init.d/syslogd.sh start earlier so it could capture as
> mush output as possible.

This is something that the syslog.file, syslog.buffer and syslog.network
scripts in packages/slugos-init/files/initscripts try to do.  Syslog to
buffer is started *as* *early* as possible.  Syslog to file is started
as soon as filesystems are mounted, and Syslog to network is started as
soon as the network is up.

[I'm not suggesting you copy those files directly, or use the
slugos-init package - this all needs to be generalised and subsumed into
the standard init package as part of the slugos reincorporation into
general OE.]

The packages/initscripts/initscripts-slugos_1.0.bb file will show the
init ordering changes that we did to make sure syslog started as early
as possible to help with debugging on a machine (NSLU2) which does not
have a user-visible console at all.

[Again, that recipe still needs to be subsumed into OE proper, so I will
be very interested in working with you to effectively replace the
initscripts-slugos recipe with a new improved initscripts recipe that
suits everyone.]

-- Rod



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-05 21:36 ` Rod Whitby
@ 2007-04-05 21:45   ` Koen Kooi
  2007-04-05 22:07     ` Rod Whitby
  2007-04-10 12:27   ` Paul Sokolovsky
  1 sibling, 1 reply; 12+ messages in thread
From: Koen Kooi @ 2007-04-05 21:45 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rod Whitby schreef:
> Paul Sokolovsky wrote:
>>   So, to start with, I'd like to propose to make it possible for boot
>> process to log to syslog. I have following in mind:
>>
>> 4. Make /etc/init.d/syslogd.sh start earlier so it could capture as
>> mush output as possible.
> 
> This is something that the syslog.file, syslog.buffer and syslog.network
> scripts in packages/slugos-init/files/initscripts try to do.  Syslog to
> buffer is started *as* *early* as possible.  Syslog to file is started
> as soon as filesystems are mounted, and Syslog to network is started as
> soon as the network is up.

Sounds pretty neat, does the buffer get flushed to file as well?

Speaking of the initsystem, can we make them more upstart/init-ng/system-du-jour friendly?

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGFW4SMkyGM64RGpERAlAZAKC5eS8M6hegNb8m/foqaQWwr2BcbwCeLaBF
3gwAI3XSdLSk8h72HZcVHyA=
=u3vx
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-05 21:45   ` Koen Kooi
@ 2007-04-05 22:07     ` Rod Whitby
  0 siblings, 0 replies; 12+ messages in thread
From: Rod Whitby @ 2007-04-05 22:07 UTC (permalink / raw)
  To: openembedded-devel

Koen Kooi wrote:
> Rod Whitby schreef:
>>> Paul Sokolovsky wrote:
>>>>   So, to start with, I'd like to propose to make it possible for boot
>>>> process to log to syslog. I have following in mind:
>>>>
>>>> 4. Make /etc/init.d/syslogd.sh start earlier so it could capture as
>>>> mush output as possible.
>>> This is something that the syslog.file, syslog.buffer and syslog.network
>>> scripts in packages/slugos-init/files/initscripts try to do.  Syslog to
>>> buffer is started *as* *early* as possible.  Syslog to file is started
>>> as soon as filesystems are mounted, and Syslog to network is started as
>>> soon as the network is up.
> 
> Sounds pretty neat, does the buffer get flushed to file as well?

At the moment, no.  You get to choose the destination in
/etc/syslog.conf, and it only logs to that destination.

(e.g. if you need early debugging, you have to set it to buffer)

-- Rod



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-05 15:27 [RFC] Adding sanity to OE startup process Paul Sokolovsky
  2007-04-05 15:33 ` Sergey Lapin
  2007-04-05 21:36 ` Rod Whitby
@ 2007-04-10 11:27 ` Michael 'Mickey' Lauer
  2 siblings, 0 replies; 12+ messages in thread
From: Michael 'Mickey' Lauer @ 2007-04-10 11:27 UTC (permalink / raw)
  To: openembedded-devel

[...]

Even more good points, I think this would benefit from going to a more
high level services description as well.

Regards,

:M:
-- 
Michael 'Mickey' Lauer | IT-Freelancer | http://www.vanille-media.de




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-05 21:36 ` Rod Whitby
  2007-04-05 21:45   ` Koen Kooi
@ 2007-04-10 12:27   ` Paul Sokolovsky
  2007-04-11  6:53     ` Rod Whitby
  1 sibling, 1 reply; 12+ messages in thread
From: Paul Sokolovsky @ 2007-04-10 12:27 UTC (permalink / raw)
  To: Rod Whitby; +Cc: openembedded-devel

Hello Rod,

Friday, April 6, 2007, 12:36:13 AM, you wrote:

> Paul Sokolovsky wrote:
>>   So, to start with, I'd like to propose to make it possible for boot
>> process to log to syslog. I have following in mind:
>> 
>> 4. Make /etc/init.d/syslogd.sh start earlier so it could capture as
>> mush output as possible.

> This is something that the syslog.file, syslog.buffer and syslog.network
> scripts in packages/slugos-init/files/initscripts try to do.  Syslog to
> buffer is started *as* *early* as possible.  Syslog to file is started
> as soon as filesystems are mounted, and Syslog to network is started as
> soon as the network is up.

> [I'm not suggesting you copy those files directly, or use the
> slugos-init package - this all needs to be generalised and subsumed into
> the standard init package as part of the slugos reincorporation into
> general OE.]

  I expected SlugOS project to be important stakeholder for such
changes, so I appreciate your response, Rob! I had a look at
slugos-init's syslog handling, and for sure it looks well done and
should be generalized to the whole OE.

  I guess, at this point, I should just play with it to understand
how it works better (for example, a question I have in mind: each of
syslog.{buffer, file, network} appears to just run syslogd with new
commandline params, not restart it or send signal; is this reliable
(e.g. documented)? Well, as I tell, I should try it myself first I
guess.)

[]

> -- Rod


-- 
Best regards,
 Paul                            mailto:pmiscml@gmail.com




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-10 12:27   ` Paul Sokolovsky
@ 2007-04-11  6:53     ` Rod Whitby
  2007-04-23  7:15       ` Paul Sokolovsky
  0 siblings, 1 reply; 12+ messages in thread
From: Rod Whitby @ 2007-04-11  6:53 UTC (permalink / raw)
  To: Paul Sokolovsky; +Cc: openembedded-devel

Paul Sokolovsky wrote:
>   I expected SlugOS project to be important stakeholder for such
> changes, so I appreciate your response, Rob! I had a look at
> slugos-init's syslog handling, and for sure it looks well done and
> should be generalized to the whole OE.

Thanks.  It was mostly done by John Bowler.  Any bugs introduced since
then are my responsibility :-)

>   I guess, at this point, I should just play with it to understand
> how it works better (for example, a question I have in mind: each of
> syslog.{buffer, file, network} appears to just run syslogd with new
> commandline params, not restart it or send signal; is this reliable
> (e.g. documented)? Well, as I tell, I should try it myself first I
> guess.)

Good question.  I thought that only *one* of them would get started,
based on the contents of the destination field in /etc/sysconf.conf at
boot.  Is that not what you're seeing?

-- Rod



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-11  6:53     ` Rod Whitby
@ 2007-04-23  7:15       ` Paul Sokolovsky
  2007-04-23  7:59         ` Koen Kooi
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Sokolovsky @ 2007-04-23  7:15 UTC (permalink / raw)
  To: Rod Whitby; +Cc: openembedded-devel, angstrom-distro-devel

Hello Rod,

Wednesday, April 11, 2007, 9:53:10 AM, you wrote:

> Paul Sokolovsky wrote:
>>   I expected SlugOS project to be important stakeholder for such
>> changes, so I appreciate your response, Rob! I had a look at
>> slugos-init's syslog handling, and for sure it looks well done and
>> should be generalized to the whole OE.

> Thanks.  It was mostly done by John Bowler.  Any bugs introduced since
> then are my responsibility :-)

>>   I guess, at this point, I should just play with it to understand
>> how it works better (for example, a question I have in mind: each of
>> syslog.{buffer, file, network} appears to just run syslogd with new
>> commandline params, not restart it or send signal; is this reliable
>> (e.g. documented)? Well, as I tell, I should try it myself first I
>> guess.)

> Good question.  I thought that only *one* of them would get started,
> based on the contents of the destination field in /etc/sysconf.conf at
> boot.  Is that not what you're seeing?

        Sorry, for delay, due to approaching of 2.6.22 merge window, I
work mostly on HH.org kernel now, but yesterday finally found time to
play with this issue.

        So yes, I see that the idea after all is log to only one
destination, just start logging as soon as possible for that
destination. I just had in mind something what Koen mentioned: start
logging to buffer ASAP, then later switchover to file if needed, then
to network if needed. Well, that's of course more of advanced feature.

        Also, confirmed that file log rotation works at least with
busybox 1.2.1. Cleaned up syslogd.conf fixed to not contain confusing
statements this is not supported, committed. Koen, what do you think
about switching Angstrom's default setting to /var/log/messages after
this, to make it easier for non-busybox people? After all, main
trouble with file logging is now fixed - it cannot grow unlimited in
size.


> -- Rod


-- 
Best regards,
 Paul                            mailto:pmiscml@gmail.com




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-23  7:15       ` Paul Sokolovsky
@ 2007-04-23  7:59         ` Koen Kooi
  2007-04-24 12:26           ` Paul Sokolovsky
  0 siblings, 1 reply; 12+ messages in thread
From: Koen Kooi @ 2007-04-23  7:59 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions
  Cc: angstrom-distro-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Sokolovsky schreef:

>         Also, confirmed that file log rotation works at least with
> busybox 1.2.1. Cleaned up syslogd.conf fixed to not contain confusing
> statements this is not supported, committed. Koen, what do you think
> about switching Angstrom's default setting to /var/log/messages after
> this, to make it easier for non-busybox people? After all, main
> trouble with file logging is now fixed - it cannot grow unlimited in
> size.

Sounds ok to me.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGLGdrMkyGM64RGpERAkElAJ9RHcBJaaY9CKMRE1jeGyrswP+x8wCgn6xk
I4VGuh+YvrpQGCKlOaT/ufA=
=Msq4
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC] Adding sanity to OE startup process
  2007-04-23  7:59         ` Koen Kooi
@ 2007-04-24 12:26           ` Paul Sokolovsky
  0 siblings, 0 replies; 12+ messages in thread
From: Paul Sokolovsky @ 2007-04-24 12:26 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

Hello Koen,

Monday, April 23, 2007, 10:59:40 AM, you wrote:

> Paul Sokolovsky schreef:

>>         Also, confirmed that file log rotation works at least with
>> busybox 1.2.1. Cleaned up syslogd.conf fixed to not contain confusing
>> statements this is not supported, committed. Koen, what do you think
>> about switching Angstrom's default setting to /var/log/messages after
>> this, to make it easier for non-busybox people? After all, main
>> trouble with file logging is now fixed - it cannot grow unlimited in
>> size.

> Sounds ok to me.

        Patch posted at http://bugs.openembedded.org/show_bug.cgi?id=2135

> regards,

> Koen

-- 
Best regards,
 Paul                            mailto:pmiscml@gmail.com




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-04-24 20:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 15:27 [RFC] Adding sanity to OE startup process Paul Sokolovsky
2007-04-05 15:33 ` Sergey Lapin
2007-04-05 15:49   ` Paul Sokolovsky
2007-04-05 21:36 ` Rod Whitby
2007-04-05 21:45   ` Koen Kooi
2007-04-05 22:07     ` Rod Whitby
2007-04-10 12:27   ` Paul Sokolovsky
2007-04-11  6:53     ` Rod Whitby
2007-04-23  7:15       ` Paul Sokolovsky
2007-04-23  7:59         ` Koen Kooi
2007-04-24 12:26           ` Paul Sokolovsky
2007-04-10 11:27 ` Michael 'Mickey' Lauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.