This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 737647 - Unclear error message for modifying drift on folder w/ unreadable file.
Unclear error message for modifying drift on folder w/ unreadable file.
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.0.1
Unspecified Unspecified
high Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: 707225
  Show dependency treegraph
 
Reported: 2011-09-12 15:28 EDT by dgao
Modified: 2012-02-07 14:18 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:18:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description dgao 2011-09-12 15:28:02 EDT
When trying to modify a file drift configuration on a folder w/ file(s) that have non-readable permission, RHQ throws a global exception. Unfortunately this exception does not explain the root of the problem concisely.

Also in addition, non-readable file(s) should not stop the user from modifying file drift configuration on the folder. 

Error:

Failed to add new drift configuration [File System]

java.lang.RuntimeException:[1315855306660] javax.ejb.EJBException:java.lang.IllegalArgumentException: You cannot change an existing drift configuration's base directory or includes/excludes filters. -> java.lang.IllegalArgumentException:You cannot change an existing drift configuration's base directory or includes/excludes filters.
--- STACK TRACE FOLLOWS ---
[1315855306660] javax.ejb.EJBException:java.lang.IllegalArgumentException: You cannot change an existing drift configuration's base directory or includes/excludes filters. -> java.lang.IllegalArgumentException:You cannot change an existing drift configuration's base directory or includes/excludes filters.
    at Unknown.java_lang_RuntimeException_$RuntimeException__Ljava_lang_RuntimeException_2Ljava_lang_RuntimeException_2(Unknown source:0)
    at Unknown.com_google_gwt_user_client_rpc_core_java_lang_RuntimeException_1FieldSerializer_instantiate__Lcom_google_gwt_user_client_rpc_SerializationStreamReader_2Ljava_lang_RuntimeException_2(Unknown source:0)
    at Unknown.com_google_gwt_user_client_rpc_impl_SerializerBase$MethodMap_$instantiate__Lcom_google_gwt_user_client_rpc_impl_SerializerBase$MethodMap_2Lcom_google_gwt_user_client_rpc_SerializationStreamReader_2Ljava_lang_String_2Ljava_lang_Object_2(Unknown source:0)
    at Unknown.com_google_gwt_user_client_rpc_impl_SerializerBase_$instantiate__Lcom_google_gwt_user_client_rpc_impl_SerializerBase_2Lcom_google_gwt_user_client_rpc_SerializationStreamReader_2Ljava_lang_String_2Ljava_lang_Object_2(Unknown source:0)
    at Unknown.com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamReader_$readObject__Lcom_google_gwt_user_client_rpc_impl_AbstractSerializationStreamReader_2Ljava_lang_Object_2(Unknown source:0)
    at Unknown.com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
    at Unknown.com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Unknown source:0)
    at Unknown.com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
Comment 1 Charles Crouch 2011-09-15 11:58:22 EDT
The issue seems to be that we shouldn't be letting anyone change the config:

"You cannot change an
existing drift configuration's base directory or includes/excludes filters"

So it looks like we need better read-only settings.
Comment 2 John Sanda 2011-10-04 14:25:10 EDT
I believe the issue as reported involves our lack of handling of files that are not readable. This has been fixed.

commit hash: 786eb9d50b9c8beebf5a9a7edf18e8ba82ef79cd

from the commit log...

    When generating the initial change set, if a file is not readable, it is
    skipped and excluded from the change set since we cannot compute the SHA
    for the file.
    
    When generating a drift change set, if we detect a new file that is not
    readable, we skip it as well since we cannot compute the SHA. Now if an
    existing file that is already being monitored for drift has its
    permissions changed such that it is no longer readable, then it is
    treated and recorded as a deleted file entry.
Comment 3 Mike Foley 2011-10-04 16:16:39 EDT
verified 10/4/2011.  a file without permissions is skipped (as expected, see jsanda comment above).  no errors in agent log or server log.
Comment 4 Mike Foley 2012-02-07 14:18:24 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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