Age | Commit message (Collapse) | Author | Files | Lines |
|
The initial fix for pup-1932 inadvertently included 'static' services,
which are services which can't be enabled/disabled. Since such services
aren't manageable, it doesn't make sense to include them in instances,
so this commit removes them.
|
|
Prior to this commit, the systemd provider returned in-memory services.
This had a couple odd consequences, e.g. with 'puppet resource service':
1) short-lived services would come and go, though they are not actually
managed directly
2) disabled and stopped services wouldn't be reported at all
This commit changes the systemd provider to return file-backed
services.
|
|
|
|
asked for
|
|
|
|
Prior to this change the systemd service provider would return
all systemd-managed types (including sockets, devices, swap, etc).
This produced a huge list of instances, many of which were not
in fact services.
This change simply adds the '--type service' option to the
'systemctl' invocation in .instances. It also updates the
spec tests with fixtures for the old (without that option)
and new (with that option) way of invoking 'systemctl'.
I purposefully did not touch the existing fixture which is
tied to a test which is pending on a what-to-do about failed
services. If/when we tackle that, we may want to collapse
some of these fixtures.
|
|
service output is no longer squelched by default.
Redmine 565, a seven year old issue referenced in a comment in lib/puppet/provider/service/service.rb, is no longer applicable to `Puppet::Util::Execution#execute`. It was squelching service output because of a bug in ruby where `#read` on a pipe never returned when the spawned process is SIGTERM'd by one of its children. The current implementation of `Puppet::Util::Execution#execute` redirects to a temporary file instead of reading from a pipe.
We should no longer be squelching service output so that users can easily diagnose service failures.
|
|
Per https://www.archlinux.org/news/end-of-initscripts-support/ Arch
Linux has migrated to systemd and as of January 2013 has dropped support
for sysv style init scripts. GH-1468 updated the systemctl binary
location which made the systemd service provider functional on Arch, but
since there was no clear default between init and systemd, init won out
which effectively broke systemd init scripts.
This commit sets systemd as the default for Arch Linux, and makes the
sysvinit scripts available as a fallback option. Since the init provider
is still functional and can be delegated to if there is no systemd
service for a given system service.
Squashed into a single commit and commit message update by Adrien Thebo
<adrien@puppetlabs.com>
|
|
|
|
It seems to be easier to deal with real object instances instead of fake
objects.
|
|
Without this patch Puppet has a difficult time locating the systemctl
executable in recent versions of Archlinux. This problem is caused by
the executable moving from /bin/systemctl to /usr/bin/systemctl.
This patch addresses the problem by eliminating the fully qualified path
and instead relying on the PATH environment variable to locate the
command.
Unit test systemd_spec updated to test for this new behavior
|
|
These tests were waiting for redhat to change something about their
service systems, but there was no work in progress to make these
changes. At the time the work is done, these tests can come back.
|
|
Without this patch Ruby 1.9 is still complaining loudly about trying to
parse the spec files. The previous attempt to clean up this problem in
edc3ddf works for Ruby 1.8 but not 1.9.
I'd prefer to remove the shebang lines entirely, but doing so will cause
encoding errors in Ruby 1.9. This patch strives for a happy middle
ground of convincing Ruby it is actually working with Ruby while not
confusing it to think it should exec() to rspec.
This patch is the result of the following command run against the source
tree:
find spec -type f -print0 | \
xargs -0 perl -pl -i -e 's,^\#\!\s?/(.*)rspec,\#! /usr/bin/env ruby,'
|
|
Without this patch some spec files are using `ruby -S rspec` and others
are using `rspec`.
We should standardize on a single form of the interpreter used for spec
files.
`ruby -S rspec` is the best choice because it correctly informs editors
such as Vim with Syntastic that the file is a Ruby file rather than an
Rspec file.
|
|
Previously, attempting to run puppet resource service
on Fedora 16 resulted in a stack trace.
This commit resolves the issue so that self.instances should
work for systemd providers. The issue was that the instances
method was returning an Array of strings. This commit updates the
method to correctly return an Array of Provider instances.
|
|
Previously the up2date, redhat and systemd providers used the
operatingsystem fact to select defaults and constraints. This often
meant that new operating systems using the same providers had to be
manually added to the list of supported operating systems
This commit replaces the use of operatingsystem with osfamily meaning
addition of new operating systems is now centralised in one place in
Facter rather than requiring multiple updates.
Tests supporting this have been added to prevent regressions.
|
|
This reverts commit 483a1d93a5e5c78f8f41f905d7aae896081c98f1, reversing
changes made to c6667c50d3b49195685311575b46de1978c4dfd9.
This revert is necessary because the change set includes API breaking
changes in a patch version release of the product.
The API breaking changes are that Puppet 2.7.x > 2.7.9 would require a
different version of Facter than 2.7.x <= 2.7.9 if this change set were
to be released.
This commit should be reverted after 2.7.x merges up into master. That
is to say, the revert itself should be reverted.
|
|
Previously the up2date, redhat and systemd providers used the
operatingsystem fact to select defaults and constraints. This often
meant that new operating systems using the same providers had to be
manually added to the list of supported operating systems.
This commit replaces the use of operatingsystem with osfamily meaning
addition of new operating systems is now centralised in one place in
Facter rather than requiring multiple updates.
Tests supporting this have been added to prevent regressions.
|
|
|