Bug 846292 - Apache: Error on editing option of directory inside apache virtual host
Apache: Error on editing option of directory inside apache virtual host
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Apache (Show other bugs)
JON 3.1.0
Unspecified Unspecified
unspecified Severity high
: ER01
: JON 3.2.0
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On: 860839
  Show dependency treegraph
Reported: 2012-08-07 07:03 EDT by Sunil Kondkar
Modified: 2014-01-02 15:36 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 860839 (view as bug list)
Last Closed: 2014-01-02 15:36:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
mylyn/context/zip (538 bytes, application/octet-stream)
2012-09-24 06:36 EDT, Lukas Krejci
no flags Details

  None (edit)
Description Sunil Kondkar 2012-08-07 07:03:33 EDT
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
Browser: Firefox
Java Version: "1.7.0_05"

How reproducible:


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.

Actual results:

Error on editing option of directory inside apache virtual host

Expected results:

Editing option of directory inside apache virtual host should be successful.

Additional info:

- 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.
Comment 1 Charles Crouch 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
Comment 2 Jirka Kremser 2012-08-15 10:05:50 EDT
I've reproduced the bug on 1.6.0_31, so it is not jdk7 related
Comment 3 Charles Crouch 2012-08-15 17:52:38 EDT
Thanks jk. As per triage pushing to jon312
Comment 4 Sunil Kondkar 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
Comment 5 Lukas Krejci 2012-09-24 06:36:54 EDT
Created attachment 616463 [details]
Comment 6 Lukas Krejci 2012-09-24 06:38:00 EDT
Ignore the above comment and attachment - playing with Eclipse gone wrong ;)
Comment 7 Lukas Krejci 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).
Comment 8 Lukas Krejci 2012-09-25 08:58:07 EDT
I take it back :) I was able to reproduce...
Comment 9 Lukas Krejci 2012-09-26 16:33:05 EDT
Bug 860839 fixed this in master.
Comment 10 mark yarborough 2012-11-20 15:45:48 EST
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).
Comment 11 Larry O'Leary 2012-11-21 19:08:29 EST
This has been fixed upstream as per comment 9.
Comment 12 Lukas Krejci 2013-10-14 09:09:34 EDT
Changing the status of the bug. As per comment 11, this has been in JON 3.2.0 for some time.
Comment 13 Sunil Kondkar 2013-10-21 11:00:53 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.