diff --git a/doc/topics/releases/0.10.5.rst b/doc/topics/releases/0.10.5.rst index fc52cad2c4..daf1a56942 100644 --- a/doc/topics/releases/0.10.5.rst +++ b/doc/topics/releases/0.10.5.rst @@ -145,3 +145,13 @@ Arch Linux Defaults to Systemd Arch Linux recently changed to use systemd by default and discontinued support for init scripts. Salt has followed suit and defaults to systemd now for managing services in Arch. + +Salt, Salt Cloud and Openstack +------------------------------ + +With the releases of Salt 0.10.5 and Salt Cloud 0.8.2, OpenStack becomes the +first (non-OS) piece of software to include support both on the user level +(with Salt Cloud) and the admin level (with Salt). We are excited to continue +to extend support of other platforms at this level. + + diff --git a/salt/modules/apt.py b/salt/modules/apt.py index ae70ed1aba..7e040b3a21 100644 --- a/salt/modules/apt.py +++ b/salt/modules/apt.py @@ -70,14 +70,12 @@ def version(name): salt '*' pkg.version ''' - # check for :i386 appended to 32bit name installed on 64bit machine - name32bit = '{0}:i386'.format(name) - pkgs = list_pkgs(name) + # check for ':arch' appended to pkg name (i.e. 32 bit installed on 64 bit machine is ':i386') + if name.find(':') >= 0: + name = name.split(':')[0] if name in pkgs: return pkgs[name] - if name32bit in pkgs: - return pkgs[name32bit] else: return '' diff --git a/salt/modules/groupadd.py b/salt/modules/groupadd.py index 3fc0f5985e..3b7ea18f98 100644 --- a/salt/modules/groupadd.py +++ b/salt/modules/groupadd.py @@ -11,7 +11,7 @@ def __virtual__(): ''' Set the user module if the kernel is Linux ''' - return 'group' if __grains__['kernel'] == 'Linux' else False + return 'group' if __grains__.get('kernel', '') == 'Linux' else False def add(name, gid=None, system=False): diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py index bab385adf2..a1413f80c1 100644 --- a/salt/utils/parsers.py +++ b/salt/utils/parsers.py @@ -297,12 +297,24 @@ class LogLevelMixIn(object): def setup_logfile_logger(self): lfkey = 'key_logfile' if 'key' in self.get_prog_name() else 'log_file' + if self.config.get('log_level_logfile', None) is None: + # Remove it from config so it inherits from log_level + self.config.pop('log_level_logfile', None) loglevel = self.config.get( 'log_level_logfile', self.config['log_level'] ) + + if self.config.get('log_fmt_logfile', None) is None: + # Remove it from config so it inherits from log_fmt_console + self.config.pop('log_fmt_logfile', None) logfmt = self.config.get( 'log_fmt_logfile', self.config['log_fmt_console'] ) + + if self.config.get('log_datefmt', None) is None: + # Remove it from config so it get's the default value bellow + self.config.pop('log_datefmt', None) + datefmt = self.config.get('log_datefmt', '%Y-%m-%d %H:%M:%S') log.setup_logfile_logger( self.config[lfkey], diff --git a/salt/version.py b/salt/version.py index 06ba8e95a5..8d11fc3120 100644 --- a/salt/version.py +++ b/salt/version.py @@ -6,13 +6,19 @@ __version__ = '.'.join(map(str, __version_info__)) # If we can get a version from Git use that instead, otherwise carry on try: + import os import subprocess from salt.utils import which git = which('git') if git: - p = subprocess.Popen([git, 'describe'], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) + p = subprocess.Popen( + [git, 'describe'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + close_fds=True, + cwd=os.path.abspath(os.path.dirname(__file__)) + ) out, err = p.communicate() if out: __version__ = '{0}'.format(out.strip().lstrip('v'))