Commit d24df9d2 authored by Kirk Webb's avatar Kirk Webb
Browse files

More TaintState management updates.

* Do not "reset" taint states to match partitions after OS load.

Encumber node with any additional taint states found across the
OSes loaded on a node's partitions (union of states).  Change the
name of the associated Node object method to better represent the

* Clear all taint states when a node exits "reloading"

When the reload_daemon is finished with a node and ready to release it,
it will now clear any/all taint states set on the node.  This is the
only automatic way to have a node's taint states cleared.  Users
cannot clear node taint states by os_load'ing away all tainted
partitions after this commit; nodes must travel through reloading
to get cleared.
parent 55f940d9
......@@ -3854,12 +3854,13 @@ sub InheritTaintStates($$) {
# Synchornize the node's taint states based on the OSes listed
# for its partitions. Any existing taint states on the node are
# lost (unless they appear on one or more partition OSes).
# for its partitions. Existing taint states on the node are
# maintainted.
sub SyncTaintStates($)
sub SyncDiskPartitionTaintStates($)
my ($self) = @_;
my $error = 0;
require OSinfo;
my $node_id = $self->node_id();
......@@ -3870,15 +3871,14 @@ sub SyncTaintStates($)
return -1
if (!$query_result);
my @taint_states = ();
while (my ($osid, $vers) = $query_result->fetchrow_array()) {
my $osinfo = OSinfo->Lookup($osid, $vers);
if (defined($osinfo) && $osinfo->IsTainted()) {
push @taint_states, $osinfo->GetTaintStates();
$error += $self->InheritTaintStates($osinfo);
return $self->SetTaintStates(@taint_states);
return $error ? -1 : 0;
......@@ -1164,7 +1164,7 @@ sub handleCtrlEvent($$) {
info("$node: Clearing reload info\n");
my $experiment = $nodeobj->Reservation();
if (defined($experiment) &&
$experiment->pid() eq NODERELOADING_PID &&
......@@ -633,6 +633,9 @@ sub freefromreloading($) {
$experiment->eid() eq $PENDINGEID)) {
# Clear any taint states set for the node
# Check if the robot is back in its pen, otherwise we have to throw it
# back to repositionpending.
my $loc_result =
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment