Skip to content

Commit 1402d4d

Browse files
cleanup
1 parent 3665208 commit 1402d4d

4 files changed

Lines changed: 19 additions & 7 deletions

File tree

illumos-utils/src/opte/non_illumos.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! Mock / dummy versions of the OPTE module, for non-illumos platforms.
66
//!
77
//! Most methods are either `unimplemented!()` or silent no-ops.
8-
//! Multicast subscribe/unsubscribe is an exception,as it maintains real
8+
//! Multicast subscribe/unsubscribe is an exception, as it maintains real
99
//! in-memory state because port manager tests assert on subscription contents.
1010
1111
use crate::addrobj::AddrObject;

nexus/src/app/background/tasks/multicast/members.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,13 +1334,13 @@ impl MulticastGroupReconciler {
13341334
return Ok(None);
13351335
}
13361336
Err(e) => {
1337-
debug!(
1337+
warn!(
13381338
opctx.log,
13391339
"failed to look up instance state";
13401340
"member" => ?member,
13411341
"error" => ?e
13421342
);
1343-
return Ok(None);
1343+
return Err(e.into());
13441344
}
13451345
};
13461346

nexus/src/app/background/tasks/multicast/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@
105105
//! - **Group lifecycle**: "Creating" → "Active" → "Deleting" → hard-deleted
106106
//! - **Member lifecycle**: "Joining" → "Joined" → "Left" → soft-deleted → hard-deleted
107107
//! - **Dataplane updates**: DPD API calls for P4 table updates
108+
//! - **Sled propagation**: M2P mappings and forwarding entries pushed to sled-agents
109+
//! - **OPTE subscriptions**: Per-VMM multicast group subscriptions on target sleds
108110
//! - **Topology mapping**: Sled-to-switch-port resolution (with caching)
109111
//!
110112
//! ## Deletion Semantics: Groups vs Members

nexus/src/app/multicast/sled.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,22 @@ impl MulticastSledClient {
118118
cached_propolis_id: Option<PropolisUuid>,
119119
) -> Result<(), anyhow::Error> {
120120
let instance_id = InstanceUuid::from_untyped_uuid(member.parent_id);
121+
// If the instance has no propolis_id (already stopped/destroyed),
122+
// the OPTE port is gone and there's nothing to subscribe.
121123
let propolis_id = match cached_propolis_id {
122124
Some(id) => id,
123-
None => self
124-
.lookup_propolis_id(opctx, instance_id)
125-
.await?
126-
.context("instance has no propolis_id, cannot subscribe")?,
125+
None => match self.lookup_propolis_id(opctx, instance_id).await? {
126+
Some(id) => id,
127+
None => {
128+
debug!(
129+
opctx.log,
130+
"no propolis_id for instance, skipping subscribe";
131+
"member_id" => %member.id,
132+
"instance_id" => %instance_id
133+
);
134+
return Ok(());
135+
}
136+
},
127137
};
128138

129139
let client = self

0 commit comments

Comments
 (0)