mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
@@ -45,11 +45,12 @@ type ClusterPrepareResult struct {
|
|||||||
|
|
||||||
// Alias the status constants from models to avoid string drift.
|
// Alias the status constants from models to avoid string drift.
|
||||||
const (
|
const (
|
||||||
clusterStatusPrePending = models.ClusterStatusPrePending
|
clusterStatusPrePending = models.ClusterStatusPrePending
|
||||||
clusterStatusPending = models.ClusterStatusPending
|
clusterStatusPending = models.ClusterStatusPending
|
||||||
clusterStatusProvisioning = models.ClusterStatusProvisioning
|
clusterStatusProvisioning = models.ClusterStatusProvisioning
|
||||||
clusterStatusReady = models.ClusterStatusReady
|
clusterStatusReady = models.ClusterStatusReady
|
||||||
clusterStatusFailed = models.ClusterStatusFailed
|
clusterStatusFailed = models.ClusterStatusFailed
|
||||||
|
clusterStatusBootstrapping = models.ClusterStatusBootstrapping
|
||||||
)
|
)
|
||||||
|
|
||||||
func ClusterPrepareWorker(db *gorm.DB, jobs *Jobs) archer.WorkerFn {
|
func ClusterPrepareWorker(db *gorm.DB, jobs *Jobs) archer.WorkerFn {
|
||||||
@@ -97,6 +98,13 @@ func ClusterPrepareWorker(db *gorm.DB, jobs *Jobs) archer.WorkerFn {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := setClusterStatus(db, c.ID, clusterStatusBootstrapping, ""); err != nil {
|
||||||
|
log.Error().Err(err).Msg("[cluster_prepare] failed to mark cluster bootstrapping")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
c.Status = clusterStatusBootstrapping
|
||||||
|
|
||||||
clusterLog := log.With().
|
clusterLog := log.With().
|
||||||
Str("job", jobID).
|
Str("job", jobID).
|
||||||
Str("cluster_id", c.ID.String()).
|
Str("cluster_id", c.ID.String()).
|
||||||
|
|||||||
@@ -7,12 +7,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ClusterStatusPrePending = "pre_pending" // needs validation
|
ClusterStatusPrePending = "pre_pending" // needs validation
|
||||||
ClusterStatusIncomplete = "incomplete" // invalid/missing shape
|
ClusterStatusIncomplete = "incomplete" // invalid/missing shape
|
||||||
ClusterStatusPending = "pending" // valid shape, waiting for provisioning
|
ClusterStatusPending = "pending" // valid shape, waiting for provisioning
|
||||||
ClusterStatusProvisioning = "provisioning"
|
ClusterStatusProvisioning = "provisioning"
|
||||||
ClusterStatusReady = "ready"
|
ClusterStatusReady = "ready"
|
||||||
ClusterStatusFailed = "failed" // provisioning/runtime failure
|
ClusterStatusFailed = "failed" // provisioning/runtime failure
|
||||||
|
ClusterStatusBootstrapping = "bootstrapping"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Cluster struct {
|
type Cluster struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user