Skip to content

Commit f0c5cb5

Browse files
utkuozdemirsmira
authored andcommitted
fix: add metal-agent mode to runtime capabilities
The runtime capabilities lookup did not include an entry for the metal-agent mode, causing an index out of range panic when any capability check was performed in that mode. This broke MetaWrite calls from Omni to machines running in metal-agent mode through the new unified apid, preventing them from appearing as pending machines. Also fix the incorrect comments on the existing entries to match the actual iota order. Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com> (cherry picked from commit 783a358)
1 parent 213ecf2 commit f0c5cb5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • internal/app/machined/pkg/runtime

internal/app/machined/pkg/runtime/mode.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ func (m Mode) capabilities() uint64 {
9292
all := ^uint64(0)
9393

9494
return [...]uint64{
95-
// metal
95+
// cloud
9696
all,
9797
// container
9898
all ^ uint64(Reboot|Shutdown|Upgrade|Rollback|MetaKV),
99-
// cloud
99+
// metal
100+
all,
101+
// metal-agent
100102
all,
101103
}[m]
102104
}

0 commit comments

Comments
 (0)