Merge branch '18596-preemptible-price-factor'
authorTom Clegg <tom@curii.com>
Thu, 24 Mar 2022 15:26:44 +0000 (11:26 -0400)
committerTom Clegg <tom@curii.com>
Thu, 24 Mar 2022 15:26:44 +0000 (11:26 -0400)
closes #18596

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

1  2 
lib/config/config.default.yml
lib/config/export.go
sdk/go/arvados/config.go

index 22e2c58b7887dbe7af679bcfb835669349bdb4cc,318e9ab1dcd5d84ee509862e02e897cbbd4eebca..6512389815dd4e3d1d786b09cf1cd5b3eedd929d
@@@ -240,18 -240,6 +240,18 @@@ Clusters
        # https://doc.arvados.org/admin/metadata-vocabulary.html
        VocabularyPath: ""
  
 +      # If true, a project must have a non-empty description field in
 +      # order to be frozen.
 +      FreezeProjectRequiresDescription: false
 +
 +      # Project properties that must have non-empty values in order to
 +      # freeze a project. Example: {"property_name": true}
 +      FreezeProjectRequiresProperties: {}
 +
 +      # If true, only an admin user can un-freeze a project. If false,
 +      # any user with "manage" permission can un-freeze.
 +      UnfreezeProjectRequiresAdmin: false
 +
      Users:
        # Config parameters to automatically setup new users.  If enabled,
        # this users will be able to self-activate.  Enable this if you want
        # configured, and has no effect on top-level containers.
        AlwaysUsePreemptibleInstances: false
  
+       # Automatically add a preemptible variant for every
+       # non-preemptible entry in InstanceTypes below. The maximum bid
+       # price for the preemptible variant will be the non-preemptible
+       # price multiplied by PreemptiblePriceFactor. If 0, preemptible
+       # variants are not added automatically.
+       #
+       # A price factor of 1.0 is a reasonable starting point.
+       PreemptiblePriceFactor: 0
        # PEM encoded SSH key (RSA, DSA, or ECDSA) used by the
        # cloud dispatcher for executing containers on worker VMs.
        # Begins with "-----BEGIN RSA PRIVATE KEY-----\n"
diff --combined lib/config/export.go
index db413b97bd3460a83afaddfc5276b027a6486a01,67b7c3fa0ecbd1ce49df2962cfda66ae056ec693..dae749c87470ecb5f4ab7c496ddf001c11abcdf3
@@@ -62,8 -62,6 +62,8 @@@ var whitelist = map[string]bool
        "API":                                      true,
        "API.AsyncPermissionsUpdateInterval":       false,
        "API.DisabledAPIs":                         false,
 +      "API.FreezeProjectRequiresDescription":     true,
 +      "API.FreezeProjectRequiresProperties":      true,
        "API.KeepServiceRequestTimeout":            false,
        "API.MaxConcurrentRequests":                false,
        "API.MaxIndexDatabaseRead":                 false,
@@@ -74,7 -72,6 +74,7 @@@
        "API.MaxTokenLifetime":                     false,
        "API.RequestTimeout":                       true,
        "API.SendTimeout":                          true,
 +      "API.UnfreezeProjectRequiresAdmin":         true,
        "API.VocabularyPath":                       false,
        "API.WebsocketClientEventQueue":            false,
        "API.WebsocketServerEventQueue":            false,
        "Containers.MaxDispatchAttempts":           false,
        "Containers.MaxRetryAttempts":              true,
        "Containers.MinRetryPeriod":                true,
+       "Containers.PreemptiblePriceFactor":        false,
        "Containers.ReserveExtraRAM":               true,
        "Containers.RuntimeEngine":                 true,
        "Containers.ShellAccess":                   true,
diff --combined sdk/go/arvados/config.go
index e0750bd8c54ae0a671f282ba9438d23e0bfb48ad,6242f6cd56ccee653c54bf7d6e1df160652cc5fe..6c9324e478a273b68e83dcd7fb4e46150b8e0da1
@@@ -94,24 -94,21 +94,24 @@@ type Cluster struct 
        PostgreSQL      PostgreSQL
  
        API struct {
 -              AsyncPermissionsUpdateInterval Duration
 -              DisabledAPIs                   StringSet
 -              MaxIndexDatabaseRead           int
 -              MaxItemsPerResponse            int
 -              MaxConcurrentRequests          int
 -              MaxKeepBlobBuffers             int
 -              MaxRequestAmplification        int
 -              MaxRequestSize                 int
 -              MaxTokenLifetime               Duration
 -              RequestTimeout                 Duration
 -              SendTimeout                    Duration
 -              WebsocketClientEventQueue      int
 -              WebsocketServerEventQueue      int
 -              KeepServiceRequestTimeout      Duration
 -              VocabularyPath                 string
 +              AsyncPermissionsUpdateInterval   Duration
 +              DisabledAPIs                     StringSet
 +              MaxIndexDatabaseRead             int
 +              MaxItemsPerResponse              int
 +              MaxConcurrentRequests            int
 +              MaxKeepBlobBuffers               int
 +              MaxRequestAmplification          int
 +              MaxRequestSize                   int
 +              MaxTokenLifetime                 Duration
 +              RequestTimeout                   Duration
 +              SendTimeout                      Duration
 +              WebsocketClientEventQueue        int
 +              WebsocketServerEventQueue        int
 +              KeepServiceRequestTimeout        Duration
 +              VocabularyPath                   string
 +              FreezeProjectRequiresDescription bool
 +              FreezeProjectRequiresProperties  StringSet
 +              UnfreezeProjectRequiresAdmin     bool
        }
        AuditLogs struct {
                MaxAge             Duration
@@@ -448,6 -445,7 +448,7 @@@ type ContainersConfig struct 
        StaleLockTimeout              Duration
        SupportedDockerImageFormats   StringSet
        AlwaysUsePreemptibleInstances bool
+       PreemptiblePriceFactor        float64
        RuntimeEngine                 string
        LocalKeepBlobBuffersPerVCPU   int
        LocalKeepLogsToContainerLog   string