Skip to content

Commit

Permalink
tested with CLI; todo test this on actual cluster & write docs
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinaecalderon committed Sep 18, 2024
1 parent cc561b8 commit a64649e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion helm/charts/determined/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ home: https://github.com/determined-ai/determined.git
# If using a non-release version (e.g., X.Y.Z.dev0) you will have to specify an
# existing official release version (e.g., X.Y.Z) or specify a commit has
# that has been publicly published (all commits from main).
appVersion: "0.36.0"
appVersion: "0.36.1-dev0"
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name:
{{ if and .Release.IsUpgrade .Values.db.claimName }}
determined-db-pvc-{{ .Values.db.claimName }}
{{ if and .Release.IsUpgrade .Values.db.restoreSnapshotName }}
determined-db-pvc-{{ .Values.db.restoreSnapshotName }}
{{- else -}}
determined-db-pvc-{{ .Release.Name }}
{{ end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
name: determined-db-snapshot-class
driver: pd.csi.storage.gke.io
deletionPolicy: Delete
{{ end }}
{{ end }}
12 changes: 6 additions & 6 deletions helm/charts/determined/templates/db-volume-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ spec:
volumeSnapshotClassName: determined-db-snapshot-class
source:
persistentVolumeClaimName:
{{ if .Values.db.claimName }}
determined-db-pvc-{{ .Values.db.claimName }}
{{- else -}}
determined-db-pvc-{{ .Release.Name }}
{{ end }}
{{ end }}
{{ if .Values.db.claimName }}
determined-db-pvc-{{ .Values.db.claimName }}
{{- else -}}
determined-db-pvc-{{ .Release.Name }}
{{ end }}
{{ end }}
12 changes: 7 additions & 5 deletions helm/charts/determined/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,14 @@ db:

# snapshotName refers to the volume snapshot name, a backup of the database's persistent volume.
# If defined, Helm will "snapshot" the DB upon its next upgrade, creating a volumeSnapshot called
# determined-db-snapsnot-{snapshotName}.
# snapshotName:
# determined-db-snapsnot-{snapshotName}. This CANNOT be the name of a PV that
# already exists, like the {{Release.Name}}.
# snapshotName: determined1

# restoreSnapshotName refers to the volume snapshot name which you wish to restore the DB to.
# This only applies during a Helm upgrade, and if defined.
# restoreSnapshotName:
# This only applies during a Helm upgrade, and if defined. This CANNOT be the name of a PVC that
# already exists, like the {{Release.Name}}.
# restoreSnapshotName:

# checkpointStorage controls where checkpoints are stored. Supported types include `shared_fs`,
# `gcs`, and `s3`.
Expand Down Expand Up @@ -375,7 +377,7 @@ resourcePools:
# defaultComputeResourcePool: default

## Configure the initial user password for the cluster
initialUserPassword: Abcd1234
# initialUserPassword:

# additional_resource_managers:
# - resource_manager:
Expand Down
4 changes: 2 additions & 2 deletions master/internal/logretention/logretention.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func DeleteExpiredTaskLogs(ctx context.Context, days *int16) (int64, error) {
if days != nil {
defaultLogRetentionDays = *days
}
log.WithField("default-retention-days", defaultLogRetentionDays).Info("deleting expired task logs")
log.WithField("default-retention-days", defaultLogRetentionDays).Trace("deleting expired task logs")
r, err := db.Bun().NewRaw(fmt.Sprintf(`
WITH log_retention_tasks AS (
SELECT COALESCE(r.log_retention_days, %d) as log_retention_days, t.task_id, t.end_time
Expand All @@ -112,6 +112,6 @@ func DeleteExpiredTaskLogs(ctx context.Context, days *int16) (int64, error) {
return 0, errors.Wrap(err, "error deleting expired task logs")
}
rows, err := r.RowsAffected()
log.WithFields(logrus.Fields{"rows": rows, "err": err}).Info("deleted expired task logs")
log.WithFields(logrus.Fields{"rows": rows, "err": err}).Trace("deleted expired task logs")
return rows, err
}

0 comments on commit a64649e

Please sign in to comment.