Red Hat Bugzilla – Bug 858360
[RFE] katello-upgrade should take care of stopping and starting services
Last modified: 2014-11-09 17:56:13 EST
+++ 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
# 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 ~]#
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
*** Bug 857913 has been marked as a duplicate of this bug. ***
https://github.com/Katello/katello/pull/758
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
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
# 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.
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
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
getting rid of 6.0.0 version since that doesn't exist