RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1114622 - RICCI XMLRPC: overload stop_service so that it can fulfill its nominal promise
Summary: RICCI XMLRPC: overload stop_service so that it can fulfill its nominal promise
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: clustermon
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Pokorný [poki]
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1075802 1111249 1159926
TreeView+ depends on / blocked
 
Reported: 2014-06-30 13:58 UTC by Jan Pokorný [poki]
Modified: 2018-12-06 17:05 UTC (History)
5 users (show)

Fixed In Version: clustermon-0.16.2-31.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 1111249
Environment:
Last Closed: 2015-07-22 07:40:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1220762 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Knowledge Base (Solution) 965543 0 None None None Never
Red Hat Product Errata RHBA-2015:1413 0 normal SHIPPED_LIVE clustermon bug fix update 2015-07-20 18:06:48 UTC

Internal Links: 1220762

Description Jan Pokorný [poki] 2014-06-30 13:58:15 UTC
Currently, "stop_service" method of ricci/XMLRPC API is partly a misnomer,
in a sense, defeating the clarity towards the API users: in fact it
disables the service (as in clusvcadm -d, permanent stop) whereas stopping
(as in clusvcadm -s, temporary stop) might be expected.

Because of its longevity, the API call has to stay backwards compatible,
meaning that best way to allow for both permanent and temporary stop is
probably this:

1. keep stop_service, without any additional parameter/flag it refers to 
   permanent stop (backward compatibility)

2. introduce new parameter/toggle flag to stop_service method, say "soft",
   that defaults to "false" (leading to scenario of item 1.), but will
   change the behavior to use "clusvcadm -s" under the hood
   (instead of "-d") if set to "true"

This would, in turn, provide ability to temporarily stop service to
clients of ricci: luci/[bug 1111249], ccs/[bug to be filed]


Digest of the original bug:

+++ This bug was initially created as a clone of Bug #1111249 +++

Not having a "stop" button is a problem with clustered services that have
dependencies because dependencies will not start or stop child resources if
they are in disabled state.

--- Additional comment from Shane Bradley on 2014-06-30 15:31:54 CEST ---

Just expecting to be able to stop services like the following:
# clusvcadm -s service1

Comment 4 Jan Pokorný [poki] 2015-03-05 14:49:11 UTC
Oops, due to counter-intuitive source base split between two SRPMs,
this was misfiled under ricci component instead of clustermon.

Comment 8 Jan Pokorný [poki] 2015-03-09 15:49:44 UTC
Documentation note
------------------
This bug does not require a doc text -- it is a preparation work
at the back-end to enable the clients/front-end (luci, ccs) to expose
this new management tasks towards the users.


Development note
----------------

The API to be called was slightly extended as per [comment 0],
except for "new parameter/toggle flag" name, which is eventually
"temporary".  When one wants to check this API extension is actually
supported, per-module-API version 1.1 (or anything below 2.0) should
be exercised first, success of which will indicate proper support
of this feature at the back-end (and only then it is safe to work
with this expectation!).  Suggested pseudo-algorithm is hence:

1. try 1.1 <= API version < 2.0 (depending on other newly added features)
2a. SUCCESS -> all OK, handle the response
               (possibly remembering the feature support within
                a short-lived session)
2b. FAILURE -> inform user to update clustermon on the target node

Comment 12 Jan Pokorný [poki] 2015-04-21 15:01:19 UTC
OK, let's have a look at rgmanager's code to see what relevant bits we
can learn from so as not to be too restrictive on the modcluster side
about what service states and requests can combine well.

Unfinished "reverse engineering" of what is the outcome for particular
REQUEST + STATE combination ("what is OK and what is not"):

REQUEST\ STATE| S | S | S | S | F | U | C | E | R | D | M |
       |      | T | T | T | T | A | N | H | R | E | I | I |
       |      | O | A | A | O | I | I | E | R | C | S | G |
        \     | P | R | R | P | L | N | C | O | O | A | R |
         |    | P | T | T | P | E | I | K | R | V | B | A |
         |    | E | I | E | I | D | T |   |   | E | L | T |
          \   | D | N | D | N |   | I |   |   | R | E | E |
           |  |   | G |   | G |   | A |   |   |   | D |   |
           |  |   |   |   |   |   | L |   |   |   |   |   |
            \ |   |   |   |   |   | E |   |   |   |   |   |
             \|   |   |   |   |   | D |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
SUCCESS       |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
FAIL          |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
START         |C-1|C-1|C-1|C-1|F-0|F-0|C-1|C-1|O-2|F-0|O-4|<-advise_start
--------------+---+---+---+---+---+---+---+---+---+---+---+
STOP          |O-2|C-1|C-1|C-1|F-0|O-2|C-1|F-0|C-1|O-2|C-1|<-advise_stop
--------------+---+---+---+---+---+---+---+---+---+---+---+
STATUS        |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
DISABLE       |O-1|C-1|C-1|C-1|O-1|O-1|C-1|O-1|C-1|O-1|C-1|<-advise_stop
--------------+---+---+---+---+---+---+---+---+---+---+---+
STOP_RECOVER  |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
START_RECOVER |C-1|C-1|C-1|C-1|F-0|O-1|C-1|C-1|O-1|O-1|O-4|<-advise_start
--------------+---+---+---+---+---+---+---+---+---+---+---+
RESTART       |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
EXITING       |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
INIT          |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
ENABLE        |C-1|C-1|C-1|C-1|F-0|C-1|C-1|C-1|O-2|C-1|O-4|<-advise_start
--------------+---+---+---+---+---+---+---+---+---+---+---+
STATUS_NODE   |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
RELOCATE      |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
CONDSTOP      |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
CONDSTART     |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
START_REMOTE  |C-1|C-1|C-1|C-1|F-0|C-1|C-1|C-1|O-2|C-1|O-4|<-advise_start
--------------+---+---+---+---+---+---+---+---+---+---+---+
STOP_USER     |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
STOP_EXITING  |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
LOCK          |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
UNLOCK        |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
QUERY_LOCK    |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
MIGRATE       |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
FREEZE        |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
UNFREEZE      |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
STATUS_INQUIRY|   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
CONVALESCE    |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+
NONE          |   |   |   |   |   |   |   |   |   |   |   |
--------------+---+---+---+---+---+---+---+---+---+---+---+

encoding: X-Y

where X: O ~ OK
         C - conditionals (it depends)
         F - failure

and Y is a return value from svc_advise_{start,stop}:

advise_start 0 = DO NOT start service, return RG_EFAIL
             1 = START service - return whatever it returns.
             2 = DO NOT start service, return 0
             3 = DO NOT start service, return RG_EAGAIN
             4 = DO NOT start service, return RG_ERUN
             5 = DO NOT start service, return RG_EFROZEN

advise_stop  0 = DO NOT stop service, return RG_EFAIL
             1 = STOP service - return whatever it returns.
             2 = DO NOT stop service, return 0 (success)
             3 = DO NOT stop service, return RG_EFORWARD
             4 = DO NOT stop service, return RG_EAGAIN
             5 = DO NOT stop service, return RG_EFROZEN
             6 = DO NOT stop service, mark stopped and return
                 RG_SUCCESS (0)


relevant files (under rgmanager/src/daemons):
resgroup.h
rg_state.c
(rg_thread.c)

control flow wrt. advise_service_start:
== handle_fd_start_req ==>
   ==> handle_start_remote_req ==\
                                  => svc_start -> advise_service_start
====== handle_start_req        ==/

Comment 17 errata-xmlrpc 2015-07-22 07:40:04 UTC
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.

https://rhn.redhat.com/errata/RHBA-2015-1413.html


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