Skip to content

Commit 1022371

Browse files
authored
Merge pull request #7021 from BOINC/dpa_docker33
client: if allow_multiple_clients is set, don't do Docker cleanup
2 parents 197fb4d + 24b9816 commit 1022371

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

client/client_state.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,13 @@ int CLIENT_STATE::init() {
747747

748748
process_gpu_exclusions();
749749

750-
docker_cleanup();
750+
// delete Docker images and containers not used by current jobs.
751+
// Skip this if multiple clients are allowed;
752+
// otherwise we'd delete other clients' containers
753+
//
754+
if (!cc_config.allow_multiple_clients) {
755+
docker_cleanup();
756+
}
751757

752758
check_clock_reset();
753759

html/ops/delete_spammers.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<?php
44
// This file is part of BOINC.
5-
// http://boinc.berkeley.edu
6-
// Copyright (C) 2024 University of California
5+
// https://boinc.berkeley.edu
6+
// Copyright (C) 2026 University of California
77
//
88
// BOINC is free software; you can redistribute it and/or modify it
99
// under the terms of the GNU Lesser General Public License
@@ -138,10 +138,10 @@
138138

139139
// delete a spammer account, and everything associated with it
140140
//
141-
function do_delete_user($user) {
141+
function do_delete_user($user, $reason) {
142142
global $test;
143143
$age = (time() - $user->create_time) / 86400;
144-
echo "deleting user\n";
144+
echo "deleting user: $reason\n";
145145
echo " ID: $user->id\n";
146146
echo " email: $user->email_addr\n";
147147
echo " name: $user->name\n";
@@ -166,7 +166,7 @@ function delete_list($fname) {
166166
if (!is_numeric($s)) die("bad ID $s\n");
167167
$user = BoincUser::lookup_id((int)$s);
168168
if ($user) {
169-
do_delete_user($user);
169+
do_delete_user($user, 'list');
170170
} else {
171171
echo "no user ID $s\n";
172172
}
@@ -216,7 +216,7 @@ function delete_forums() {
216216
// posts with at least 2 URLs
217217
$n = BoincPost::count("user=$user->id and (content like '%http%http%')");
218218
if (!$n) continue;
219-
do_delete_user($user);
219+
do_delete_user($user, 'forums');
220220
$count++;
221221
}
222222
echo "delete_forums(): deleted $count users\n";
@@ -246,7 +246,7 @@ function delete_profiles() {
246246
$m = BoincPost::count("user=$p->userid");
247247
if ($m) continue;
248248

249-
do_delete_user($user);
249+
do_delete_user($user, 'profiles');
250250
if ($test) {
251251
echo "\n$p->userid\n$p->response1\n$p->response2\n";
252252
}
@@ -267,7 +267,7 @@ function delete_profiles_strict() {
267267
}
268268
$n = BoincPost::count("user=$p->userid");
269269
if ($n) continue;
270-
do_delete_user($user);
270+
do_delete_user($user, 'profiles_strict');
271271
if ($test) {
272272
echo "\n$p->userid\n$p->response1\n$p->response2\n";
273273
}
@@ -316,7 +316,7 @@ function delete_users($no_hosts, $no_posts, $no_teams, $have_url) {
316316
if ($have_url) {
317317
if (!strlen($user->url)) continue;
318318
}
319-
do_delete_user($user);
319+
do_delete_user($user, 'users');
320320
$n++;
321321
}
322322
echo "deleted $n users\n";
@@ -330,7 +330,7 @@ function delete_banished() {
330330
if (!$user) continue;
331331
if ($user->create_time > time() - $min_days*86400) continue;
332332
if ($user->create_time < time() - $max_days*86400) continue;
333-
do_delete_user($user);
333+
do_delete_user($user, 'banished');
334334
}
335335
}
336336

@@ -419,7 +419,7 @@ function delete_team($team, $users) {
419419
$team->delete();
420420
echo "deleted team ID $team->id name $team->name\n";
421421
foreach ($users as $user) {
422-
do_delete_user($user);
422+
do_delete_user($user, 'team');
423423
}
424424
}
425425
}
@@ -428,7 +428,7 @@ function delete_user_id($id) {
428428
$user = BoincUser::lookup_id($id);
429429
if ($user) {
430430
echo "deleting user $id\n";
431-
do_delete_user($user);
431+
do_delete_user($user, 'id');
432432
} else {
433433
echo "no such user\n";
434434
}
@@ -439,7 +439,7 @@ function delete_user_id_range($id1, $id2) {
439439
$user = BoincUser::lookup_id($i);
440440
if ($user) {
441441
echo "deleting user $i\n";
442-
do_delete_user($user);
442+
do_delete_user($user, 'id range');
443443
}
444444
}
445445
}

0 commit comments

Comments
 (0)