Skip to content

salt.modules.timezone: It is not enough to check for timedatectl existence #39357

@Whissi

Description

@Whissi

Description of Issue/Question

salt.modules.timezone only checks if timedatectl exists but this not enough: dbus-daemon must be installed and running as well. Otherwise you will get an error like

minion32.example.org:
----------
          ID: Europe/Berlin
    Function: timezone.system
      Result: False
     Comment: Unable to compare desired timezone 'Europe/Berlin' to system timezone: timedatectl failed: Failed to create bus connection: No such file or directory
     Started: 13:58:54.247773
    Duration: 7.331 ms
     Changes:
----------

Steps to Reproduce Issue

  1. Install Debian Jessie (8.7 as of today) in minbase variant using debootstrap (debootstrap --variant=minbase --arch amd64 jessie /mnt/debian http://httpredir.debian.org/debian).

  2. Create a timezone.sls state with the following content:

Europe/Berlin:
  timezone.system
  1. Execute the state on your fresh system set up in step 1.

Versions Report

# salt --versions-report
Salt Version:
           Salt: 2016.11.2

Dependency Versions:
           cffi: 0.8.6
       cherrypy: Not Installed
       dateutil: 2.2
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
         Jinja2: 2.9.4
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.2
   mysql-python: 1.2.3
      pycparser: 2.10
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.9 (default, Jun 29 2016, 13:08:31)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.4.0
           RAET: Not Installed
          smmap: 0.8.2
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: debian 8.7
        machine: x86_64
        release: 3.16.0-4-amd64
         system: Linux
        version: debian 8.7

(Salt from https://repo.saltstack.com/#debian)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEExecution-ModulePlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions