Bug 858360 - [RFE] katello-upgrade should take care of stopping and starting services
[RFE] katello-upgrade should take care of stopping and starting services
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.1
Unspecified Unspecified
medium Severity medium (vote)
: Unspecified
: --
Assigned To: Jordan OMara
Og Maciel
: FutureFeature, Triaged
: 857913 (view as bug list)
Depends On: 820280
Blocks: sam12-tracker 820621
  Show dependency treegraph
 
Reported: 2012-09-18 15:05 EDT by Jordan OMara
Modified: 2014-11-09 17:56 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
The katello-upgrade script includes stopping all necessary services for the upgrade. This provides less steps to the upgrade process and ensure a smoother transition.
Story Points: ---
Clone Of: 820280
Environment:
Last Closed: 2012-12-04 14:55:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jordan OMara 2012-09-18 15:05:25 EDT
+++ This bug was initially created as a clone of Bug #820280 +++

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.

--- Additional comment from tomckay@redhat.com on 2012-05-22 13:22:30 EDT ---

*** Bug 824087 has been marked as a duplicate of this bug. ***

--- Additional comment from jomara@redhat.com on 2012-07-17 16:03:17 EDT ---

[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

--- Additional comment from jomara@redhat.com on 2012-07-26 11:09:21 EDT ---

https://github.com/Katello/katello/pull/331
Comment 3 Og Maciel 2012-09-25 17:18:14 EDT
# katello-upgrade -y -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 'pulp-server' 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 httpd:                                            [  OK  ]
Stopping Qpid AMQP daemon:                                 [  OK  ]
Stopping mongod:                                           [  OK  ]
Stopping httpd:                                            [FAILED]
Stopping tomcat6:                                          [  OK  ]
Done.
================================================================================
 Katello upgrade
================================================================================
Nothing to do
[root@qetello02 ~]# katello -u admin -p admin ping
Connection refused
[root@qetello02 ~]#
Comment 4 Og Maciel 2012-09-25 17:27:11 EDT
FailedQA. Systems should have been restarted even if there were no upgrades available.

* candlepin-0.7.8-1.el6cf.noarch
* candlepin-selinux-0.7.8-1.el6cf.noarch
* candlepin-tomcat6-0.7.8-1.el6cf.noarch
* katello-1.1.12-9.el6cf.noarch
* katello-all-1.1.12-9.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-5.el6cf.noarch
* katello-cli-common-1.1.8-5.el6cf.noarch
* katello-common-1.1.12-9.el6cf.noarch
* katello-configure-1.1.9-4.el6cf.noarch
* katello-glue-candlepin-1.1.12-9.el6cf.noarch
* katello-glue-pulp-1.1.12-9.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-1.el6cf.noarch
* pulp-1.1.12-1.el6cf.noarch
* pulp-common-1.1.12-1.el6cf.noarch
* pulp-selinux-server-1.1.12-1.el6cf.noarch
Comment 5 Mike McCune 2012-09-26 11:41:45 EDT
*** Bug 857913 has been marked as a duplicate of this bug. ***
Comment 6 Lukas Zapletal 2012-09-27 07:44:45 EDT
https://github.com/Katello/katello/pull/758
Comment 9 Og Maciel 2012-10-02 18:42:03 EDT
Sadly I will have to fail this again. There are 2 distinct phases for running this script, with prompts for both of them asking simple Yes/No questions:

* One stops all the services before the upgrade. Typing YES stops services and NO does nothing and exit.

* Once the upgrade is done, you are prompted if you want to restart all services. Typing YES restarts everything, but typing No gives you a traceback:

We will now start all katello services.
PROCEED? (y/n): n
/usr/sbin/katello-upgrade:337:in `start_services': undefined local variable or method `exit_service_start' for #<UpgradeProcess:0x7f42d7124fa0> (NameError)
	from /usr/sbin/katello-upgrade:306:in `ensure_services_are_on'
	from /usr/sbin/katello-upgrade:263:in `run'
	from /usr/sbin/katello-upgrade:496
Comment 10 Jordan OMara 2012-10-05 16:42:44 EDT
Side effect of https://bugzilla.redhat.com/show_bug.cgi?id=862441 ; keep this bug open as the symptoms are different. That bug fix just got built so I'm marking this as modified although no changes were made
Comment 12 Og Maciel 2012-10-08 18:06:23 EDT
# katello-upgrade -y -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 'pulp-server' 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 httpd:                                            [  OK  ]
Stopping Qpid AMQP daemon:                                 [  OK  ]
Stopping mongod:                                           [  OK  ]
Stopping httpd:                                            [FAILED]
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

# katello-upgrade -y -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 'pulp-server' 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

# katello-upgrade -y -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 'pulp-server' 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@qetello04 ~]# katello-upgrade -y -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 'pulp-server' 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 httpd:                                            [  OK  ]
Stopping Qpid AMQP daemon:                                 [  OK  ]
Stopping mongod:                                           [  OK  ]
Stopping httpd:                                            [FAILED]
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  ]
Waiting for tomcat to be ready ...
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using qetello04.usersys.redhat.com for ServerName
                                                           [  OK  ]
Starting mongod:                                           [  OK  ]
Starting Qpid AMQP daemon:                                 [  OK  ]
Starting httpd: 
Starting elasticsearch:                                    [  OK  ]
Starting katello: Oct 8, 2012 5:41:54 PM node
INFO: [Professor Power] {0.18.4}[8001]: initializing ...
Oct 8, 2012 5:41:55 PM plugins
INFO: [Professor Power] loaded [], sites []
Oct 8, 2012 5:41:56 PM node
INFO: [Professor Power] {0.18.4}[8001]: initialized
Oct 8, 2012 5:41:56 PM node
INFO: [Professor Power] {0.18.4}[8001]: starting ...
Oct 8, 2012 5:41:56 PM transport
INFO: [Professor Power] bound_address {inet[/127.0.0.1:9300]}, publish_address {inet[localhost/127.0.0.1:9300]}
                                                           [  OK  ]
Starting katello-jobs: Oct 8, 2012 5:41:59 PM cluster.service
INFO: [Professor Power] new_master [Professor Power][9619JpCGSK6jSkElugcdmA][inet[localhost/127.0.0.1:9300]], reason: zen-disco-join (elected_as_master)
Oct 8, 2012 5:42:00 PM discovery
INFO: [Professor Power] elasticsearch/9619JpCGSK6jSkElugcdmA
Oct 8, 2012 5:42:00 PM http
INFO: [Professor Power] bound_address {inet[/127.0.0.1:9200]}, publish_address {inet[localhost/127.0.0.1:9200]}
Oct 8, 2012 5:42:00 PM node
INFO: [Professor Power] {0.18.4}[8001]: started

                                                           [  OK  ]
Done.


# LANG=ja_JP.UTF8 katello-upgrade -y -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 'pulp-server' 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 httpd:                                            [  OK  ]
Stopping Qpid AMQP daemon:                                 [  OK  ]
Stopping mongod:                                           [  OK  ]
Stopping httpd:                                            [FAILED]
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  ]
Waiting for tomcat to be ready ...
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using qetello04.usersys.redhat.com for ServerName
                                                           [  OK  ]
Starting mongod:                                           [  OK  ]
Starting Qpid AMQP daemon:                                 [  OK  ]
Starting httpd: 
Starting elasticsearch:                                    [  OK  ]
Starting katello: Oct 8, 2012 5:44:13 PM node
INFO: [Nightshade] {0.18.4}[9113]: initializing ...
Oct 8, 2012 5:44:13 PM plugins
INFO: [Nightshade] loaded [], sites []
Oct 8, 2012 5:44:14 PM node
INFO: [Nightshade] {0.18.4}[9113]: initialized
Oct 8, 2012 5:44:14 PM node
INFO: [Nightshade] {0.18.4}[9113]: starting ...
Oct 8, 2012 5:44:14 PM transport
INFO: [Nightshade] bound_address {inet[/127.0.0.1:9300]}, publish_address {inet[localhost/127.0.0.1:9300]}
                                                           [  OK  ]
Starting katello-jobs: Oct 8, 2012 5:44:17 PM cluster.service
INFO: [Nightshade] new_master [Nightshade][lTZO7p9jSJekrUj5qrFnfQ][inet[localhost/127.0.0.1:9300]], reason: zen-disco-join (elected_as_master)
Oct 8, 2012 5:44:18 PM discovery
INFO: [Nightshade] elasticsearch/lTZO7p9jSJekrUj5qrFnfQ
Oct 8, 2012 5:44:18 PM http
INFO: [Nightshade] bound_address {inet[/127.0.0.1:9200]}, publish_address {inet[localhost/127.0.0.1:9200]}
Oct 8, 2012 5:44:18 PM node
INFO: [Nightshade] {0.18.4}[9113]: started
                                                           [  OK  ]
Done.
Comment 13 Og Maciel 2012-10-08 18:07:37 EDT
Verified:

* candlepin-0.7.8.1-1.el6cf.noarch
* candlepin-selinux-0.7.8.1-1.el6cf.noarch
* candlepin-tomcat6-0.7.8.1-1.el6cf.noarch
* katello-1.1.12-14.el6cf.noarch
* katello-all-1.1.12-14.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-7.el6cf.noarch
* katello-cli-common-1.1.8-7.el6cf.noarch
* katello-common-1.1.12-14.el6cf.noarch
* katello-configure-1.1.9-7.el6cf.noarch
* katello-glue-candlepin-1.1.12-14.el6cf.noarch
* katello-glue-pulp-1.1.12-14.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-1.el6cf.noarch
* pulp-1.1.12-1.el6cf.noarch
* pulp-common-1.1.12-1.el6cf.noarch
* pulp-selinux-server-1.1.12-1.el6cf.noarch
Comment 15 errata-xmlrpc 2012-12-04 14:55:40 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html
Comment 16 Mike McCune 2013-08-16 14:12:24 EDT
getting rid of 6.0.0 version since that doesn't exist

Note You need to log in before you can comment on or make changes to this bug.