Ticket #982 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

probed.xml should be deterministically ordered

Reported by: Owned by: desai
Priority: minor Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-server Version: 1.0
Keywords: Cc:


Every time bcfg2-server is restarted, it rewrites probed.xml with all of the clients in a different order.

This makes tracking probe data in a revision control system cumbersome and not very useful, especially when working with branches and alternate/staging bcfg2 servers etc.

This patch for Bcfg2/Server/Plugins/ solves the problem.

@@ -73,7 +73,7 @@

     def write_data(self):
         """Write probe data out for use with bcfg2-info."""
         top = lxml.etree.Element("Probed")
-        for client, probed in self.probedata.iteritems():
+        for client, probed in sorted(self.probedata.items()):
             cx = lxml.etree.SubElement(top, 'Client', name=client)
             for probe in probed:
                 lxml.etree.SubElement(cx, 'Probe', name=probe,


Change History

comment:1 Changed 12 years ago by desai

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

Committed in [137113ac0b53df7acfb5dab9eb8ee3ba04ebca8f]. Thanks for the patch.

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 closed
The resolution will be deleted. Next status will be 'reopened'

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

Note: See TracTickets for help on using tickets.