Bug 846292 - Apache: Error on editing option of directory inside apache virtual host
Summary: Apache: Error on editing option of directory inside apache virtual host
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Apache
Version: JON 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER01
: JON 3.2.0
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 860839
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-07 11:03 UTC by Sunil Kondkar
Modified: 2014-01-02 20:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 860839 (view as bug list)
Environment:
Last Closed: 2014-01-02 20:36:12 UTC
Type: Bug
Embargoed:


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

Description Sunil Kondkar 2012-08-07 11:03:33 UTC
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:

Always

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 15:44:45 UTC
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 14:05:50 UTC
I've reproduced the bug on 1.6.0_31, so it is not jdk7 related

Comment 3 Charles Crouch 2012-08-15 21:52:38 UTC
Thanks jk. As per triage pushing to jon312

Comment 4 Sunil Kondkar 2012-08-16 09:17:13 UTC
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 10:36:54 UTC
Created attachment 616463 [details]
mylyn/context/zip

Comment 6 Lukas Krejci 2012-09-24 10:38:00 UTC
Ignore the above comment and attachment - playing with Eclipse gone wrong ;)

Comment 7 Lukas Krejci 2012-09-24 13:01:35 UTC
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 12:58:07 UTC
I take it back :) I was able to reproduce...

Comment 9 Lukas Krejci 2012-09-26 20:33:05 UTC
Bug 860839 fixed this in master.

Comment 10 mark yarborough 2012-11-20 20:45:48 UTC
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-22 00:08:29 UTC
This has been fixed upstream as per comment 9.

Comment 12 Lukas Krejci 2013-10-14 13:09:34 UTC
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 15:00:53 UTC
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.