Skip to content
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

ncm-metaconfig 23.6: log execution of actions in main log file #1664

Open
jouvin opened this issue Mar 1, 2024 · 5 comments
Open

ncm-metaconfig 23.6: log execution of actions in main log file #1664

jouvin opened this issue Mar 1, 2024 · 5 comments

Comments

@jouvin
Copy link
Contributor

jouvin commented Mar 1, 2024

I started to use the powerful actions in ncm-metaconfig. But currently there is nothing in the main log (ncm-cdispd.log) related to the execution of these actions: only daemon restarts are logged. This may be a source of confusion. I'd suggest to have one line per action type (pre, test, changed , post) listing the commands executed (the key value in /software/components/metaconfig/commands) in much the same way we list the daemons restarted.

@ned21
Copy link
Contributor

ned21 commented Mar 3, 2024

Aren't these executed via a standard CAF function, which ought to already log everything it does? Or are you saying that you see the command being executed but want to log the reason for the execution?

@stdweird
Copy link
Member

stdweird commented Mar 3, 2024

this is indeed odd. all execution should be logged in the component logfile with verbose level. if these commands are not in there, then we have a serious problem.
@jouvin can you give some example what you expect to see.

@jouvin
Copy link
Contributor Author

jouvin commented Mar 3, 2024

@stdweird I apologize for not being clear enough... Every action is perfectly logged in the component log file. My point is that our (my) way of checking Quattor deployment is to check ncm-cdispd.log and only if something requires more information to look at the component file. And in this file, there is nothing about executed metaconfig actions other than those on daemons.

To be a bit more concrete, with a config like:

prefix '/software/components/metaconfig';
'commands/mycmd' = '/bin/echo test';
'services/{/x/yz/z}/actions/post' = 'mycmd';

I'd like to see in ncm-cdispd.log a summary line like:

Executing post actions: mycmd

And the same for the other types of actions (pre, test, changed). It is particularly important for post which is executed every time the component is run.

Hopefully it is more clear!

@stdweird
Copy link
Member

stdweird commented Mar 4, 2024

https://github.com/quattor/configuration-modules-core/blob/master/ncm-metaconfig/src/main/perl/metaconfig.pm#L209 logs the actions with either error or verbose. i think what ends up in the ncm-cdispd.log is info or higher.

@jouvin can you try to patch that line to info instead of verbose, and see if it gives what you want?

@jouvin
Copy link
Contributor Author

jouvin commented Mar 4, 2024

I'll try to have a look...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants