Modify

Ticket #533 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

Rules' Directory entry's prune attribute seems to be reversed.

Reported by: [email protected] Owned by: desai
Priority: major Milestone: Bcfg2 0.9.6 Release
Component: bcfg2-client Version: 1.0
Keywords: directory, prune Cc: [email protected]

Description

I recently switched around my bcfg2 deployment. In the process of rerunning the client on multiple servers, I noticed a directory marked for pruning kept coming back dirty (snippet follows):

Reading package lists... Done
Building dependency tree... Done
Installing Directory /etc/apache2/sites-enabled-ssl
Found a pre-existing directory at /etc/apache2/sites-enabled-ssl
Installing Directory /etc/monit/monit.d
Found a pre-existing directory at /etc/monit/monit.d
The Following Bundles have been modified:
 apache2  monit   

Directory /etc/monit/monit.d contains extra entries:
 /etc/monit/monit.d/bcfg2-server.conf 
Directory /etc/apache2/sites-enabled-ssl contains extra entries:
 /etc/apache2/sites-enabled-ssl/001-default-ssl 
 /etc/apache2/sites-enabled-ssl/rt              
Found clobbered entries:
 Directory:/etc/apache2/sites-enabled-ssl 
 Directory:/etc/monit/monit.d             
Installing Directory /etc/monit/monit.d
Found a pre-existing directory at /etc/monit/monit.d
Installing Directory /etc/apache2/sites-enabled-ssl
Found a pre-existing directory at /etc/apache2/sites-enabled-ssl
Restarting service monit
> /usr/sbin/invoke-rc.d monit restart
< Stopping daemon monitor: monit.
< Starting daemon monitor: monit.
Restarting service apache2
> /usr/sbin/invoke-rc.d apache2 restart
Rechecking system inventory
Directory /etc/monit/monit.d contains extra entries:
 /etc/monit/monit.d/bcfg2-server.conf 
Directory /etc/apache2/sites-enabled-ssl contains extra entries:
 /etc/apache2/sites-enabled-ssl/001-default-ssl 
 /etc/apache2/sites-enabled-ssl/rt              

Phase: final
Correct entries:	481
Incorrect entries:	2
 Directory:/etc/apache2/sites-enabled-ssl 
 Directory:/etc/monit/monit.d             
Total managed entries:	483
Unmanaged entries:	600

This is odd- it shouldn't complain about extra entries in the directory, as it should prune them out itself. The directory entry is as follows:

    <Directory name='/etc/monit/monit.d' perms='0700' owner='root' group='root' prune='true'/>

am I misunderstanding how pruning works here?

Attachments

Change History

comment:1 Changed 15 years ago by anonymous

I concur with this bug report that prune does not seem to be working as expected. I get the same errors in my own configuration.

In debugging it, it seems that the following check within InstallDirectory() at line 260 of source:trunk/bcfg2/src/lib/Client/Tools/POSIX.py#4731:

  if entry.get('prune', 'false') == 'true' and self.ex_ents:

fails because self.ex_ents is empty, even though it had a value back in VerifyDirectory() on line 160. I don't understand Python very well, but it seems like the self.ex_ents variable is not preserved between calls to VerifyDirectory() and InstallDirectory().

comment:2 Changed 15 years ago by solj

  • Status changed from new to closed
  • Resolution set to fixed

fixed in r4833.

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.