Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011478Openbravo ERPA. Platformpublic2009-11-24 16:202009-12-15 04:56
pjuvara 
iperdomo 
immediatemajorhave not tried
closedfixed 
5
2.50MP8 
2.50MP10 
Core
No
0011478: Heartbeat check can be bypassed
Starting from 2.50 MP6, the Module Management window checks that the heartbeat is enabled before modules can be downloaded.

This functionality however can be easily bypassed either intentionally or accidentally and must be strengthen.

Users can enable the heartbeat then go to the Process Request window and unschedule the corresponding process. As a result, the system considers the heartbeat enabled but no actual beat is sent.
The Heartbeat Configuration window and the heartbeat status check in the Module Management window should check that not only that AD_System_Info.IsHeartbeatActive is set to Y but that there is also a scheduled process request to send beats.
No tags attached.
Issue History
2009-11-24 16:20pjuvaraNew Issue
2009-11-24 16:20pjuvaraAssigned To => rafaroda
2009-11-24 16:31iperdomoAssigned Torafaroda => iperdomo
2009-11-24 17:04iperdomoStatusnew => scheduled
2009-11-24 17:04iperdomofix_in_branch => pi
2009-11-24 23:08hgbotCheckin
2009-11-24 23:08hgbotNote Added: 0022149
2009-11-24 23:08hgbotStatusscheduled => resolved
2009-11-24 23:08hgbotResolutionopen => fixed
2009-11-24 23:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9897d630fd6809e104faf50c769763b1933c0e63 [^]
2009-12-04 09:14hudsonbotCheckin
2009-12-04 09:14hudsonbotNote Added: 0022416
2009-12-10 13:10mtaalNote Added: 0022636
2009-12-10 13:10mtaalStatusresolved => new
2009-12-10 13:10mtaalResolutionfixed => open
2009-12-10 13:51iperdomoStatusnew => scheduled
2009-12-10 18:08hgbotCheckin
2009-12-10 18:08hgbotNote Added: 0022658
2009-12-10 18:08hgbotStatusscheduled => resolved
2009-12-10 18:08hgbotResolutionopen => fixed
2009-12-10 18:08hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/9897d630fd6809e104faf50c769763b1933c0e63 [^] => http://code.openbravo.com/erp/devel/pi/rev/e82d1b5b692e2d47465162fef91ac6ae143d8acf [^]
2009-12-10 23:41mtaalNote Added: 0022666
2009-12-10 23:41mtaalStatusresolved => new
2009-12-10 23:41mtaalResolutionfixed => open
2009-12-11 10:22iperdomoStatusnew => scheduled
2009-12-11 12:10hgbotCheckin
2009-12-11 12:10hgbotNote Added: 0022698
2009-12-11 12:10hgbotStatusscheduled => resolved
2009-12-11 12:10hgbotResolutionopen => fixed
2009-12-11 12:10hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/e82d1b5b692e2d47465162fef91ac6ae143d8acf [^] => http://code.openbravo.com/erp/devel/pi/rev/bc363efd9e77743f15ad98e4a40e3ffa8f570c93 [^]
2009-12-14 12:21sureshbabuNote Added: 0022745
2009-12-14 12:21sureshbabuStatusresolved => closed
2009-12-14 12:21sureshbabuFixed in Version => 2.50MP10
2009-12-15 00:00anonymoussf_bug_id0 => 2914440
2009-12-15 04:56hudsonbotCheckin
2009-12-15 04:56hudsonbotNote Added: 0022782

Notes
(0022149)
hgbot   
2009-11-24 23:08   
Repository: erp/devel/pi
Changeset: 9897d630fd6809e104faf50c769763b1933c0e63
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Tue Nov 24 23:07:24 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9897d630fd6809e104faf50c769763b1933c0e63 [^]

Fixes issue 11478: Checks for a scheduled HB process request

---
M src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
---
(0022416)
hudsonbot   
2009-12-04 09:14   
---
A changeset related to this issue has passed a series of tests and has been promoted to main:

Changeset: http://code.openbravo.com/erp/devel/main/rev/f6bc559b1872 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
---
(0022636)
mtaal   
2009-12-10 13:10   
The check also has to be changed in the TestHeartBeat class. Check the usage of the SystemInfo.isEnableHeartBeat in this class, on each place (I think there are 4 or so) the check needs to be changed to also count the num. of processrequests.

Antother remark, maybe it is better to explicitly use an and expression in the ModuleManager.isHeartBeatEnabled() method:
    prCriteria.add(Expression.and(Expression.eq(ProcessRequest.PROPERTY_PROCESS, HBProcess),
        Expression.eq(ProcessRequest.PROPERTY_CHANNEL, Channel.SCHEDULED.toString())));
 

Another thing I noticed is that when I unschedule or remove the processrequest then the button in the heartbeat configuration still says 'disable heartbeat'. Maybe a solution is to recreate the processrequest also in that window.

gr. Martin
(0022658)
hgbot   
2009-12-10 18:08   
Repository: erp/devel/pi
Changeset: e82d1b5b692e2d47465162fef91ac6ae143d8acf
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Thu Dec 10 18:07:47 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e82d1b5b692e2d47465162fef91ac6ae143d8acf [^]

Fixes issue 11478: Refactored code that checks if HB is enabled

---
M src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
M src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
M src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java
---
(0022666)
mtaal   
2009-12-10 23:41   
I noticed still two things:
First error scenario:
1) I first enable heartbeat
2) then remove the process request
3) then go to module management install module
4) page is shown 'do you want to enable heartbeat'
--> Problem: I have to click twice on the continue button before the wizard continues

Second error scenario:
1) I first enable heartbeat
2) then unschedule the process request
3) then go to module management install module
4) wizard continues without asking to enable heartbeat
5) process request is however not rescheduled

gr. Martin
(0022698)
hgbot   
2009-12-11 12:10   
Repository: erp/devel/pi
Changeset: bc363efd9e77743f15ad98e4a40e3ffa8f570c93
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Fri Dec 11 12:10:13 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/bc363efd9e77743f15ad98e4a40e3ffa8f570c93 [^]

Fixes issue 11478: Refactored code that checks if HB is enabled

---
M src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
M src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java
---
(0022745)
sureshbabu   
2009-12-14 12:21   
Tested, module management window now checks whether heartbeat is enabled or not even if the heartbeat process is unscheduled in process request window
(0022782)
hudsonbot   
2009-12-15 04:56   
---
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/e7ad8a48210d [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15705.obx [^]
---