Modify

Ticket #480 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

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("&lt;", "<")
AttributeError: 'NoneType' object has no attribute 'replace'

To reproduce :

  1. Change the file permissions of a configuration file managed by Bcfg2 (eg. chmod 777 /etc/ldap/ldap.conf)
  2. Run the client in dry-run (bcfg2 -n)
  3. 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

comment:1 Changed 15 years ago by desai

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

This is implemented in [77cbb937c108869fbde5ab6fb132a8a05cd406a3] (SVN r3886).

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.