Bug 737647 - Unclear error message for modifying drift on folder w/ unreadable file.
Summary: Unclear error message for modifying drift on folder w/ unreadable file.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.0.1
Hardware: Unspecified
OS: Unspecified
high
unspecified vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 707225
TreeView+ depends on / blocked
 
Reported: 2011-09-12 19:28 UTC by dgao
Modified: 2012-02-07 19:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:18:24 UTC


Attachments (Terms of Use)

Description dgao 2011-09-12 19:28:02 UTC
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 15:58:22 UTC
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 18:25:10 UTC
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 20:16:39 UTC
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 19:18:24 UTC
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.