Faidon Liambotis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/190496
Change subject: trebuchet: fix provider to be init system agnostic
......................................................................
trebuchet: fix provider to be init system agnostic
Use "service" rather that "status", because the latter is
upstart-specific. This should probably be amended to rely on exit codes
instead, at some point.
Task: T89461
Change-Id: Ibecd642c31be9cb6f773d093b7a3e7143b4039be
---
M modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/96/190496/1
diff --git a/modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
b/modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
index a3638e3..c3cca6a 100644
--- a/modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
+++ b/modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
@@ -29,9 +29,9 @@
desc 'Puppet package provider for `Trebuchet`.'
- commands :git_cmd => '/usr/bin/git',
- :salt_cmd => '/usr/bin/salt-call',
- :status_cmd => '/sbin/status'
+ commands :git_cmd => '/usr/bin/git',
+ :salt_cmd => '/usr/bin/salt-call',
+ :service_cmd => '/usr/sbin/service'
has_feature :installable, :uninstallable, :upgradeable
@@ -75,7 +75,7 @@
# Make sure that the salt-minion service is running.
def check_salt_minion_status
- status = status_cmd('salt-minion')
+ status = service_cmd('salt-minion', 'status')
fail Puppet::ExecutionFailure unless status.include? 'running'
rescue Puppet::ExecutionFailure
raise Puppet::ExecutionFailure, <<-END
--
To view, visit https://gerrit.wikimedia.org/r/190496
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibecd642c31be9cb6f773d093b7a3e7143b4039be
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits