Bug 715380
Summary: | Uncaught exception defining Alert that triggers CLI script | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Mike Foley <mfoley> | ||||
Component: | Core UI | Assignee: | Jay Shaughnessy <jshaughn> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 4.1 | CC: | hrupp, jshaughn | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | 4,1 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-02-07 19:25:10 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: | |||||||
Bug Depends On: | 736762 | ||||||
Bug Blocks: | 729848, 730796 | ||||||
Attachments: |
|
Description
Mike Foley
2011-06-22 18:02:47 UTC
I'm not able to reproduce this issue. I've been able to define a cli alert sender and played with the various options in the gui. This problem may have already been fixed and should be re-qualified. Having said that, I can't actually get the script to run successfully. No matter what user I set (Myself or another user) I seem to get a server-side failure like: Caused by: org.rhq.enterprise.server.authz.PermissionException: The subject [rhqadmin] did not have a session: invocation: method=public org.rhq.core.domain.resource.Resource org.r hq.enterprise.server.resource.ResourceManagerBean.getResource(org.rhq.core.domain.auth.Subject,int),context-data={} Looking into this further. As an aside, I am using Windows. I think I need to talk this over with lkrejci or some others. To me it looks like we never actually login the user specified on the cli alert sender. But if so I'm not sure how this ever worked, unless it was somehow relying on the legacy session 'feature' where multiple logins for the same user shared a session. putting this on hold until I can get more info... mazz, assigning to you just to see if you can replicate the problem I'm seeing. If you see the same we can take a look at it together. If you see the same, take a look at LocalClient, it seems to me the login/logout code is never actually utilized. gave some suggested fix. jay will test and commit master commit 28ad282ea3d014f3fb4483e2a311958f7e425299 The gui exception in this bz seems to have been fixed previously. But there was an additional issue that prevented scripts from running because it tried to run them without a session. This may have worked in the past, well back, before we fixed our session handling, because the sender may have been able to piggyback on an existing session. For example, if rhqadmin was logged into a gui session, and the script was being run as rhqadmin, it would have worked. But no more. So, this fix from mazz gives the runner a proper session. Note that a very small portion of the script's timeout period is now devoted to generating a script engine with a valid session. Also, the session is now eagerly terminated in a finally. Created attachment 519673 [details]
CLI Alert script
retesting. having some trouble still running the script. attached the script i am trying to run. retesting. i have logged this BZ while trying to verify. https://bugzilla.redhat.com/show_bug.cgi?id=736762 i was able to define an alert with a CLI script without exception. changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE |