Ticket #768 (new defect)

Opened 14 years ago

Last modified 10 years ago

improve bcfg2-client logging

Reported by: somekool <[email protected]…> Owned by: desai
Priority: major Milestone: Bcfg2 1.4.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:


i just discovered bcfg2-client had logging capability. it is great. but it does not log what I had excepted.

unless you are running -v it will not log if you applied a config file, executed an action, installed a package or if bcfg2 automatically reloaded a service. and it is the information I would need to have logged. what did bcfg2 changed.

i don't need to log the checks. DBStats and Snapshots are there for that already. I need to know what somebody might have changed when running bcfg2 without argument or with -I or -b

so if I execute a dryrun with -n ; i dont need to see anything in the log.

I tried running -I and applying a file

it logged the following

Bcfg2.Client.Frame[24096]: The following entries are not handled by any tool:
Bcfg2.Client.Frame[24096]: ['Package:None:certmaster', 'Package:None:func', 'Package:None:ovaldi', 'Package:None:xerces-j2', 'Package:None:xerces-j2-scripts', 'Service:None:samhain']

this information is in dbstat. I would prefer to know that I changed a config file and that a service has been restarted.

i tried running -n

it logged the same.

which I believe is wrong.

I tried -d and -v and there is WAY TOO MUCH output.

it looks like logging had to be implemented (maybe before dbstats was created) and it was done and never changed.

i think it should not log any checks done. no system status. only changes made by bcfg2. or please make it an option.



Change History

comment:1 Changed 14 years ago by solj

  • Milestone changed from Bcfg2 1.0.0 Release to Bcfg2 1.0.1 Release

comment:2 Changed 14 years ago by solj

  • Milestone changed from Bcfg2 1.0.1 Release to Bcfg2 1.1.0 Release

comment:3 Changed 13 years ago by somekool <[email protected]…>

May I try to express with a few words what I would expect from this enhancement.

  • when this new logging function is enabled.
  • logging options could include a list of ENV var to be include in the log.
  • no matter how I call bcfg2 client,
    • without any arguments,
    • with -b
    • with -I
    • with -l whitelist
    • or even running in agent mode
    • it simply should not matter
  • when any change is applied...
    • a service is started
    • chkconfig value is changed
    • package is installed, updated or removed
    • config file is updateed
    • permission changes
    • or any other changes
  • it would be logged.
  • this log file should not contains anything else than applied changes.
  • the log format is still to be decided. but it could look like this.
YYYY-MM-DD HH:MM:SS invocation: <bcfg2 invocation mode or full command line> <ENV VARS>
YYYY-MM-DD HH:MM:SS invocation: whitelist (-l whitelist)
YYYY-MM-DD HH:MM:SS changes: configfile /etc/hosts content updated ...
YYYY-MM-DD HH:MM:SS changes: configfile /etc/hosts permission changed ....
YYYY-MM-DD HH:MM:SS changes: permission /var/log permission changed ....
YYYY-MM-DD HH:MM:SS changes: package vim-enhanced installed ....
YYYY-MM-DD HH:MM:SS invocation: dryrun (-n)
YYYY-MM-DD HH:MM:SS invocation: bundle (-b package-apache)
YYYY-MM-DD HH:MM:SS changes: package httpd updated ....

thank you

comment:4 Changed 13 years ago by

Traceback: File "/usr/lib64/python2.6/site-packages/django/core/handlers/" in get_response

  1. response = callback(request, *callback_args, callback_kwargs)

File "/usr/lib64/python2.6/site-packages/Bcfg2/Server/Reports/reports/" in display_sys_view

  1. client_lists = prepare_client_lists(request, timestamp)

File "/usr/lib64/python2.6/site-packages/Bcfg2/Server/Reports/reports/" in prepare_client_lists

  1. stale_all_client_list =[x[0] for x in results if - x[1] > timedelta(days=g2m3)])

comment:5 Changed 13 years ago by solj

  • Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.2.0 Release

comment:6 Changed 12 years ago by solj

  • Version changed from 0.9.x to 1.0
  • Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.3.0 Release

comment:7 Changed 10 years ago by solj

  • Milestone changed from Bcfg2 1.3.0 Release to Bcfg2 1.4.0 Release

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as new

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.