Friday, July 27, 2007

yesterday's rsyslog changes

During the large rsyslog modularization effort, I take a more detailed audit log of what I am doing. I hope that this log will allow others to both follow the progress as well as help to understand what I am doing. I was not sure (and I still am not) where to post that log. I've now decided to post it to my blog, because it doesn't look really suitable for the "offcial" rsyslog site.

Please note that the work audit contains more detail than the ChangeLog. This is intentional. The ChangeLog shall provide the average user with an idea of what's now. My audit here provides a finer-grained information for those that are really interested in it.

Here come yesterday's changes. They are listed in the same order I have done them.

- applied patch from mildew to avoid zombies
- applied patch from Michel Samia to fix compilation when NOT
compiled for pthreads
- implemented onSelectReadyWrite() interface
- MILESTONE reached: no more access to f->f_un in syslogd.c
- shuffled code from tcpsyslog.c to omfwd.c. It looks like it belongs more
to that file. But we need to look at it some time later. The move was
absolutely necessary so that no access to f->f_un happened in
tcpsyslog.c (which was evil)
- MILESTONE reached: no more access to f->f_un from non-output modules
- changed doAction() interface to include module data pointer
- removed references to f_un from omusrmsg.c
- changed module template for parseSelectorAct() [code reduction,
consitency]
- removed references to f_un from ommysql.c
- removed references to f_un from omfwd.c
- removed references to f_un from omshell.c
- removed references to f_un from omfile.c
- MILESTONE reached: f->f_un has gone away!
- removed f_type from omshell.c, omdiscard.c, omusrmsg.c, ommysql.c
- removed f_type from syslogd.c/cflineParseFileName()
- fixed bug in omfile.c which could lead to invalid addressing if "-" was
given to not sync file
- removed f_type from omfile.c
- implemented needUDPSocket() interface
- replaced (mis) use of f_prevcount in omfwd.c -> now data element in
instance data is used for retry counting
- removed f->f_type from syslogd.c, omfwd.c
- removed f->f_file from omfwd.c, omfile.c
- f->f_flags is gone away
- changed doAction() interface to contain the full message string
- f_iov and its handling has been removed
- added IDs to selector_t

If you are interested in even more details, you can go to the rsyslog cvs and see the changes on a file-by-file basis.

As the day closed, I identified a problem with the current interface definition: Modules need to access the template pointer in selector_t. They may even need to have multiple templates (e.g. dynaFiles, a hypothetical email action [subject and message text]). I need to address this soon.

I hope this audit is useful. Yesterday's changes will be released as 1.17.4 this morning. Then, I continue to work on modularization.

No comments: