Bug 785825

Summary: Modify cumin-database to call systemctl directly instead of redirect through service
Product: [Fedora] Fedora Reporter: Trevor McKay <tmckay>
Component: cuminAssignee: Trevor McKay <tmckay>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 15CC: croberts, matt, tmckay
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 785837 (view as bug list) Environment:
Last Closed: 2012-08-07 20:24:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 785837, 785840, 785863    

Description Trevor McKay 2012-01-30 17:41:10 UTC
Description of problem:

The cumin-databse script has legacy calls to /sbin/service for controlling postgresql.  This causes extra "via" messages to print on the screen when script operations are run.  Eliminate these by calling systemctl.

Version-Release number of selected component (if applicable):

cumin-0.1.5137-4

How reproducible:

100%


Steps to Reproduce:
1.  yum install cumin
2.  cumin-database install
3.  cumin-database stop
4.  cumin-database start
  
Actual results:

At various points in the output from the above commands, messages like this will be printed:

Starting postgresql (via systemctl):                       [  OK  ]

Expected results:

These messages should not be seen.

Additional info:

This functionality will be added through conditionals in a single script that supports F15+ and RHEL 5+.  As such, it is not just a simple cut and paste operation since platforms without systemd still need to work.

Note too that in one instance, initdb, F15 must continue to use /sbin/service and not systemctl.

Comment 1 Trevor McKay 2012-01-31 19:50:56 UTC
Fixed in revision 5198.

Here is a test sequence that should exercise all execution paths for affected code.  Note that users typically will likely only be doing cumin-database install, start, and stop from the below set.

On a clean system

$ cumin-database install

This should succeed.  There should be no instances of "(via systemctl)" messages in the output.  Additionally, output should show that F15 uses "/sbin/service postgresql initdb" for database initialization.

$ cumin-database stop
$ cumin-database start 

The following steps can be done to test an execution path through the
"configure" command that will prompt the user and perform a restart.  The
"create" will leave everything in order.  Note, not strictly necessary since
users are unlikely to use these commands but to be complete...

$ cumin-database annihilate  (answer "really" at the "Really?" prompt)
$ cumin-database initialize
$ cumin-database start
$ cumin-database configure   (answer "yes" to restart)
$ cumin-database create

Comment 2 Fedora End Of Life 2012-08-07 20:24:53 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping