diff --git a/go.mod b/go.mod index 0572e27..230096a 100644 --- a/go.mod +++ b/go.mod @@ -7,9 +7,10 @@ require ( github.com/go-chi/chi/v5 v5.1.0 github.com/oapi-codegen/runtime v1.1.1 github.com/spf13/pflag v1.0.5 + github.com/spjmurray/go-util v0.1.3 github.com/unikorn-cloud/core v0.1.85 github.com/unikorn-cloud/identity v0.2.45 - github.com/unikorn-cloud/region v0.1.47-rc2 + github.com/unikorn-cloud/region v0.1.47-rc4 go.opentelemetry.io/otel/sdk v1.31.0 k8s.io/api v0.31.1 k8s.io/apimachinery v0.31.1 @@ -61,7 +62,6 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/spjmurray/go-util v0.1.3 // indirect github.com/x448/float16 v0.8.4 // indirect go.opentelemetry.io/otel v1.31.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect diff --git a/go.sum b/go.sum index c2a60d7..a59abe7 100644 --- a/go.sum +++ b/go.sum @@ -131,16 +131,16 @@ github.com/spjmurray/go-util v0.1.3/go.mod h1:fARcBeaHio/6h9H7Ht+egZPBZMNxEwxmHC github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/unikorn-cloud/core v0.1.85 h1:S4B0nr0jhxF8SCsKyCRVwcx8+kJsI8fQVONLJDf9aic= github.com/unikorn-cloud/core v0.1.85/go.mod h1:wEKzCwAnIyTbo27l++Wl+gK95TAxMsFS3y3jbFB03aw= github.com/unikorn-cloud/identity v0.2.45 h1:YFmw3uunwdZMuYiimv4lfU6s7iTtYoc22xJqLTrlOVg= github.com/unikorn-cloud/identity v0.2.45/go.mod h1:WzNNv05ReDMLfWsOtq53uzhX2GU2nXDw76Bdsf3BPnM= -github.com/unikorn-cloud/region v0.1.47-rc2 h1:eIwFHSoMojjg7MSFirDuNEnaNSWCygtKQRdNhqFIqzw= -github.com/unikorn-cloud/region v0.1.47-rc2/go.mod h1:cofPuJjseRKE95xAqNa23nSL7/+LDXOBxNIHwwODpys= +github.com/unikorn-cloud/region v0.1.47-rc4 h1:rS5vyND9vqMCib5Vd+IktHB4+erRp/+oWzHO20quqsI= +github.com/unikorn-cloud/region v0.1.47-rc4/go.mod h1:cofPuJjseRKE95xAqNa23nSL7/+LDXOBxNIHwwODpys= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/pkg/openapi/schema.go b/pkg/openapi/schema.go index 84af67d..218d162 100644 --- a/pkg/openapi/schema.go +++ b/pkg/openapi/schema.go @@ -20,96 +20,97 @@ import ( // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+w9a3PbNrZ/BcO7M9vOpSRKlmVLX3bcZJv1tGk8cZLeu7GvBySPJNQkwAVA24pH//0O", - "HqRIEXrL6babaWdiicDBwXnhvEA9exFLM0aBSuGNnr0Mc5yCBK4/RUkuJPDL11fF1+rbGETESSYJo97I", - "+zAFZMchilNoo7e5kCgEhNEDTkiMXv9yjSJGJSaU0AliNJmhhD0CRxEWgKIp5jhSS/o3lOZpCFwgxtF0", - "lk2BCh8JiblEmMYIaIweiZwivJilhppZvh6jFpYoZULe0MFJBToiFCVAJ3La9nyPKNwzLKee7ym0vdFi", - "t57vcfhXTjjE3kjyHHxPRFNIsdr9XziMvZH3X50F4Trmqejc5yFwChLELziFBdHmc99jfIIp+YIV2TYS", - "tDrYUNWNch3oi+CdcfYbRHIjynbcOmxLUC+CKIfJNqQ1wxCJgUoyJsBXIFuAewFc5wYkCPkDiwkYVeOA", - "JbxiaZZLeGUk8b0ZpB8zKoHqP3GWJSTSLO/8JtS+nj14wmmWgPozBYljLDV6dcH25r4nMojUE7u72Bt5", - "YXA6DE9g0BpiOG31e+FZa9gP+61xvzcOz/AgxACe7z0yfp8wHF8xlghv9PnZGxMOjzhJFDxCJxyE+T4i", - "MfdGn73usNfuDs7b3XbQ6fW9W9/LGNdbMPrqjc4DI2CSRSzxRp6MMm/uVyAEbf1f59zzve6ZAqc/dntV", - "aBzTid460NgbdYfDoe9pm+GNusFgMHescTv3PZJiM40Jb+TlYU5l7vneA3ChpaUXtIP+3PdSHE0J1SPH", - "CX5gXFMtOjsdnEMvbo2HOGz1T0/i1hCf4NZp9+TsdHx23u8NQq+ySEyE5My5kNfrt4O+p6VCs1Z4o5N5", - "KYgxjHGeSM/3sjxMSHR5dZEkzAiA2TUOk0I45/Nbtd/tJDSqSduvnEgw0lnXGiuUpZW3sosWZ0W7oSRG", - "xkXGqLD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qLWdH/pYFb", + "/bi8vpLINM4gNcUaOJdQwLUdG3atqt/ZbNyqVoXv44QC098uV3hzJvNM+yyg59ry1b1hYVjCNO0eOgqr", + "N0YoSDMusKDJ7D5n+BHTBNuKTjGxXLX4YiIwU0urmu+KJatl/Eo7VApqysm9fmpcvQbqKRCKCyCLZp47", + "j7X01LSXJeMTiJGmuZM0ZJ+Oij4YA2HzWb26geRALVmc9D/hESSfcJJ7Izl7nP+Yj8AMRokerb/NIURq", + "ljkTbNqAtOCVXRHaL3A1phgzNIJbRhmBL9pxscKu43It/UbZsFIg9JL/8zlqXVy2/oVbv9397e/DxafW", + "ffvuOQoH3XllxHd//4vPz9qBENUu7TV5++FzgJPk3dgUW4+c91gqEDwvmZ7lPvKN9wkXV9/qXaMjSDib", + "6INos+AtLdqUtrvdyLy5MvISFN6SuU2aV3rw192FPAalF0sdTORGIq2BfNllWSTGnIIbRylJ9Lmx2IUA", + "TKRtVhZUgccTWGsBP1QpUnnkOsu4+WCsB84nqWaxIaLpRDUnXMpNcZop+OIPp4pU+JGkxWsTddiKJ8es", + "4Co8+ck0ivmS6Xty3FMNXiW45TjjNYB2rattYwt3IGcPjD+xpesl1Y/mCCWw9NieWXeHmWXxtUyEjSPe", + "N1PQzw1Zt231tqvGR1xFU6jbAdtIm4ACUvP1CVbQ0sP9TQw+Xn799gEPHh4LFe5oYYxR2bU7UUL6CCsy", + "RClmisZFsmTJmXi8vSX///a2XfnnUIdhhcC8pIOwRiptwYZ8P/OLpGmmfppyV9ghNfH02tR689j2Yu4W", + "2F7M6YqzNWf033kFuE1fNBM0nJhQZuPObSFri50XEDfsHNf37cBvu+8lHaMmSKmSfAsV+2BvQDj1orLm", + "eDuf+9dcuoZkmyMjnP1VFd33twyzWf0s0GOmgBM1dcGkDTu12z+mCo0FT23ShRFswsFbVmJg992+ZcFh", + "MYnCE4+KM4TFiCqh41yFJ+6mCiM2CPHUI7z18ctCrgoQ/vysPwzSvDePigS9wpOtew8szLuDSWN8hjXp",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z+3fSl714/q", + "6wYyT5qnmDZfzfGvy0Ng60yUAdQ0d/pEgDgXVM1uNJ1cY4zp1au/yKOJxTsrrJwVR5Es2uxGgAUI95aP", + "+itJTDkn4U+Wja4Hzjx5xQk0vvwokmAYTJXK5LDTsV0hatau8bLNxaRjUe489jq1+TpMinlmtqVticZo", + "D5hmXu1ahHlk3wZA2Zj7A5+imfkGxCONwTSBuFcqSdOCT8uykumck83SUULHgOJZnMAtSzHDE0iB+a9M", + "IfeWKYnSXCoXUs1cn+Tbn5B76YXR01s2BUyc80hVApUraxVsay9uiNrddmTcH6stwTA4aUftE1sYnhqO", + "dnBGO4/dTrU/SHae629bn3filVfCXhUXdx11NIIT8HjHOnIzde8CljmZXBqqup6GwAtRNS+QfAPqMqOf", + "uu+qSL6roVjeWVt6GXMvilbZmXJcZ9VLVedh0N9m/mGvFjSrdI+6ivcdRmadk6Ou03xfnFmkf9RFGq+0", + "mofB6ZHZsu61Z1Wba3oa/Nb2851pUqv+rMSK/ofFkM6qn0owoLbUTdc2JzvP5a8O7KqwR0I63DjV8xML", + "c/MWW1+O/5VppJAIIwZPi/vDC6th70EBqVw+0QZXNC3INZcbTci1o+N1gWPNphQ/YjBbLXeV3znorPuR", + "g3nDRvV2tVHfTNSBJuriqIs03lj6H22ivrQIj3PtlpjvWxPB88y81piamvUx7E7nufyNmXnZM+jzjM33", + "CJcqbPprnI7jHbXcAttbz1/VfhVnVwU95K3J37T4m6Oxqxb/h5/qm2d5fnLL+AK5xxX4aHoLK2ZiPy8g", + "V0cyDr+3N/DN2HwzNn9Al8FmDmXnufjJsXlnZW9Ukd1wjXdb5RekTTAUiZZFEtytYlM35bu1p1guXnC7", + "V9rhvd3Qe7edH9xm9klCHPQy3T+dTv/pA/zN52PzV/52yQp4VG1VGanQtOLlIocoWrUQ9XJ6dmV38uJq", + "tvQi4m9a9n9Ey+bz/w0AAP//avq/US52AAA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/pkg/provisioners/managers/cluster/provisioner.go b/pkg/provisioners/managers/cluster/provisioner.go index f0f73cb..df80daf 100644 --- a/pkg/provisioners/managers/cluster/provisioner.go +++ b/pkg/provisioners/managers/cluster/provisioner.go @@ -21,6 +21,8 @@ import ( "errors" "fmt" "net/http" + "slices" + "strings" "github.com/spf13/pflag" @@ -83,6 +85,9 @@ type Provisioner struct { // options are documented for the type. options *Options + + // resourceProvisioning tells whether any sub resource is in a provisioning state. + resourceProvisioning bool } // New returns a new initialized provisioner object. @@ -269,11 +274,23 @@ func (p *Provisioner) Provision(ctx context.Context) error { } } - // TODO: if any of the machine statuses are not provisioned, we should return - // the correct error status here or a yield to force reconcilliation until - // the desired state. - // TODO: we need to sort the status stuff so it doesn't move around all the - // time for determinism on both the CLI and UI. + // Sort the statuses so they have a deterministic order up the stack, especially + // to things like the UI. + slices.SortFunc(p.cluster.Status.WorkloadPools, func(a, b unikornv1.WorkloadPoolStatus) int { + return strings.Compare(a.Name, b.Name) + }) + + for _, pool := range p.cluster.Status.WorkloadPools { + slices.SortFunc(pool.Machines, func(a, b unikornv1.MachineStatus) int { + return strings.Compare(a.Hostname, b.Hostname) + }) + } + + // Now once the UX is sorted, roll up any non-healthy statuses to the top level. + if p.resourceProvisioning { + return provisioners.ErrYield + } + return nil } diff --git a/pkg/provisioners/managers/cluster/server.go b/pkg/provisioners/managers/cluster/server.go index bc3e16f..d6dda70 100644 --- a/pkg/provisioners/managers/cluster/server.go +++ b/pkg/provisioners/managers/cluster/server.go @@ -81,17 +81,23 @@ func (p *Provisioner) deleteServer(ctx context.Context, client regionapi.ClientW return nil } -func convertStatusCondition(in coreapi.ResourceProvisioningStatus) unikornv1core.ConditionReason { +func (p *Provisioner) convertStatusCondition(in coreapi.ResourceProvisioningStatus) unikornv1core.ConditionReason { //nolint:exhaustive switch in { + case coreapi.ResourceProvisioningStatusProvisioning: + p.resourceProvisioning = true + + return unikornv1core.ConditionReasonProvisioning case coreapi.ResourceProvisioningStatusDeprovisioning: + p.resourceProvisioning = true + return unikornv1core.ConditionReasonDeprovisioning case coreapi.ResourceProvisioningStatusProvisioned: return unikornv1core.ConditionReasonProvisioned - case coreapi.ResourceProvisioningStatusProvisioning: - return unikornv1core.ConditionReasonProvisioning } + p.resourceProvisioning = true + return unikornv1core.ConditionReasonErrored } @@ -105,7 +111,7 @@ func (p *Provisioner) updateServerStatus(pool *unikornv1.ComputeClusterWorkloadP PublicIP: server.Status.PublicIP, } - unikornv1core.UpdateCondition(&status.Conditions, unikornv1core.ConditionAvailable, corev1.ConditionFalse, convertStatusCondition(server.Metadata.ProvisioningStatus), "server provisioning") + unikornv1core.UpdateCondition(&status.Conditions, unikornv1core.ConditionAvailable, corev1.ConditionFalse, p.convertStatusCondition(server.Metadata.ProvisioningStatus), "server provisioning") poolStatus.Machines = append(poolStatus.Machines, status) }