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:
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.
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.
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)
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
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs. keyword: new = Tracking + FutureFeature + SubBug
making sure we're not missing any bugs in rhq_triage
Lowering severity/priority - not an enterprise plugin