You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2026/10/16 19:16:51 UTC
(airavata-custos) branch master updated: Make the vast reconciler interval configurable (#635)
This is an automated email from the ASF dual-hosted git repository.
lahirujayathilake pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git
The following commit(s) were added to refs/heads/master by this push:
new 646e3098a Make the vast reconciler interval configurable (#635)
646e3098a is described below
commit 646e3098a64468f65866b5716f310e0449719f7a
Author: Yasith Jayawardana <ya...@icloud.com>
AuthorDate: Fri Oct 16 15:16:45 2026 -0400
Make the vast reconciler interval configurable (#635)
---
config/custos.yaml | 1 +
.../VAST-Provisioner/internal/subscribers/subscriber.go | 4 ++--
connectors/Storage/VAST-Provisioner/pkg/vast/loader.go | 11 ++++++++++-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/config/custos.yaml b/config/custos.yaml
index 43975d5df..33f235c24 100644
--- a/config/custos.yaml
+++ b/config/custos.yaml
@@ -80,6 +80,7 @@ connectors:
vast-provisioner:
type: "vast-storage-provisioner"
enabled: false
+ reconcile_interval: "5m"
clusters:
- id: "${CUSTOS_CLUSTER_ID}"
vast:
diff --git a/connectors/Storage/VAST-Provisioner/internal/subscribers/subscriber.go b/connectors/Storage/VAST-Provisioner/internal/subscribers/subscriber.go
index 630b0ce4d..69e0787fa 100644
--- a/connectors/Storage/VAST-Provisioner/internal/subscribers/subscriber.go
+++ b/connectors/Storage/VAST-Provisioner/internal/subscribers/subscriber.go
@@ -221,7 +221,7 @@ func (s *StorageSubscriber) ensure(ctx context.Context, c Cluster, user, group s
return nil
}
-func (s *StorageSubscriber) StartReconciler(ctx context.Context) {
+func (s *StorageSubscriber) StartReconciler(ctx context.Context, interval time.Duration) {
for {
for id, c := range s.clusters {
s.reconcile(ctx, id, c)
@@ -229,7 +229,7 @@ func (s *StorageSubscriber) StartReconciler(ctx context.Context) {
select {
case <-ctx.Done():
return
- case <-time.After(24 * time.Hour):
+ case <-time.After(interval):
}
}
}
diff --git a/connectors/Storage/VAST-Provisioner/pkg/vast/loader.go b/connectors/Storage/VAST-Provisioner/pkg/vast/loader.go
index 2f44443a4..49d55dcef 100644
--- a/connectors/Storage/VAST-Provisioner/pkg/vast/loader.go
+++ b/connectors/Storage/VAST-Provisioner/pkg/vast/loader.go
@@ -27,6 +27,7 @@ import (
"strconv"
"strings"
"sync"
+ "time"
"github.com/jmoiron/sqlx"
@@ -80,12 +81,20 @@ func LoadConnector(ctx context.Context, _ *sqlx.DB, eventBus *events.Bus, coreSe
if len(clusters) == 0 {
return fmt.Errorf("vast provisioner: enabled with no clusters")
}
+ interval := 5 * time.Minute
+ if s := setting(connectorConfig.Config, "reconcile_interval"); s != "" {
+ d, err := time.ParseDuration(s)
+ if err != nil || d <= 0 {
+ return fmt.Errorf("vast provisioner: reconcile_interval must be a positive duration, such as \"5m\", not %q", s)
+ }
+ interval = d
+ }
subscriber := subscribers.NewStorageSubscriber(eventBus, coreService, clusters)
subscriber.RegisterSubscribers(Type)
wg.Add(1)
go func() {
defer wg.Done()
- subscriber.StartReconciler(ctx)
+ subscriber.StartReconciler(ctx, interval)
}()
return nil
}