Description of problem: See title How reproducible: Always Steps to Reproduce: 1. Have an httpd.conf file with comments 2. Update the apache configuration using RHQ and save it 3. Observe the havoc in the file after the update Actual results: All the comments text is lost. Only the leading # is left from all the lines that originally contained comments. Expected results: The comments should be preserved. Additional info: This is a bug in our augeas lens.
workaround for this problem is to store the comments and don't use ageas del ([ del /([ \t]*(#.*)*)\n/ "#\n" ]) for comments.
I have opened a ticket for this problem on https://fedorahosted.org/augeas/ticket/118 .
The fix for this should be in Augeas 0.7.1. We need to retest with that.
Or better yet, implement the workaround and test with the current 0.7.0 version
Just FYI - I don't know if this requires any RHQ code change, but it appears to fail w/ augeas 0.7.1 snippet of httpd.conf before change: [root@jiaozi conf]# tail -n 20 httpd.conf # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #<VirtualHost *:80> # ServerAdmin webmaster.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost> <VirtualHost jiaozi.usersys.redhat.com:80> ServerAdmin webmaster.com DocumentRoot /var/www/html/vhost ServerName jiaozi.usersys.redhat.com ErrorLog logs/dummy-host.example.com-error_log CustomLog logs/dummy-host.example.com-access_log common </VirtualHost> After changing the server admin for the vhost: [root@jiaozi conf]# tail -n 20 httpd.conf # # # # # # # # # # # # <VirtualHost jiaozi.usersys.redhat.com:80> ServerAdmin webmaster.redhat.com DocumentRoot /var/www/html/vhost ServerName jiaozi.usersys.redhat.com ErrorLog logs/dummy-host.example.com-error_log CustomLog logs/dummy-host.example.com-access_log common </VirtualHost> # [root@jiaozi conf]# rpm -qa|grep augeas augeas-libs-0.7.1-1.fc12.x86_64 augeas-0.7.1-1.fc12.x86_64
commit 689941199bfcfac9c1551f6192562e91bd9a6553
Hmm, I was still seeing this as of latest successful build on Friday; have assured that augeas 0.7.1 was running on agent platform...
QA Verified. Removing artifacts in /tmp from old testing resolved the issue. This is perhaps something we should note in community release for anyone who might have tried and failed in the past to use this functionality.
Mass-closure of verified bugs against JON.