@@ -848,8 +848,8 @@ pub struct PlanningZoneUpdatesStepReport {
848
848
pub out_of_date_zones : BTreeMap < SledUuid , Vec < PlanningOutOfDateZone > > ,
849
849
pub expunged_zones : BTreeMap < SledUuid , Vec < BlueprintZoneConfig > > ,
850
850
pub updated_zones : BTreeMap < SledUuid , Vec < BlueprintZoneConfig > > ,
851
- pub unsafe_zones : BTreeMap < BlueprintZoneConfig , ZoneUnsafeToShutdown > ,
852
- pub waiting_zones : BTreeMap < BlueprintZoneConfig , ZoneWaitingToExpunge > ,
851
+ pub unsafe_zones : BTreeMap < OmicronZoneUuid , ZoneUnsafeToShutdown > ,
852
+ pub waiting_zones : BTreeMap < OmicronZoneUuid , ZoneWaitingToExpunge > ,
853
853
}
854
854
855
855
impl PlanningZoneUpdatesStepReport {
@@ -934,15 +934,15 @@ impl PlanningZoneUpdatesStepReport {
934
934
zone : & BlueprintZoneConfig ,
935
935
reason : ZoneUnsafeToShutdown ,
936
936
) {
937
- self . unsafe_zones . insert ( zone. clone ( ) , reason) ;
937
+ self . unsafe_zones . insert ( zone. id , reason) ;
938
938
}
939
939
940
940
pub fn waiting_zone (
941
941
& mut self ,
942
942
zone : & BlueprintZoneConfig ,
943
943
reason : ZoneWaitingToExpunge ,
944
944
) {
945
- self . waiting_zones . insert ( zone. clone ( ) , reason) ;
945
+ self . waiting_zones . insert ( zone. id , reason) ;
946
946
}
947
947
}
948
948
@@ -1001,28 +1001,16 @@ impl fmt::Display for PlanningZoneUpdatesStepReport {
1001
1001
if !unsafe_zones. is_empty ( ) {
1002
1002
let ( n, s) = plural_map ( unsafe_zones) ;
1003
1003
writeln ! ( f, "* {n} zone{s} not ready to shut down safely:" ) ?;
1004
- for ( zone, reason) in unsafe_zones. iter ( ) {
1005
- writeln ! (
1006
- f,
1007
- " * zone {} ({}): {}" ,
1008
- zone. id,
1009
- zone. zone_type. kind( ) . report_str( ) ,
1010
- reason,
1011
- ) ?;
1004
+ for ( zone_id, reason) in unsafe_zones. iter ( ) {
1005
+ writeln ! ( f, " * zone {zone_id}: {reason}" ) ?;
1012
1006
}
1013
1007
}
1014
1008
1015
1009
if !waiting_zones. is_empty ( ) {
1016
1010
let ( n, s) = plural_map ( waiting_zones) ;
1017
1011
writeln ! ( f, "* {n} zone{s} waiting to be expunged:" ) ?;
1018
- for ( zone, reason) in waiting_zones. iter ( ) {
1019
- writeln ! (
1020
- f,
1021
- " * zone {} ({}): {}" ,
1022
- zone. id,
1023
- zone. zone_type. kind( ) . report_str( ) ,
1024
- reason,
1025
- ) ?;
1012
+ for ( zone_id, reason) in waiting_zones. iter ( ) {
1013
+ writeln ! ( f, " * zone {zone_id}: {reason}" ) ?;
1026
1014
}
1027
1015
}
1028
1016
@@ -1076,7 +1064,9 @@ pub enum ZoneUnsafeToShutdown {
1076
1064
impl fmt:: Display for ZoneUnsafeToShutdown {
1077
1065
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1078
1066
match self {
1079
- Self :: Cockroachdb { reason } => write ! ( f, "{reason}" ) ,
1067
+ Self :: Cockroachdb { reason } => {
1068
+ write ! ( f, "cockroach unsafe to shut down: {reason}" )
1069
+ }
1080
1070
Self :: BoundaryNtp {
1081
1071
total_boundary_ntp_zones : t,
1082
1072
synchronized_count : s,
@@ -1107,7 +1097,7 @@ impl fmt::Display for ZoneWaitingToExpunge {
1107
1097
Self :: Nexus { zone_generation } => {
1108
1098
write ! (
1109
1099
f,
1110
- "image out-of-date, but zone's nexus_generation \
1100
+ "nexus image out-of-date, but nexus_generation \
1111
1101
{zone_generation} is still active"
1112
1102
)
1113
1103
}
0 commit comments