Modify ↓
Ticket #480 (closed defect: fixed)
Stacktrace on "bcfg2-admin pull" on file permissions change
Reported by: | [email protected]… | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 0.9.5 Release |
Component: | bcfg2-server | Version: | 0.9.x |
Keywords: | Cc: |
Description
# bcfg2-admin pull mozart.revolutionlinux.com ConfigFile /etc/ldap/ldap.conf Should this change apply to this host of all hosts effected by file /var/lib/bcfg2/Cfg/etc/ldap/ldap.conf/ldap.conf? (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/Cfg.py", line 382, in AcceptEntry update_file(basefile.name, diff) File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/Cfg.py", line 15, in update_file newdata = '\n'.join(difflib.restore(xml.sax.saxutils.unescape(diff).split('\n'), 1)) File "/usr/lib/python2.4/xml/sax/saxutils.py", line 53, in unescape data = data.replace("<", "<") AttributeError: 'NoneType' object has no attribute 'replace'
To reproduce :
- Change the file permissions of a configuration file managed by Bcfg2 (eg. chmod 777 /etc/ldap/ldap.conf)
- Run the client in dry-run (bcfg2 -n)
- On the server, use bcfg2-admin pull to retreive the configuration. Answer Y or N (it does not matter).
I suspect that this is caused by the fact that the data has not changed, and thus the diff is empty in the XML file.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
This is implemented in [77cbb937c108869fbde5ab6fb132a8a05cd406a3] (SVN r3886).