diff --git a/conf/master b/conf/master index 1c4d480e5b..9c47402984 100644 --- a/conf/master +++ b/conf/master @@ -86,7 +86,7 @@ # Set the default output file used by the salt command. Default is to output # to the CLI and not to a file. Functions the same way as the "--out-file" -CLI option, only sets this to a single file for all salt commands. +# CLI option, only sets this to a single file for all salt commands. #output_file: None # Return minions that timeout when running commands like test.ping diff --git a/salt/config/__init__.py b/salt/config/__init__.py index 1db123b4a9..4de3d2ec57 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -47,6 +47,7 @@ try: HAS_PSUTIL = True except ImportError: HAS_PSUTIL = False + import platform import salt.grains.core log = logging.getLogger(__name__) @@ -80,8 +81,8 @@ def _gather_buffer_space(): # Oh good, we have psutil. This will be quick. total_mem = psutil.virtual_memory().total else: - # We need to load up some grains. This will be slow. - os_data = salt.grains.core.os_data() + # We need to load up ``mem_total`` grain. Let's mimic required OS data. + os_data = {'kernel': platform.system()} grains = salt.grains.core._memdata(os_data) total_mem = grains['mem_total'] # Return the higher number between 5% of the system memory and 100MB