Open surajssd opened 3 years ago
Is this even supported by Packet API?
I think I was wrong to say that node reservation won't be useful. I think we will still need node reservation, its just that we can make topology aware installation in lokoctl. With the help of the Packet API we can figure out up front which node is located where and then we can install according to our HA preference:
func main() {
c, err := packngo.NewClient()
projectID := ""
options := &packngo.ListOptions{PerPage: 400, Excludes: []string{"project"}}
hrs, _, err := c.HardwareReservations.List(projectID, options)
for _, h := range hrs {
//if h.Device != nil && h.Plan.Class == "c2.medium.x86" {
if h.Device == nil && h.Plan.Class == "c1.small.x86" {
fmt.Println(h.ID, h.Device, h.Plan.Class, h.CreatedAt, h.SwitchUUID, h.Plan.Specs.Memory.String())
}
}
}
@surajssd so your idea is for user to provide list of reservation IDs and then we will calculate which should be used for what machine based on SwitchUUID
?
@invidian that's correct.
I guess we could do that :+1:
Current situation
Currently if a user wants to have nodes on different racks they have to rely on node reservation feature by Packet, which is cumbersome to use and could be error prone. Also this makes it very hard to rotate worker pools.
Also node reservation is only used right now to ensure nodes are scheduled on different racks.
Ideal future situation
For certain worker pools it is necessary that they run on different racks, e.g. control plane, storage, network. The reasons could be HA, network traffic distribution, etc.
Lokoctl should procure machines from Packet on different racks using terraform or using the Packet APIs. This makes it easier to rotate the worker pools and the need for node reservation.