[MCO-591] Ensure mco service supports conditional restart Created: 2015/02/09  Updated: 2015/03/11  Resolved: 2015/02/17

Status: Closed
Project: MCollective
Component/s: None
Affects Version/s: None
Fix Version/s: MCO 2.8.1

Type: Task Priority: Normal
Reporter: Past Haus Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones PUP-3982 Ensure puppet service supports condit... Closed
Template:
Epic Link: Puppet Agent 1.0
Story Points: 1
Sprint: Client 2015-02-18
QA Contact: Eric Thompson

 Description   

To ensure clean upgrades, calling conditional restart/try-restart/condrestart in the post will be a better experience. Currently, only puppet and mcollective have services that will need to updated. Debian and redhat support this behavior, I don't know about OSX, solaris, or AIX for this.



 Comments   
Comment by Eric Thompson [ 2015/02/12 ]

Branan Riley is there a code change for this?
does it need functional review?

Comment by Branan Riley [ 2015/02/12 ]

Eric Thompson Validation of this should just be installing an AIO build that contains the fixed init scripts and verifying that `service mcollective condrestart` only (re)-starts the service if it is already running.

I'm unsure how we've been pushing code updates into AIO, so it's possible this needs to be kicked back to 'integrating' until there's a build with this code.

Comment by Eric Thompson [ 2015/02/13 ]

why does aio have its own ext/ dir?

wouldn't the normal init script would want this better condrestart implementation as well? (see above question)

Comment by Eric Thompson [ 2015/02/13 ]

verified on ubuntu 14 at puppet-agent SHA: 53a1ad4

root@szqdn6cihys7x4d:/opt/puppet-git-repos/marionette-collective# wget http://builds.puppetlabs.lan/puppet-agent/53a1ad4a089ffaab571d979dbb6d87edb4eec618/artifacts/deb/trusty/puppet-agent_0.3.2.21.g53a1ad4-1trusty_amd64.deb
--2015-02-13 14:41:18--  http://builds.puppetlabs.lan/puppet-agent/53a1ad4a089ffaab571d979dbb6d87edb4eec618/artifacts/deb/trusty/puppet-agent_0.3.2.21.g53a1ad4-1trusty_amd64.deb
Resolving builds.puppetlabs.lan (builds.puppetlabs.lan)... 10.32.77.131
Connecting to builds.puppetlabs.lan (builds.puppetlabs.lan)|10.32.77.131|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9376352 (8.9M) [application/x-debian-package]
Saving to: ‘puppet-agent_0.3.2.21.g53a1ad4-1trusty_amd64.deb’
 
100%[====================================================================================================================>] 9,376,352   17.7MB/s   in 0.5s
 
2015-02-13 14:41:19 (17.7 MB/s) - ‘puppet-agent_0.3.2.21.g53a1ad4-1trusty_amd64.deb’ saved [9376352/9376352]
 
root@szqdn6cihys7x4d:/opt/puppet-git-repos/marionette-collective# dpkg -i ./puppet-agent_0.3.2.21.g53a1ad4-1trusty_amd64.deb
Selecting previously unselected package puppet-agent.
(Reading database ... 93143 files and directories currently installed.)
Preparing to unpack .../puppet-agent_0.3.2.21.g53a1ad4-1trusty_amd64.deb ...
Unpacking puppet-agent (0.3.2.21.g53a1ad4-1trusty) ...
Setting up puppet-agent (0.3.2.21.g53a1ad4-1trusty) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
root@szqdn6cihys7x4d:/opt/puppet-git-repos/marionette-collective# cat /etc/init.d/mcollective
#!/bin/sh
#
# mcollective   Application Server for STOMP based agents
#
 
[...]
 
        ;;
    condrestart)
        # status prints a horrible error message when it fails. We
        # don't want to scare the user away.
        if $0 status >/dev/null 2>&1; then
            $0 restart
        fi
        ;;

Comment by Richard Clamp [ 2015/02/16 ]

why does aio have its own ext/ dir?

Because init script hardcode paths such as where to find the config file, and where pidfiles should be kept. These paths are different for AIO and the existing packaging, so until AIO is the only way we ship MCollective we need both sets.

wouldn't the normal init script would want this better condrestart implementation as well? (see above question)

It would, if we continue to ship MCollective packages.

Comment by Eric Thompson [ 2015/02/17 ]

thanks Richard. makes perfect sense, in retrospect.

Generated at Sat Dec 14 19:35:13 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.