Custom Query (894 matches)


Show under each result:

Results (124 - 126 of 894)

Ticket Owner Reporter Resolution Summary
#242 desai [email protected] fixed Cfg: only last probe gets used

Currently only the last executed probe will be saved and available for host interpolation.

Possible fix:

---      (Revision 2451)
+++      (Arbeitskopie)
@@ -215,7 +215,8 @@
         if self.interpolate:
             if metadata.hostname in probeData:
                 for name, value in probeData[metadata.hostname].iteritems():
-                    filedata = filedata.replace("@@%[email protected]@"%name, value )
+                  if value != None:
+                    filedata = filedata.replace("@@%[email protected]@" % name, value )
                 logger.warning("Cannot interpolate data for client: %s for config file: %s"% (metadata.hostname,
         if self.paranoid:
@@ -277,7 +278,10 @@

     def ReceiveData(self, client, data):
         '''Receive probe results pertaining to client'''
-        probeData[client.hostname] = { data.get('name'):data.text }
+        try:
+            probeData[client.hostname].update({ data.get('name'):data.text })
+        except KeyError:
+            probeData[client.hostname] = { data.get('name'):data.text }

     def AddDirectoryMonitor(self, name):
         '''Add new directory to FAM structures'''
#241 desai [email protected] fixed Cfg: probes will fail to execute

bcfg2 with Gamin.

When using Cfg with probes, I created a directory repo/Probes/ where I put all my probe files.

Gamin adds the directory repo/Probes to the probes to be executed on the client.

The bcfg2 client will fail with the followjng message:

GetProbes completed successfully
Failed to execute probe: /home/gogo/subversion/svn-mj/trunk/bcfg2-repository/Probes
Traceback (most recent call last):
  File "/usr/sbin/bcfg2", line 95, in run_probe
TypeError: argument 1 must be string or read-only character buffer, not None
Failed to Execute probes

Also if another directory under repo/Probes/ gets created, the error will appear since probe.text is None.

#696 desai [email protected] wontfix Chained probes (calling probes from within other probes)

I'd like to be able to call a probe from another probe. The driving factor for this is to reduce code duplication in my probes. An example:

I have a probe that uses dmidecode to determine what hardware manufacturer I'm currently running on. This sets a dynamic group that I use within my configuration (manuf-dell, for example).

I have a second probe that queries my RPM database looking for a specific rpm gpg key and sets a dynamic group if I don't find it (rpm_needs_dell_gpg). The problem is, I only want to set this group if I know I'm running on dell hardware.

I have three options for doing this:

  1. One monolithic probe that combines these two options so I reduce code duplication. This is unappealing because this can get large quick (for one script).
  1. Have my rpm_gpg probe issue the same dmidecode command as my manufacturer probe. This is unappealing because that means I have to update two places if I ever need to change the dmidecode call.
  1. Move the manufacturer specific rpm gpg probes into the manufacturer probe. This is unappealing because that means I have to update two places if I ever need to change the rpm calls or methods I use to probe for gpg keys.
Note: See TracQuery for help on using queries.