Red Hat Bugzilla – Bug 846292
Apache: Error on editing option of directory inside apache virtual host
Last modified: 2014-01-02 15:36:12 EST
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.
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
I've reproduced the bug on 1.6.0_31, so it is not jdk7 related
Thanks jk. As per triage pushing to jon312
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
Created attachment 616463 [details]
Ignore the above comment and attachment - playing with Eclipse gone wrong ;)
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).
I take it back :) I was able to reproduce...
Bug 860839 fixed this in master.
Per triage with loleary, crouch, mfoley: Move to JBoss ON product, set target release JON 3.2, clear priority (will be subject to further triage in JON 3.2 timeframe).
This has been fixed upstream as per comment 9.
Changing the status of the bug. As per comment 11, this has been in JON 3.2.0 for some time.
Verified on Version: 3.2.0.ER3 Build Number: c0742ed:90dd474
Add/Edit/Delete option of directory inside apache virtual host is successful. No errors in agent log.