Ticket #461 (closed defect: wontfix)
bundle change not getting triggered by negated group section
Reported by: | [email protected]… | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 0.9.5 Release |
Component: | bcfg2-client | Version: | |
Keywords: | Bundler | Cc: |
Description
i'm using bcfg2 to manage monit. based on group membership, i have it creating various files in /etc/monit/monit.d. there is one file which corresponds to a service that should be running if the machine is using bare drives, but not if it's using a hardware raid array (groups 'aacraid' or 'megaraid') in my setup.
the section of the bundle that corresponds to this is as follows:
<Group name='basic'> <ConfigFile name='/etc/monit/monit.d/ssh.conf' /> <ConfigFile name='/etc/monit/monit.d/sysklogd.conf' /> <ConfigFile name='/etc/monit/monit.d/ntpd.conf' /> <ConfigFile name='/etc/monit/monit.d/cron.conf' /> <Group name='aacraid' negate='true' > <Group name='megaraid' negate='true' > <ConfigFile name='/etc/monit/monit.d/smartmontools.conf' /> </Group> </Group> </Group>
i also have an action which clears out /etc/monit/monit.d whenever the bundle gets updated.
however, when i add either 'megaraid' or 'aacraid' to a host's profile group and then re-run bcfg2, bundle modification doesn't get triggered, and the file does not get removed. however, if i manually clobber one of the files in that directory, the bundle is updated and things go as they should (i.e. smartmontools.conf does not get created).
am i misunderstanding bundle modification triggers, or is this actually a bug?
Attachments
Change History
comment:2 Changed 16 years ago by desai
- Status changed from assigned to closed
- Resolution set to wontfix
- Milestone set to Bcfg2 0.9.5 Release
From the traces you posted, I think this you need to set the action to run always, at least if you plan to change things in the .d directory. We should probably come up with a better solution for this, but setting when='always' is the most robust way to do things for now.
How are you specifying the action?