Ticket #469 (closed defect: fixed)

Opened 16 years ago

Last modified 15 years ago

bcfg2-admin pull is broken

Reported by: [email protected] Owned by: desai
Priority: major Milestone: Bcfg2 0.9.6 Release
Component: bcfg2-server Version: 0.9.x
Keywords: bcfg-admin pull ClientConfig Cc: [email protected]…, [email protected]


Under RHEL5, using bcfg2 0.9.4, I get the following errors while trying to pull a file using bcfg2-admin.

If /etc/motd and /var/lib/bcfg2/Cfg/etc/motd/motd both exist:

[[email protected] bcfg2]# bcfg2-admin pull rhel5 ConfigFile /etc/motd
Should this change apply to this host of all hosts effected by file /var/lib/bcfg2/Cfg/etc/motd/motd? (N/y): y
Traceback (most recent call last):
  File "/usr/sbin/bcfg2-admin", line 556, in ?
    do_pull(configfile, Repopath, args[1], args[f5e4281313ff9004be488e420f90d5fe413bb5c1] (SVN r2), args[bdf1fcc0d0d51b9655d3aa223a5885ca9b7481c3] (SVN r3))
  File "/usr/sbin/bcfg2-admin", line 330, in do_pull
    plugin.AcceptEntry(m, 'ConfigFile', ename, diff)
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/", line 382, in AcceptEntry
    update_file(, diff)
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/", line 15, in update_file
    newdata = '\n'.join(difflib.restore(xml.sax.saxutils.unescape(diff).split('\n'), 1))
  File "/usr/lib64/python2.4/xml/sax/", line 53, in unescape
    data = data.replace("&lt;", "<")
AttributeError: 'NoneType' object has no attribute 'replace'

From my cursory look at it, the "diff" object is always None and never has any data in it.

If only /etc/motd exists and nothing in /var/lib/bcfg2/etc/motd/ I get this error:

[[email protected] motd]# bcfg2-admin pull rhel5 ConfigFile /etc/motd
Got wrong numbers of matching generators for entry:[]

It doesn't matter what type of file I try to pull this occurs. The client being remote or local to the bcfg2 server doesn't matter either. I've disabled selinux, as it was causing other unrelated issues w/ bcfg2.



bcfg-admin.diff (1.2 KB) - added by desai 16 years ago.

Change History

Changed 16 years ago by desai

comment:1 Changed 16 years ago by desai

  • Status changed from new to assigned

There are at least two problems here. The first was poor error handling. This should be fixed in the attached patch, or in revision [cb7528b6e1a58fa7272e81e91d5c339e07bd2223] (SVN r3527). Once that is applied, that same call to bcfg2-admin should produce some information about the offending statistics entry. Thanks for the bug report.

comment:2 Changed 16 years ago by desai

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

OK. These issues have been reported fixed as of revision [3592].

comment:3 Changed 15 years ago by Fernando Laudares Camargos <[email protected]…>

  • Cc [email protected] added
  • Status changed from closed to reopened
  • Resolution fixed deleted


I've re-experience this with bcfg2-0.9.6pre3 (exactly the same scenario).

In my case, I'm running python2.5 and I just had to add "import difflib" to /usr/lib/python2.5/site-packages/Bcfg2/Server/Plugins/ to solve the problem.


comment:4 Changed 15 years ago by desai

  • Status changed from reopened to closed
  • Resolution set to fixed
  • Milestone changed from Bcfg2 0.9.5 Release to Bcfg2 0.9.6 Release

Committed in [19915cc0058d876eb69d2188f69aae41e6d791a1] (SVN r4950). Thanks for the report/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.