Bug 537068 - samba: add share resource fail if unchecked 'Unset' check box of some properties but don't input any value for those properties
samba: add share resource fail if unchecked 'Unset' check box of some propert...
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Configuration (Show other bugs)
1.4
x86_64 Linux
low Severity low (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
: SubBug
Depends On:
Blocks: RHQ_Config 545570 rhq_triage
  Show dependency treegraph
 
Reported: 2009-11-12 06:29 EST by Rajan Timaniya
Modified: 2014-05-16 09:53 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-16 09:53:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
screenshot for exception (162.15 KB, image/png)
2009-11-12 06:29 EST, Rajan Timaniya
no flags Details

  None (edit)
Description Rajan Timaniya 2009-11-12 06:29:59 EST
Created attachment 369184 [details]
screenshot for exception

Description of problem:
samba: add share resource fail if unchecked 'Unset' check box of some properties but don't input any value for those properties

Test case: https://engineering.redhat.com/trac/IntegratedMgmtQE/wiki/Spearhead_RHEL_config_samba_Testplan
(User_story_278:Testcase -15)


Version-Release number of selected component (if applicable):
version: 1.4.0-SNAPSHOT

How reproducible:


Steps to Reproduce:
1. Log in to imanage
2. Click on Overview and then Dashboard
3. Click on 'Samba Server' under the 'Recently Added  
     Resources'
4. Click on 'INVENTORY' and select the option 
    'OVERVIEW'
5. In 'Child Resources' there is selection box to select 
     '- Samba Share' or 'Services'. Select '- Samba Share' 
     and click on 'OK' button
6. To create new samba share, input given below 
     values and then click on 'SUBMIT' button
     Resource Name: myshare
     Name: myshare
     Path: /tmp/myshare
     Comment: myshare
     Browseable : 
     Read only: 
     Printable: 
     Guest ok: 
     Valid Users: testboy, rhqadmin

Unchecked 'Unset' check box of some properties (Browseable, Read only, Printable, Guest ok) but don't input any value for those properties.
  
Actual results:
add resource fail with following exception
java.lang.RuntimeException: File '/etc/samba/smb.conf/error':
/files/etc/samba/smb.conf/target/write list
File '/etc/samba/smb.conf/error':
/usr/share/augeas/lenses/dist/samba.aug:25.15-.62
File '/etc/samba/smb.conf/error/me':
Value '' does not match regexp /[^;# \t\n][^;#\n]*[^;# \t\n]|[^;# \t\n/ in store lens

	at org.rhq.plugins.augeas.AugeasConfigurationComponent.saveConfigurationFile(AugeasConfigurationComponent.java:552)
	at org.rhq.plugins.augeas.AugeasConfigurationComponent.createResource(AugeasConfigurationComponent.java:188)
	at org.rhq.plugins.samba.SambaServerComponent.createResource(SambaServerComponent.java:61)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: net.augeas.AugeasException: save failed
	at net.augeas.Augeas.processLastCall(Augeas.java:396)
	at net.augeas.Augeas.save(Augeas.java:338)
	at org.rhq.plugins.augeas.AugeasConfigurationComponent.saveConfigurationFile(AugeasConfigurationComponent.java:550)
	... 12 more
 

Expected results:
There should provide proper error/alert message

Additional info:
Comment 1 Sunil Kondkar 2009-12-23 08:39:54 EST
This bug is also reproducible in Apache configurations. If user unchecks 'Unset' check box of fields like 'Server Name' but does not input any value in the field, clicking on save displays 'Failure' status in 'Configuration->History' tab of apache resource.

Steps To Reproduce:

1. Login to imanage UI.
2. Navigate to the apache httpd resource.
3. Navigate to the 'Configurtion' tab.
4. Click on 'Change Properties' button.
5. Uncheck 'Unset' check box for field 'Server Name'.
6. Click on 'Save' button.
Comment 2 Sunil Kondkar 2010-01-21 02:08:17 EST
Verified this bug on build#22. This is not reproducible for apache configurations. Now if user unchecks 'Unset' check box of fields like 'Server Name' but does not input any value in the field, there is no failure.
Comment 3 Rajan Timaniya 2010-02-09 04:50:24 EST
Verified this bug for samba plug in on (linux-config) GIT Revision: 3c58c9c2e9f595af99088856fe5a698b7df6734f 

Exception got changed, the changed exception as given below:
java.lang.NullPointerException
	at org.rhq.plugins.augeas.AugeasConfigurationComponent.createResource(AugeasConfigurationComponent.java:212)
	at org.rhq.plugins.samba.SambaServerComponent.createResource(SambaServerComponent.java:90)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Comment 4 Rajan Timaniya 2010-02-09 05:14:01 EST
Verified this bug for apache plug in on (linux-config) GIT Revision:
3c58c9c2e9f595af99088856fe5a698b7df6734f 

Add resource fail with following exception:
net.augeas.AugeasException: Failed to initialize Augeas. It is probably not installed.
	at org.rhq.augeas.AugeasProxy.load(AugeasProxy.java:116)
	at org.rhq.plugins.apache.ApacheServerComponent.getAugeasProxy(ApacheServerComponent.java:351)
	at org.rhq.plugins.apache.ApacheServerComponent.createResource(ApacheServerComponent.java:378)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.augeas.jna.Aug
	at net.augeas.Augeas.<init>(Augeas.java:88)
	at org.rhq.augeas.AugeasProxy.load(AugeasProxy.java:102)
	... 12 more
Comment 5 wes hayutin 2010-02-16 11:51:44 EST
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug
Comment 6 wes hayutin 2010-02-16 11:57:57 EST
making sure we're not missing any bugs in rhq_triage
Comment 7 Corey Welton 2010-10-05 09:08:13 EDT
Lowering severity/priority - not an enterprise plugin

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