The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8121
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 631c3a5c5c50d88b8bbe96fdd7de927b5ddf95ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Thu, 5 Nov 2020 13:21:54 -0500 Subject: [PATCH] doc/instances: Typo fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- doc/instances.md | 2 +- lxd/storage_pools_config.go | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/instances.md b/doc/instances.md index 19af14dfda..d6809ff115 100644 --- a/doc/instances.md +++ b/doc/instances.md @@ -54,7 +54,7 @@ limits.kernel.\* | string | - | no limits.memory | string | - (all) | yes | - | Percentage of the host's memory or fixed value in bytes (various suffixes supported, see below) limits.memory.enforce | string | hard | yes | container | If hard, instance can't exceed its memory limit. If soft, the instance can exceed its memory limit when extra host memory is available limits.memory.hugepages | boolean | false | no | virtual-machine | Controls whether to back the instance using hugepages rather than regular system memory -limits.memory.swap | boolean | true | yes | container | Controlers whether to encourage/discourage swapping less used pages for this instance +limits.memory.swap | boolean | true | yes | container | Controls whether to encourage/discourage swapping less used pages for this instance limits.memory.swap.priority | integer | 10 (maximum) | yes | container | The higher this is set, the least likely the instance is to be swapped to disk (integer between 0 and 10) limits.network.priority | integer | 0 (minimum) | yes | - | When under load, how much priority to give to the instance's network requests (integer between 0 and 10) limits.processes | integer | - (max) | yes | container | Maximum number of processes that can run in the instance diff --git a/lxd/storage_pools_config.go b/lxd/storage_pools_config.go index d593655bfd..09916394bf 100644 --- a/lxd/storage_pools_config.go +++ b/lxd/storage_pools_config.go @@ -175,15 +175,16 @@ func storagePoolFillDefault(name string, driver string, config map[string]string return fmt.Errorf("Couldn't statfs %s: %s", shared.VarPath(), err) } - /* choose 15 GB < x < 100GB, where x is 20% of the disk size */ - size := uint64(st.Frsize) * st.Blocks / (1024 * 1024 * 1024) / 5 - if size > 100 { - size = 100 + /* choose 5 GB < x < 30GB, where x is 20% of the disk size */ + defaultSize := uint64(st.Frsize) * st.Blocks / (1024 * 1024 * 1024) / 5 + if defaultSize > 30 { + defaultSize = 30 } - if size < 15 { - size = 15 + if defaultSize < 5 { + defaultSize = 5 } - config["size"] = strconv.FormatUint(uint64(size), 10) + "GB" + + config["size"] = strconv.FormatUint(uint64(defaultSize), 10) + "GB" } else { _, err := units.ParseByteSizeString(config["size"]) if err != nil {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel