Re: [PATCH proxmox v2 09/40] resource-scheduling: implement rebalancing migration selection

Dominik Rusovac
2026-03-27T09:34:24Z

On Thu Mar 26, 2026 at 3:11 PM CET, Daniel Kral wrote:

[snip]

>>> +/// A possible migration.
>>> +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Serialize, Deserialize)]
>>> +#[serde(rename_all = "kebab-case")]
>>> +pub struct Migration {
>>> + /// The identifier of a leading resource.
>>> + pub sid: String,
>>> + /// The current node of the leading resource.
>>> + pub source_node: String,
>>> + /// The possible migration target node for the resource.
>>> + pub target_node: String,
>>
>> nit: on the long run, instead of having `ScoredMigration`,
>> it could be more convenient to have a field:
>>
>> pub imbalance: Option<f64>,
>>
>
> Might make sense, but then we can't reuse the same structure in
> `MigrationCandidate` anymore, so I would let ScoredMigration be it's own
> type, what do you think?
>

ok, then let's keep it as-is

[snip]