diff --git a/aclocal.m4 b/aclocal.m4 index 659ad9080f..d9ce01e5fe 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1104,7 +1104,7 @@ AC_DEFUN([SAH_HEADER_STDCXX],[ # # Revision Log: # $Log$ -# Revision 1.67 2004/02/06 23:46:26 davea +# Revision 1.68 2004/02/17 02:16:51 boincadm # *** empty log message *** # # Revision 1.1 2003/12/11 18:38:24 korpela diff --git a/checkin_notes b/checkin_notes index 3e32922521..26f1422680 100755 --- a/checkin_notes +++ b/checkin_notes @@ -10047,3 +10047,29 @@ David Feb 15 2004 py/Boinc/ database.py setup_project.py + +David Feb 16 2004 + - enable the min_core_version attribute of app_version: + don't send a result to a host whose core version is too low. + (Note: this is a no-op unless you set min_core_version + to something nonzero). + If a host isn't sent any work because of this, + send a message suggesting upgrade + - In the scheduler, parse from within + Also parse it within for backwards compat + - put an element at the top level of , + not within + - add uniqueness constraints for category and forum + - add a script to set up initial categories and forums + + client/ + client_state.C + client_types.C + db/ + constraints.sql + html/ops/ + create_forums.php (new) + sched/ + handle_request.C + sched_shmem.C + server_types.C diff --git a/client/client_state.C b/client/client_state.C index abaf72bb3a..6c59a90c79 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -920,11 +920,9 @@ int CLIENT_STATE::report_result_error( buf, "%s\n\n" "%d\n" - "%d\n" "%d\n", err_msg, res.active_task_state, - res.exit_status, res.signal ); res.stderr_out.append(buf); diff --git a/client/client_types.C b/client/client_types.C index 8dd9f37981..f767de6c34 100644 --- a/client/client_types.C +++ b/client/client_types.C @@ -940,9 +940,11 @@ int RESULT::write(FILE* out, bool to_server) { "\n" " %s\n" " %f\n" + " %d\n" " %d\n", name, final_cpu_time, + exit_status, state ); n = stderr_out.length(); diff --git a/configure b/configure index 710ef850f1..b5bd3d81ed 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.73 . +# From configure.ac Revision: 1.74 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for BOINC 2.25. # diff --git a/db/constraints.sql b/db/constraints.sql index 79abc89d40..d2be030e74 100644 --- a/db/constraints.sql +++ b/db/constraints.sql @@ -98,6 +98,12 @@ alter table profile alter table subscriptions add unique sub_unique(userid, threadid); +alter table category + add unique cat1(name, is_helpdesk); + +alter table forum + add unique(category, title); + alter table thread add fulltext index thread_title(title); diff --git a/html/ops/create_forums.php b/html/ops/create_forums.php new file mode 100644 index 0000000000..e39d62cbff --- /dev/null +++ b/html/ops/create_forums.php @@ -0,0 +1,34 @@ + diff --git a/sched/handle_request.C b/sched/handle_request.C index e9568d3a62..5e0025e1ff 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -53,6 +53,7 @@ struct WORK_REQ { double seconds_to_fill; double disk_available; int nresults; + int core_client_version; // the following flags are set whenever a result is infeasible; // used to construct explanatory message to user @@ -61,6 +62,7 @@ struct WORK_REQ { bool insufficient_mem; bool insufficient_speed; bool no_app_version; + bool outdated_core; }; bool anonymous(PLATFORM& platform) { @@ -253,6 +255,21 @@ bool find_app_version( return true; } +// verify that the given APP_VERSION will work with the core client +// +bool app_core_compatible(WORK_REQ& wreq, APP_VERSION& av) { + if (wreq.core_client_version < av.min_core_version) { + log_messages.printf( + SchedMessages::DEBUG, + "Outdated core version: wanted %d, got %d\n", + av.min_core_version, wreq.core_client_version + ); + wreq.outdated_core = true; + return false; + } + return true; +} + // add the given workunit to a reply. // look up its app, and make sure there's a version for this platform. // Add the app and app_version to the reply also. @@ -761,34 +778,6 @@ static void scan_work_array( continue; } - // don't send if we've already sent a result of this WU to this user - // - if (config.one_result_per_user_per_wu) { - sprintf(buf, - "where workunitid=%d and userid=%d", - wu_result.workunit.id, reply.user.id - ); - retval = result.count(n, buf); - if (retval) { - log_messages.printf( - SchedMessages::CRITICAL, - "send_work: can't get result count (%d)\n", retval - ); - continue; - } else { - if (n>0) { -#if 0 - log_messages.printf( - SchedMessages::NORMAL, - "send_work: user %d already has %d result(s) for WU %d\n", - reply.user.id, n, wu_result.workunit.id - ); -#endif - continue; - } - } - } - // don't send if host can't handle it // wu = wu_result.workunit; @@ -817,6 +806,39 @@ static void scan_work_array( wu_result.infeasible_count++; continue; } + if (!app_core_compatible(wreq, *avp)) { + wu_result.infeasible_count++; + continue; + } + } + + // Don't send if we've already sent a result of this WU to this user. + // NOTE: do this check last since it involves a DB access + // + if (config.one_result_per_user_per_wu) { + sprintf(buf, + "where workunitid=%d and userid=%d", + wu_result.workunit.id, reply.user.id + ); + retval = result.count(n, buf); + if (retval) { + log_messages.printf( + SchedMessages::CRITICAL, + "send_work: can't get result count (%d)\n", retval + ); + continue; + } else { + if (n>0) { +#if 0 + log_messages.printf( + SchedMessages::NORMAL, + "send_work: user %d already has %d result(s) for WU %d\n", + reply.user.id, n, wu_result.workunit.id + ); +#endif + continue; + } + } } result = wu_result.result; @@ -901,6 +923,8 @@ int send_work( wreq.insufficient_mem = false; wreq.insufficient_speed = false; wreq.no_app_version = false; + wreq.core_client_version = sreq.core_client_major_version*100 + + sreq.core_client_minor_version; wreq.nresults = 0; log_messages.printf( @@ -954,6 +978,11 @@ int send_work( " (there was work but your computer would not finish it before it is due" ); } + if (wreq.outdated_core) { + strcat(reply.message, + " (your core client is out of date - please upgrade)" + ); + } strcpy(reply.message_priority, "low"); reply.request_delay = 10; diff --git a/sched/sched_shmem.C b/sched/sched_shmem.C index a6c1d36f24..3322f59d5f 100644 --- a/sched/sched_shmem.C +++ b/sched/sched_shmem.C @@ -139,11 +139,5 @@ APP_VERSION* SCHED_SHMEM::lookup_app_version( } } - // log_messages.printf( - // SchedMessages::DEBUG, - // "SCHED_SHMEM::lookup_app_version(appid=%d, platformid=%d, min_version=%d): best_avp=%d\n", - // appid, platformid, min_version, - // best_version); - return best_avp; } diff --git a/sched/server_types.C b/sched/server_types.C index 7a0412c983..55c6558652 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -359,6 +359,7 @@ int RESULT::parse_from_client(FILE* fin) { else if (parse_str(buf, "", name, sizeof(name))) continue; else if (parse_int(buf, "", client_state)) continue; else if (parse_double(buf, "", cpu_time)) continue; + else if (parse_int(buf, "", exit_status)) continue; else if (match_tag(buf, "")) { safe_strcat(xml_doc_out, buf); while (fgets(buf, 256, fin)) {