You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove simulated disk stuff from sim sled-agent (#9914)
As part of looking into how expunge will affect disks backed by local
storage, I'm a few yaks deep and am looking at the work required to
change `DiskState`. Problem is that `DiskState` is in common and used by
Nexus' external and internal apis, as well as sled-agent.
Wait a minute you ask, why is `DiskState` used by the sled-agent api?
That type refers to Nexus' Disk type, which is an abstraction layer
higher than sled-agent should be aware of.
All this code is left-over from very early days of the simulated
sled-agent, and it's time it goes. This commit removes all the simulated
disk machinery from the simulated sled-agent.
So next, what part of Nexus' internal api uses `DiskState`? It's from
`cpapi_disks_put`. What calls this? The simulated disk machinery in the
simulated sled-agent notifies Nexus of state changes. This is incorrect:
Nexus should completely own the state of a Disk, and having the
simulated sled-agent poke into Nexus this way could hide real bugs.
It would be best to completely remove `cpapi_disks_put`, but until the
nexus-internal API trait can have new versions we cannot. This commit
instead replaces the implementation of that endpoint with
a 400. No part of the actual product uses this.
Happily, with all that taken out there were no failing tests!
0 commit comments