Skip to content

Commit d6fcd63

Browse files
mayastor-borsdsharma-dc
mayastor-bors
andcommitted
Merge #1782
1782: Cherry pick PR #1780 r=dsharma-dc a=dsharma-dc When nexus is being created with a single child, and that child goes into retire path before nexus is open, then the child gets persisted as unhealthy. This will cause volume to never be able to attach later on. Co-authored-by: Diwakar Sharma <diwakar.sharma@datacore.com>
2 parents 0d8ac9c + dbf97b6 commit d6fcd63

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

io-engine/src/bdev/nexus/nexus_persistence.rs

+9
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@ impl<'n> Nexus<'n> {
104104
};
105105
nexus_info.children.push(child_info);
106106
});
107+
// We started with this child because it was healthy in etcd, or isn't there at all.
108+
// Being unhealthy here means it is undergoing a fault/retire before nexus is open.
109+
if nexus_info.children.len() == 1 && !nexus_info.children[0].healthy {
110+
warn!("{self:?} Not persisting: the only child went unhealthy during nexus creation");
111+
return Err(Error::NexusCreate {
112+
name: self.name.clone(),
113+
reason: "only child is unhealthy".to_string(),
114+
});
115+
}
107116
}
108117
PersistOp::AddChild {
109118
child_uri,

0 commit comments

Comments
 (0)