Bug 545579 - sudoers config field "Command" needs to be a required field
sudoers config field "Command" needs to be a required field
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
All Linux
low Severity high (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
John Sefler
: SubBug
Depends On:
  Show dependency treegraph
Reported: 2009-12-08 16:36 EST by John Sefler
Modified: 2014-05-16 16:08 EDT (History)
4 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description John Sefler 2009-12-08 16:36:55 EST
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":
File "/etc/sudoers/error/lens":
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 14:44:12 EST
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 11:55:19 EST
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

new = Tracking + FutureFeature + SubBug
Comment 3 wes hayutin 2010-02-16 12:00:30 EST
making sure we're not missing any bugs in rhq_triage

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