-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
History: support event tracking #117
Conversation
use parent qw(Exporter); | ||
our @EXPORT_OK = qw($EVENTS $IDX $ID $TS $REF); | ||
|
||
# refaddr was added between 5.8.0 and 5.8.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this line have a "use 5.8.8" line in it to help catch versions of Perl that ar too old?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could but as we don't support anything older than EL5, it should always match...
@ned21 rebased for easier review |
I think the code is good but it's hard to see how this actually useful without a working POC application. My concern is that a lot of CAF/LC is already really (too?) complicated that this adds more code where things can go wrong unexpectedly. Can we try sketching up how this might be used to implement some sort of "delete if removed from profile" option in ncm-metaconfig? |
What exists now in quattor/ncm-ncd#51 is that at the end of each component run, it prints all events that came from a FileWriter (and Editor i think) and that modified something. What is is keeping some sort of local database to keep track of which files where once handled by a FileWriter (or a FileWriter/component combination). at the end of each component, the list of files once handled by FileWriter can be compared to list of files handled by FileWriter, and any differences can be acted upon. So one missing bit is to store the recorded events at the end of each component (or ncm-ncd), and provide a way to query the stored events. same applies for e.g. symlinks: need to create a CAF::Symlink module, and add an event handler to the init and/or the createing of symlinks, and then we can act upon these symlink events. (none of database or actions to take is implemneted here because this PR is mainly to handle #98) |
81cc2f6
to
bdef7cc
Compare
Had to rebase this on #120, there was a conflict |
Thanks for the context -- I am not sure I had realised the significance wrt to #98 before. Can we defer this one until the next workshop? I'd like to see a working demo of quattor/ncm-ncd#51 and have a full session on what we want and expect from logging both at a library and component level to avoid a few of us going off in a direction the rest of the community disagree with. |
@ned21 anything in particular you want to see in the demo? i could try to arrange access to one of our systems, we are running this already. |
@stdweird - an example of what works right now would be good, along with mock ups of anything you envision for the future. That should provide some good fuel for either violent agreement or polite debate. :-) |
If this needs to be discussed at the next workshop, it won't be ready for 16.2? |
As an aside, would it be worth adding some functionality whereby the component first compares the file on the host with the profile that is one number less than the current profile number before making changes to the file? If a difference is found, it could log a warning that the file may have been modified by something other than quattor. We occasionally have a problem at RAL were a person modifies by hand a file that is under quattor control and gets upset when their changes get overwritten by quattor. Whilst this behaviour is against our policy, it does happen and it would be nice to have a stick to use against these people. |
@brunocanning can you open an issue for that feature? |
@stdweird rebase? |
@brunocanning please reference this PR when you open the issue. |
@stdweird poke |
@jrha rebased. this is safe to merge, because it doesn't do much on its own (as ooposed to the chatty LC pr) |
Weird, Github is still telling me this is out of date, but that I can merge anyway... have they changed something again? |
@jrha :rebased_on_master: |
😀 |
Based on #120