Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
ciao-deploy: enable mem/disk limits by default
Browse files Browse the repository at this point in the history
Enable memory limit checking by launcher by default,
and only disable if --disable-limits is passed to ciao-deploy setup.

Signed-off-by: Kristen Carlson Accardi <[email protected]>
  • Loading branch information
kaccardi committed Oct 27, 2017
1 parent f6b599e commit fc67855
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ciao-deploy/cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,5 @@ func init() {
setupCmd.Flags().StringVar(&imageCacheDirectory, "image-cache-directory", deploy.DefaultImageCacheDir(), "Directory to use for caching of downloaded images")
setupCmd.Flags().BoolVar(&force, "force", false, "Overwrite existing files which might break the cluster")
setupCmd.Flags().BoolVar(&localLauncher, "local-launcher", false, "Enable a local launcher on this node (for testing)")
setupCmd.Flags().BoolVar(&clusterConf.DisableLimits, "disable-limits", false, "Disable memory limit checking for cluster nodes")
}
6 changes: 5 additions & 1 deletion ciao-deploy/deploy/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type ClusterConfiguration struct {
AuthCACertPath string
AuthAdminCertPath string
ServerHostname string
DisableLimits bool
}

var ciaoConfigDir = "/etc/ciao"
Expand Down Expand Up @@ -78,8 +79,11 @@ func createConfigurationFile(ctx context.Context, clusterConf *ClusterConfigurat

config.Configure.Launcher.ComputeNetwork = []string{clusterConf.ComputeNet}
config.Configure.Launcher.ManagementNetwork = []string{clusterConf.MgmtNet}

// Disk limit checking is broken and should always be disabled.
// See issue #1541
config.Configure.Launcher.DiskLimit = false
config.Configure.Launcher.MemoryLimit = false
config.Configure.Launcher.MemoryLimit = !clusterConf.DisableLimits

data, err := yaml.Marshal(config)
if err != nil {
Expand Down

0 comments on commit fc67855

Please sign in to comment.