Bug 545579

Summary: sudoers config field "Command" needs to be a required field
Product: [Other] RHQ Project Reporter: John Sefler <jsefler>
Component: PluginsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: low    
Version: unspecifiedCC: ccrouch, cwelton, jshaughn, whayutin
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-16 20:08:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Sefler 2009-12-08 21:36:55 UTC
Description of problem:
When the saving a sudoers config entry without setting a value for the "Command" field, an augeas exception is thrown in the agent.log as shown below:
The fix is to make the Command field a required rhq field.

2009-12-08 17:30:44,161 ERROR [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.UpdateResourceConfigurationRunner)- Plugin Error: Exception thrown while updating Resource configuration for Sudoers Resource with id [10668].
java.lang.RuntimeException: File "/etc/sudoers/error/path":
/files/etc/sudoers/spec/host_group
File "/etc/sudoers/error/lens":
/usr/share/augeas/lenses/dist/sudoers.aug:451.18-452.45
File "/etc/sudoers/error/message":
Failed to match 
    { /host/ = /[^\001-\004\t\n #,:=\\][^\001-\004\n#,:=]*[^\001-\004\t\n #,:=\\]|[^\001-\004\t\n #,:=\\]/ }({ /host/ = /[^\001-\004\t\n #,:=\\][^\001-\004\n#,:=]*[^\001-\004\t\n #,:=\\]|[^\001-\004\t\n #,:=\\]/ })*{ /command/ = /[^\001-\004\t\n #,:=\\][^\001-\004\n#,:=]*[^\001-\004\t\n #,:=\\]|[^\001-\004\t\n #,:=\\]/ }({ /command/ = /[^\001-\004\t\n #,:=\\][^\001-\004\n#,:=]*[^\001-\004\t\n #,:=\\]|[^\001-\004\t\n #,:=\\]/ })*
  with tree
    { "host" = "foo" }

	at org.rhq.plugins.augeas.AugeasConfigurationComponent.saveConfigurationFiles(AugeasConfigurationComponent.java:614)
	at org.rhq.plugins.augeas.AugeasConfigurationComponent.updateResourceConfiguration(AugeasConfigurationComponent.java:178)
	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.saveConfigurationFiles(AugeasConfigurationComponent.java:612)
	... 11 more


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


How reproducible:


Steps to Reproduce:
from within the rhq gui for a Sudoers resource...
1. Click the Configure tab
2. Click Edit
3. Add New
4. User/Group= me    HostAlias= foo    (do not set any more fields)
5. Click OK
6. Click Save

Actual results:
The agent.log will show the exception above and the config history will show a failure for this date submitted.

Expected results:


Additional info:

Comment 1 wes hayutin 2010-02-08 19:44:12 UTC
Charles does not want this worked on until the feature is back on the road map,
removing the automation blocker tag.

Comment 2 wes hayutin 2010-02-16 16:55:19 UTC
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug

Comment 3 wes hayutin 2010-02-16 17:00:30 UTC
making sure we're not missing any bugs in rhq_triage