Git Product home page Git Product logo

puppet-dbus's Introduction

dbus

Build Status Codecov Puppet Forge version Puppet Forge downloads Puppet Forge - PDK version

Table of Contents

  1. Description
  2. Setup - The basics of getting started with dbus
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

This module manages D-Bus.

RHEL/CentOS, Ubuntu, Debian and OpenBSD are supported using Puppet 5 or later.

Setup

Beginning with dbus

In the very simplest case, you can just include the following:

include dbus

Usage

To add the oddjob daemon to the system bus:

include dbus

dbus::system { 'oddjob':
  content => file('oddjob/oddjob.conf'),
}

Reference

The reference documentation is generated with puppet-strings and the latest version of the documentation is hosted at https://bodgit.github.io/puppet-dbus/ and available also in the REFERENCE.md.

Limitations

This module has been built on and tested against Puppet 5 and higher.

The module has been tested on:

  • Red Hat/CentOS Enterprise Linux 6/7/8
  • Ubuntu 16.04/18.04/20.04
  • Debian 9/10
  • OpenBSD 6.9

Development

The module relies on PDK and has both rspec-puppet and Litmus tests. Run them with:

$ bundle exec rake spec
$ bundle exec rake litmus:*

Please log issues or pull requests at github.

puppet-dbus's People

Contributors

bodgit avatar

Watchers

 avatar  avatar  avatar

puppet-dbus's Issues

dbus systemd unit is static

On platforms with systemd the unit managing dbus-daemon appears to always be static, therefore it can neither be disabled or enabled, leading to the following error:

Error: Could not enable messagebus: 
Error: /Stage[main]/Dbus::Service/Service[messagebus]/enable: change from false to true failed: Could not enable messagebus: 

A simple fix would be to simply not try and manage the enable attribute on the service when on a platform with systemd.

Use `dbus` instead of `messagebus` on EL7

So despite EL7 having a dbus.service systemd unit with a messagebus.service symlink pointing to it, using the latter does not seem to work properly 100% of the time. Quite often I see the following:

# systemctl is-active messagebus
unknown
# systemctl is-active dbus
active

This behaviour causes the Puppet Service['messagebus'] resource to be started unnecessarily. Rather than try and pick apart why systemd is behaving this way, just use dbus as the default service name on EL7.

Handle reloads better

So, systemd does define in the unit file how to reload dbus configuration without having to restart dbus-daemon which seems to cause some dbus services to not reconnect however it's triggered with a systemctl reload {dbus|messagebus}.service. Puppet doesn't (yet) support reloading a service as opposed to restarting it so it won't ever use that hook.

Instead, add a refresh-only exec resource that the configuration can notify and use this regardless of init system in use.

No need to manage the system default configuration

D-Bus now puts the default configuration at /usr/share/dbus-1/{session,system}.conf and /etc/dbus-1/{session,system}.conf are now "empty" files that tell you to put customisation in either {session,system}-local.conf files, or drop fragments as {session,system}.d/*.conf files.

So I can probably drop managing the horrible templated default files now as they're clearly designated as read-only and just manage the files under /etc/dbus-1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.