Bug 820280

Summary: [RFE] katello-upgrade should take care of stopping and starting services
Product: [Retired] Subscription Asset Manager Reporter: Eric Sammons <esammons>
Component: katelloAssignee: Jordan OMara <jomara>
Status: CLOSED CURRENTRELEASE QA Contact: Og Maciel <omaciel>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0.0CC: athomas, bkearney, omaciel, tkolhar, tomckay
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 820621 858360 (view as bug list) Environment:
Last Closed: 2013-06-07 17:23:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 816564, 820621, 858360, 876492    

Description Eric Sammons 2012-05-09 14:03:16 UTC
Description of problem:
During the upgrade process the first step is to shutdown services.  The katello-upgrade script should handle this, taking this step out of the hands of the sysadmin makes the script more userfriendly.


Steps to Reproduce:
1. katello-upgrade
2. You are about to shutdown katello services and upgrade, Continue[y|N]?
3. Y

  
Actual results:
All required katello services (tomcat6, thumbslug, katello-jobs, katello etc..) would be stopped by the script and the upgrade would continue.

Comment 1 Tom McKay 2012-05-22 17:22:30 UTC
*** Bug 824087 has been marked as a duplicate of this bug. ***

Comment 2 Jordan OMara 2012-07-17 20:03:17 UTC
[root@sam ~]# katello-upgrade
Service 'katello' can not be running while katello-upgrade is in progress
We will stop the following services for the upgrade process:
        katello, katello-jobs, tomcat6, pulp-server, thumbslug
PROCEED? Y/N
y
Stopping: katello
Stopping: katello-jobs
Stopping: tomcat6
Stopping: pulp-server
Stopping: thumbslug

https://github.com/Katello/katello/pull/331

Comment 3 Jordan OMara 2012-07-26 15:09:21 UTC
https://github.com/Katello/katello/pull/331

Comment 4 Og Maciel 2012-10-09 21:40:42 UTC
[root@qetello03 ~]# katello-upgrade -a -s
Service 'katello' can not be running while katello-upgrade is in progress
Service 'katello-jobs' can not be running while katello-upgrade is in progress
Service 'tomcat6' can not be running while katello-upgrade is in progress
Service 'thumbslug' can not be running while katello-upgrade is in progress
Service 'httpd' can not be running while katello-upgrade is in progress
Service 'elasticsearch' can not be running while katello-upgrade is in progress
================================================================================
We will stop all katello services.
PROCEED? (y/n): n
Exiting. Please stop your services and try again
[root@qetello03 ~]# katello-upgrade -a -s
Service 'katello' can not be running while katello-upgrade is in progress
Service 'katello-jobs' can not be running while katello-upgrade is in progress
Service 'tomcat6' can not be running while katello-upgrade is in progress
Service 'thumbslug' can not be running while katello-upgrade is in progress
Service 'httpd' can not be running while katello-upgrade is in progress
Service 'elasticsearch' can not be running while katello-upgrade is in progress
================================================================================
We will stop all katello services.
PROCEED? (y/n): y
Shutting down Katello services...
Stopping katello: 
Stopping elasticsearch:                                    [  OK  ]
Stopping thumbslug:                                        [  OK  ]
Stopping httpd:                                            [  OK  ]
Stopping tomcat6:                                          [  OK  ]
Done.
================================================================================
 Katello upgrade
================================================================================
Nothing to do
We will now start all katello services.
PROCEED? (y/n): n
Exiting. Your Katello installation is upgraded, but please manually start your services
[root@qetello03 ~]# katello-service status
tomcat6 is stopped                                         [  OK  ]
httpd is stopped
thumbslug is stopped
elasticsearch is stopped
katello is not running.
delayed_job is not running.
delayed_job_monitor is not running.
[root@qetello03 ~]# katello-service start
Starting Katello services...
Starting tomcat6:                                          [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using qetello03.usersys.redhat.com for ServerName
                                                           [  OK  ]
Starting thumbslug: Oct 09 17:08:48 [main] WARN  org.candlepin.thumbslug.Main - Shutting down...
                                                           [  OK  ]
Starting elasticsearch:                                    [  OK  ]
Starting katello: Oct 9, 2012 5:08:49 PM node
INFO: [Pluto] {0.18.4}[7747]: initializing ...
Oct 9, 2012 5:08:49 PM plugins
INFO: [Pluto] loaded [], sites []
Oct 9, 2012 5:08:51 PM node
INFO: [Pluto] {0.18.4}[7747]: initialized
Oct 9, 2012 5:08:51 PM node
INFO: [Pluto] {0.18.4}[7747]: starting ...
Oct 9, 2012 5:08:51 PM transport
INFO: [Pluto] bound_address {inet[/127.0.0.1:9300]}, publish_address {inet[localhost/127.0.0.1:9300]}
                                                           [  OK  ]
Starting katello-jobs: Oct 9, 2012 5:08:54 PM cluster.service
INFO: [Pluto] new_master [Pluto][nMh7DTU-QuC-BY8pCY2ADA][inet[localhost/127.0.0.1:9300]], reason: zen-disco-join (elected_as_master)
Oct 9, 2012 5:08:55 PM discovery
INFO: [Pluto] elasticsearch/nMh7DTU-QuC-BY8pCY2ADA
Oct 9, 2012 5:08:55 PM http
INFO: [Pluto] bound_address {inet[/127.0.0.1:9200]}, publish_address {inet[localhost/127.0.0.1:9200]}
Oct 9, 2012 5:08:55 PM node
INFO: [Pluto] {0.18.4}[7747]: started
                                                           [  OK  ]
Done.
[root@qetello03 ~]# katello-service status
tomcat6 (pid 7574) is running...                           [  OK  ]
httpd (pid  7677) is running...
thumbslug (pid  7713) is running...
elasticsearch (pid  7747) is running...
katello (7795) is running.
katello (7799) is running.
katello (7819) is running.
katello (7839) is running.
katello (7861) is running.
delayed_job is running.
delayed_job_monitor is running.
[root@qetello03 ~]# katello-upgrade -a -s
Service 'katello' can not be running while katello-upgrade is in progress
Service 'katello-jobs' can not be running while katello-upgrade is in progress
Service 'tomcat6' can not be running while katello-upgrade is in progress
Service 'thumbslug' can not be running while katello-upgrade is in progress
Service 'httpd' can not be running while katello-upgrade is in progress
Service 'elasticsearch' can not be running while katello-upgrade is in progress
================================================================================
We will stop all katello services.
PROCEED? (y/n): y
Shutting down Katello services...
Stopping katello: 
Stopping elasticsearch:                                    [  OK  ]
Stopping thumbslug:                                        [  OK  ]
Stopping httpd:                                            [  OK  ]
Stopping tomcat6:                                          [  OK  ]
Done.
================================================================================
 Katello upgrade
================================================================================
Nothing to do
We will now start all katello services.
PROCEED? (y/n): y
Starting Katello services...
Starting tomcat6:                                          [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using qetello03.usersys.redhat.com for ServerName
                                                           [  OK  ]
Starting thumbslug: Oct 09 17:15:43 [main] WARN  org.candlepin.thumbslug.Main - Shutting down...
                                                           [  OK  ]
Starting elasticsearch:                                    [  OK  ]
Starting katello: Oct 9, 2012 5:15:43 PM node
INFO: [St. Croix, Monet] {0.18.4}[8881]: initializing ...
Oct 9, 2012 5:15:43 PM plugins
INFO: [St. Croix, Monet] loaded [], sites []
Oct 9, 2012 5:15:45 PM node
INFO: [St. Croix, Monet] {0.18.4}[8881]: initialized
Oct 9, 2012 5:15:45 PM node
INFO: [St. Croix, Monet] {0.18.4}[8881]: starting ...
Oct 9, 2012 5:15:46 PM transport
INFO: [St. Croix, Monet] bound_address {inet[/127.0.0.1:9300]}, publish_address {inet[localhost/127.0.0.1:9300]}
                                                           [  OK  ]
Starting katello-jobs: Oct 9, 2012 5:15:49 PM cluster.service
INFO: [St. Croix, Monet] new_master [St. Croix, Monet][CiEvD7PcRImm-JK2-bT_6g][inet[localhost/127.0.0.1:9300]], reason: zen-disco-join (elected_as_master)
Oct 9, 2012 5:15:49 PM discovery
INFO: [St. Croix, Monet] elasticsearch/CiEvD7PcRImm-JK2-bT_6g
Oct 9, 2012 5:15:49 PM http
INFO: [St. Croix, Monet] bound_address {inet[/127.0.0.1:9200]}, publish_address {inet[localhost/127.0.0.1:9200]}
Oct 9, 2012 5:15:49 PM node
INFO: [St. Croix, Monet] {0.18.4}[8881]: started
                                                           [  OK  ]
Done.
[root@qetello03 ~]# katello-service status
tomcat6 (pid 8716) is running...                           [  OK  ]
httpd (pid  8816) is running...
thumbslug (pid  8852) is running...
elasticsearch (pid  8881) is running...
katello (8934) is running.
katello (8939) is running.
katello (8945) is running.
katello (8967) is running.
katello (8986) is running.
delayed_job is running.
delayed_job_monitor is running.

Comment 5 Og Maciel 2012-10-09 21:41:09 UTC
Verified:

* candlepin-0.7.12-1.el6_3.noarch
* candlepin-tomcat6-0.7.12-1.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1h.el6_3.noarch
* katello-cli-common-1.1.10-1h.el6_3.noarch
* katello-cli-headpin-0.2.2-1.el6_2.noarch
* katello-common-1.1.14-2h.el6_3.noarch
* katello-configure-1.1.11-1h.el6_3.noarch
* katello-glue-candlepin-1.1.14-2h.el6_3.noarch
* katello-headpin-1.1.14-2h.el6_3.noarch
* katello-headpin-all-1.1.14-2h.el6_3.noarch
* katello-selinux-1.1.2-1h.el6_3.noarch

Comment 6 Bryan Kearney 2013-06-07 17:23:55 UTC
Closing out verified bugs from 1.2. Somehow the errata tool missed them.

Comment 7 Bryan Kearney 2013-06-07 17:25:29 UTC
Closing out verified bugs from 1.2. Somehow the errata tool missed them.