Red Hat Bugzilla – Bug 860839
Apache: Error on editing option of directory inside apache virtual host
Last modified: 2013-09-03 10:42:27 EDT
+++ This bug was initially created as a clone of Bug #846292 +++
Description of problem:
If user edits option in the directory inside apache virtual host, clicking save button displays below error in agent log:
2012-08-07 15:32:10,835 ERROR [ResourceContainer.invoker.nonDaemon-4] (org.rhq.plugins.apache.ApacheDirectoryComponent)- Augeas failed to save configuration
The configuration history display failed status.
Version-Release number of selected component (if applicable):
Version: JON 3.1.1.ER1
Build Number: f629a35:6910991
Java Version: "1.7.0_05"
Steps to Reproduce:
1. Login to JON
2. Select the apache httpd resource
3. Click on 'Inventory' tab.
4. Enable augueas support in apache httpd resource->Inventory->Connection Settings' tab.
5. Create a virtual host.
6. Navigate to the 'Inventory->Child Resources' tab of virtual host
7. Create a directory using 'Create Child->Directory' (Add option say 'All' while creating new directory inside virtual host)
8. Navigate to the 'Configuration->Current' tab of the directory.
9. Click on 'Edit' image for 'options'.
10. Change the option from 'All' to anything else say 'FollowSymLinks' by selecting from the 'Option' dropdown.
11. Click 'OK' button.
12. Click on 'Save' button.
13. Observe the status of config update in 'Configuration->History' tab
14. Observe the agent log for error.
Error on editing option of directory inside apache virtual host
Editing option of directory inside apache virtual host should be successful.
- Oberved the same error when adding a new option or deleting the existing option in the directory inside apache virtual host
- Add/edit/delete option works in virtual host.
--- Additional comment from firstname.lastname@example.org on 2012-08-13 11:44:45 EDT ---
From triage:Can we check if this is jdk7 related, if it is we should fix. If not, then this should be targetted for jon312
--- Additional comment from email@example.com on 2012-08-15 10:05:50 EDT ---
I've reproduced the bug on 1.6.0_31, so it is not jdk7 related
--- Additional comment from firstname.lastname@example.org on 2012-08-15 17:52:38 EDT ---
Thanks jk. As per triage pushing to jon312
--- Additional comment from email@example.com on 2012-08-16 05:17:13 EDT ---
More observations: The error is not just in the 'options' section. I cannot modify any configuration in the directory inside apache virtual host.
I added 'All' value in 'Allow' section or selected the radio button 'Allow,Deny' in 'order' section. Clicking on 'Save' button displays the same error in agent log:
2012-08-16 14:41:37,702 ERROR [ResourceContainer.invoker.nonDaemon-14] (org.rhq.plugins.apache.ApacheDirectoryComponent)- Augeas failed to save configuration
--- Additional comment from firstname.lastname@example.org on 2012-09-24 06:36:54 EDT ---
Created attachment 616463 [details]
--- Additional comment from email@example.com on 2012-09-24 06:38:00 EDT ---
Ignore the above comment and attachment - playing with Eclipse gone wrong ;)
--- Additional comment from firstname.lastname@example.org on 2012-09-24 09:01:35 EDT ---
I could not reproduce the bug. Are you sure, you're running the agent with enough privileges to write to the Apache's config files? I.e. if you're editing /etc/httpd/conf/httpd.conf, you most probably have to run the agent as root (unless you play with permissions on the file and directories, the user the agent runs as and possibly SELinux policies).
--- Additional comment from email@example.com on 2012-09-25 08:58:07 EDT ---
I take it back :) I was able to reproduce...
Author: Lukas Krejci <firstname.lastname@example.org>
Date: Wed Sep 26 15:34:57 2012 +0200
[BZ 846292] - The directory component no longer blows up on updating
directory entries in other files than the main Apache config file.
Also slightly improved the error reporting during the
updateResourceConfiguration() call so that the error is more apparent
from the log entry.
Bulk closing of issues in old RHQ releases that are in production for a while now.
Please open a new issue when running into an issue.