Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#131 closed Enhancement (fixed)

Add GUI RPC to reset project debts

Reported by: Nicolas Owned by: 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 (9)

comment:1 in reply to:  description Changed 17 years ago 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.

comment:2 Changed 17 years ago by Nicolas

Keywords: GUIRPC debt added

comment:3 Changed 17 years ago by boincadm

Resolution: fixed
Status: newclosed

(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

comment:4 Changed 17 years ago by Nicolas

Resolution: fixed
Status: closedreopened

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.

comment:5 Changed 17 years ago by davea

Resolution: fixed
Status: reopenedclosed

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

client/

gui_rpc_server_ops.C

comment:6 Changed 17 years ago 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).

comment:7 Changed 17 years ago by Nicolas

Resolution: fixed
Status: closedreopened

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

comment:8 in reply to:  7 ; Changed 16 years ago by Nicolas

Resolution: fixed
Status: reopenedclosed

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.

comment:9 in reply to:  8 Changed 16 years ago 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.

Note: See TracTickets for help on using tickets.