mirror of https://github.com/BOINC/boinc.git
- VDA: add some log messages
- scheduler: add VDA - client, web: change default prefs to min_buf=.1 days, max_buf=.5 days - scheduler: app plan function for vbox requires 7.0+ client svn path=/trunk/boinc/; revision=25351
This commit is contained in:
parent
433770dc16
commit
f18ffd6fe7
|
@ -18,13 +18,13 @@ RSA_LIBS = -lcrypto
|
|||
AM_LIBTOOLFLAGS =
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_srcdir)/api \
|
||||
-I$(top_srcdir)/db \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_srcdir)/lib/mac \
|
||||
-I$(top_srcdir)/sched \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/vda \
|
||||
$(PTHREAD_CFLAGS)
|
||||
|
||||
AM_CFLAGS = -Wall -Wextra -Wshadow -Wredundant-decls -Wdisabled-optimization -Wpointer-arith -Wstrict-aliasing
|
||||
|
|
|
@ -2296,3 +2296,23 @@ Rytis 27 Feb 2012
|
|||
|
||||
sched/
|
||||
antique_file_deleter.cpp
|
||||
|
||||
David 27 Feb 2012
|
||||
- VDA: add some log messages
|
||||
- scheduler: add VDA
|
||||
- client, web: change default prefs to min_buf=.1 days, max_buf=.5 days
|
||||
- scheduler: app plan function for vbox requires 7.0+ client
|
||||
|
||||
Makefile.incl
|
||||
sched/
|
||||
antique_file_deleter.cpp
|
||||
sched_config.cpp,h
|
||||
sched_customize.cpp
|
||||
handle_request.cpp
|
||||
html/inc/
|
||||
prefs.inc
|
||||
lib/
|
||||
prefs.cpp
|
||||
vda/
|
||||
vda.cpp
|
||||
sched_vda.cpp,h
|
||||
|
|
|
@ -219,12 +219,12 @@ $net_prefs = array(
|
|||
"</span>"
|
||||
),
|
||||
"work_buf_min_days",
|
||||
new NUM_SPEC(tra("days"), 0, 10, 0)
|
||||
new NUM_SPEC(tra("days"), 0, 10, .1)
|
||||
),
|
||||
new PREF_NUM(
|
||||
tra("... and up to an additional"),
|
||||
"work_buf_additional_days",
|
||||
new NUM_SPEC(tra("days"), 0, 10, .25)
|
||||
new NUM_SPEC(tra("days"), 0, 10, .5)
|
||||
),
|
||||
new PREF_BOOL(
|
||||
tra(
|
||||
|
|
|
@ -219,7 +219,7 @@ void GLOBAL_PREFS::defaults() {
|
|||
hangup_if_dialed = false;
|
||||
dont_verify_images = false;
|
||||
work_buf_min_days = 0.1;
|
||||
work_buf_additional_days = 0.25;
|
||||
work_buf_additional_days = 0.5;
|
||||
max_ncpus_pct = 0;
|
||||
max_ncpus = 0;
|
||||
cpu_scheduling_period_minutes = 60;
|
||||
|
|
|
@ -150,14 +150,14 @@ int delete_antiques_from_dir(char*dirpath, time_t mtime, uid_t uid) {
|
|||
|
||||
// stat
|
||||
errno = 0;
|
||||
if (lstat(path, &fstat) ) {
|
||||
if (lstat(path, &fstat)) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"delete_antiques_from_dir(): couldn't stat '%s: %s (%d)'\n",
|
||||
path, strerror(errno), errno
|
||||
);
|
||||
|
||||
// regular file
|
||||
} else if (fstat.st_mode & S_IFMT != S_IFREG) {
|
||||
} else if ((fstat.st_mode & S_IFMT) != S_IFREG) {
|
||||
log_messages.printf(MSG_DEBUG,"not a regular plain file\n");
|
||||
|
||||
// skip hidden files such as ".nfs"
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
#include "util.h"
|
||||
#include "filesys.h"
|
||||
|
||||
#include "sched_vda.h"
|
||||
|
||||
#include "credit.h"
|
||||
#include "sched_main.h"
|
||||
#include "sched_types.h"
|
||||
|
@ -1251,6 +1253,9 @@ void process_request(char* code_sign_key) {
|
|||
|
||||
handle_results();
|
||||
handle_file_xfer_results();
|
||||
if (config.enable_vda) {
|
||||
handle_vda();
|
||||
}
|
||||
|
||||
// Do this before resending lost jobs
|
||||
//
|
||||
|
|
|
@ -318,6 +318,7 @@ int SCHED_CONFIG::parse(FILE* f) {
|
|||
if (xp.parse_bool("debug_resend", debug_resend)) continue;
|
||||
if (xp.parse_bool("debug_send", debug_send)) continue;
|
||||
if (xp.parse_bool("debug_user_messages", debug_user_messages)) continue;
|
||||
if (xp.parse_bool("debug_vda", debug_vda)) continue;
|
||||
if (xp.parse_bool("debug_version_select", debug_version_select)) continue;
|
||||
|
||||
if (xp.parse_str("debug_req_reply_dir", debug_req_reply_dir, sizeof(debug_req_reply_dir))) continue;
|
||||
|
|
|
@ -188,6 +188,7 @@ struct SCHED_CONFIG {
|
|||
bool debug_resend;
|
||||
bool debug_send;
|
||||
bool debug_user_messages;
|
||||
bool debug_vda;
|
||||
bool debug_version_select;
|
||||
|
||||
char debug_req_reply_dir[256]; // keep sched_request and sched_reply
|
||||
|
|
|
@ -523,6 +523,13 @@ static inline bool app_plan_vbox(
|
|||
) {
|
||||
bool can_use_multicore = true;
|
||||
|
||||
// host must run 7.0+ client
|
||||
//
|
||||
if (sreq.core_client_major_version < 7) {
|
||||
add_no_work_message("BOINC client 7.0+ required for Virtualbox jobs");
|
||||
return false;
|
||||
}
|
||||
|
||||
// host must have VirtualBox 3.2 or later
|
||||
//
|
||||
if (strlen(sreq.host.virtualbox_version) == 0) {
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "sched_types.h"
|
||||
#include "sched_config.h"
|
||||
#include "sched_msgs.h"
|
||||
#include "sched_types.h"
|
||||
|
||||
using std::map;
|
||||
using std::string;
|
||||
|
@ -68,6 +69,11 @@ void handle_vda() {
|
|||
);
|
||||
return;
|
||||
}
|
||||
if (config.debug_vda) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[vda] DB: has chunk %s\n", ch.name
|
||||
);
|
||||
}
|
||||
chunks.insert(pair<string, DB_VDA_CHUNK_HOST>(string(ch.name), ch));
|
||||
}
|
||||
|
||||
|
@ -80,8 +86,13 @@ void handle_vda() {
|
|||
for (i=0; i<g_request->file_xfer_results.size(); i++) {
|
||||
RESULT& r = g_request->file_xfer_results[i];
|
||||
if (!starts_with(r.name, "upload_")) continue;
|
||||
char* file_name = r.name + strlen("upload_");
|
||||
if (!strstr(file_name, "vdafile")) continue;
|
||||
//char* file_name = r.name + strlen("upload_");
|
||||
if (!strstr(r.name, "vdafile")) continue;
|
||||
if (config.debug_vda) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[vda] DB: completed upload %s\n", r.name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// process list of present files;
|
||||
|
@ -92,6 +103,11 @@ void handle_vda() {
|
|||
//
|
||||
for (i=0; i<g_request->file_infos.size(); i++) {
|
||||
FILE_INFO& fi = g_request->file_infos[i];
|
||||
if (config.debug_vda) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[vda] request: client has file %s\n", fi.name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// for each vda_chunk_host not in file list:
|
||||
|
@ -103,6 +119,11 @@ void handle_vda() {
|
|||
while (it != chunks.end()) {
|
||||
DB_VDA_CHUNK_HOST& ch = (*it).second;
|
||||
if (!ch.found) {
|
||||
if (config.debug_vda) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[vda] in DB but not on client: %s\n", ch.name
|
||||
);
|
||||
}
|
||||
ch.delete_from_db();
|
||||
chunks.erase(it);
|
||||
mark_for_update(ch.vda_file_id);
|
||||
|
@ -116,11 +137,23 @@ void handle_vda() {
|
|||
//
|
||||
if (g_request->host.d_project_share) {
|
||||
double x = g_request->host.d_boinc_used_project;
|
||||
if (config.debug_vda) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[vda] share: %f used: %f\n",
|
||||
g_request->host.d_project_share, x
|
||||
);
|
||||
}
|
||||
it = chunks.begin();
|
||||
while (x > g_request->host.d_project_share && it != chunks.end()) {
|
||||
DB_VDA_CHUNK_HOST& ch = (*it).second;
|
||||
FILE_INFO fi;
|
||||
strcpy(fi.name, ch.name);
|
||||
if (config.debug_vda) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[vda] deleting: %s\n", ch.name
|
||||
);
|
||||
}
|
||||
//x -= ch.size;
|
||||
g_reply->file_deletes.push_back(fi);
|
||||
it++;
|
||||
}
|
||||
|
@ -134,8 +167,18 @@ void handle_vda() {
|
|||
if (!ch.transfer_in_progress) continue;
|
||||
if (!ch.transfer_wait) continue;
|
||||
if (ch.present_on_host) {
|
||||
if (config.debug_vda) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[vda] sending upload command: %s\n", ch.name
|
||||
);
|
||||
}
|
||||
// upload
|
||||
} else {
|
||||
if (config.debug_vda) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[vda] sending download command: %s\n", ch.name
|
||||
);
|
||||
}
|
||||
// download
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2012 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// BOINC is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
extern void handle_vda();
|
|
@ -212,6 +212,8 @@ int VDA_FILE_AUX::choose_host() {
|
|||
int retval;
|
||||
DB_HOST host;
|
||||
|
||||
return 467;
|
||||
|
||||
// replenish cache if needed
|
||||
//
|
||||
if (!available_hosts.size()) {
|
||||
|
|
Loading…
Reference in New Issue