Ticket #131 (closed Enhancement: fixed)

Opened 1 year ago

Last modified 8 months ago

Add GUI RPC to reset project debts

Reported by: Nicolas Assigned to: davea
Priority: Minor Milestone: Undetermined
Component: Client - Daemon Version:
Keywords: GUIRPC debt Cc:

Description

Feature request: Add a GUI RPC to the client to reset project debts. Preferably to set them to an arbitrary value, not only to zero them.

From what I know about debts, they are adjusted so that the sum of them is 0. This adjustment be done immediately after this RPC. However, changing from a positive debt on a single project to 0 would make it go positive again (and bring other projects closer to zero). For this reason, my suggested RPC can set multiple projects at a time, not needing one RPC per project.

Suggested RPC:

<set_debt>
    <project>
        <project_url>http://project1</project_url>
        <long_term_debt>0</long_term_debt>
        <short_term_debt>0</short_term_debt>
    </project>
    <project>
        <project_url>http://project2</project_url>
        <long_term_debt>0</long_term_debt>
        <short_term_debt>0</short_term_debt>
    </project>
</set_debt>

Answer to that would be <success/> like from most "set" RPCs. Note that the client should handle a missing LTD or STD tag (so that the RPC can be used to only change one of them).

I noticed the output of <get_project_status> and <get_state> RPCs already have the debts; so we have a mechanism to "get" them already.

Change History

(in reply to: ↑ description ) 04/27/07 06:58:24 changed by anonymous

Replying to Nicolas:

Feature request: Add a GUI RPC to the client to reset project debts. Preferably to set them to an arbitrary value, not only to zero them. From what I know about debts, they are adjusted so that the sum of them is 0. This adjustment be done immediately after this RPC. However, changing from a positive debt on a single project to 0 would make it go positive again (and bring other projects closer to zero). For this reason, my suggested RPC can set multiple projects at a time, not needing one RPC per project. Suggested RPC: {{{ <set_debt> <project> <project_url>http://project1</project_url> <long_term_debt>0</long_term_debt> <short_term_debt>0</short_term_debt> </project> <project> <project_url>http://project2</project_url> <long_term_debt>0</long_term_debt> <short_term_debt>0</short_term_debt> </project> </set_debt> }}} Answer to that would be <success/> like from most "set" RPCs. Note that the client should handle a missing LTD or STD tag (so that the RPC can be used to only change one of them). I noticed the output of <get_project_status> and <get_state> RPCs already have the debts; so we have a mechanism to "get" them already.

A couple of the possible CPU scheduler modifications will need different things that need to be reset as a group.

05/06/07 14:38:29 changed by Nicolas

  • keywords set to GUIRPC debt.

05/26/07 14:15:59 changed by boincadm

  • status changed from new to closed.
  • resolution set to fixed.

(In [12749]) - Add GUI RPC to set projects debts (short and long term).

Lets you set all of them at once, as suggested by Nicolas Alvarez. fixes #131

client/

gui_rpc_server_ops.C

html/user/

sample_index.php

lib/

boinc_cmd.C gui_rpc_client.h gui_rpc_client_ops.C

06/30/07 10:33:35 changed by Nicolas

  • status changed from closed to reopened.
  • resolution deleted.

Following report on #302, I noticed the RPC isn't working. I tried this with guirpc_debug turned on, and I saw the core client is sending an empty reply back. No <success/> but no <error> either.

2007-06-30 14:02:32 [---] [guirpc_debug] GUI RPC Command = '<boinc_gui_rpc_request>
<set_debts>
    <project>
        <master_url>http://climateprediction.net/</master_url>
        <short_term_debt>0.000000</short_term_debt>
        <long_term_debt>0.000000</long_term_debt>
    </project>
</set_debts>
</boinc_gui_rpc_request>
^C'
2007-06-30 14:02:32 [---] [guirpc_debug] GUI RPC reply: '<boinc_gui_rpc_reply>
</boinc_gui_rpc_reply>
^C'

What boinc_cmd is sending seems to be correct. I looked at the way set_debt expects the XML, and I think it should work with that XML input (although I don't know about the details of the XML parser API). It's strange that it doesn't work but no <error> is returned either.

06/30/07 11:46:23 changed by davea

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [13065]) - GUI RPC: debug set_debts handler. Fixes #131

client/

gui_rpc_server_ops.C

08/03/07 12:01:50 changed by Nicolas

BOINC client windows_intelx86 5.10.13, RPC seems to be still broken. I will try 5.10.17 later; I was sticking to .13 trying to track down a different problem (AMS-related crash).

(follow-up: ↓ 8 ) 08/20/07 20:01:34 changed by Nicolas

  • status changed from closed to reopened.
  • resolution deleted.

I don't see any change on the client_state.xml after calling the set_debt RPC. BOINC 5.10.18, Windows.

(in reply to: ↑ 7 ; follow-up: ↓ 9 ) 02/07/08 07:36:07 changed by Nicolas

  • status changed from reopened to closed.
  • resolution set to fixed.

Replying to Nicolas:

I don't see any change on the client_state.xml after calling the set_debt RPC. BOINC 5.10.18, Windows.

I don't know when this was fixed, but it definitely works on 5.10.3x.

(in reply to: ↑ 8 ) 02/07/08 07:39:01 changed by Nicolas

Tracked it down. It was indeed fixed in [13065], but applied to the 5.10 branch in [13211], fix available since 5.10.14.


If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.