Bug 865174 - luci GUI not synchronized with cluster.conf entries - not showing resources added with ccs
luci GUI not synchronized with cluster.conf entries - not showing resources a...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: luci (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Ryan McCabe
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 19:00 EDT by Christoph Torlinsky
Modified: 2013-04-02 19:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-10 21:31:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Services in Service Groups are Shown (219.39 KB, image/png)
2012-10-10 19:00 EDT, Christoph Torlinsky
no flags Details
Services Tab Empty but Services exist (207.54 KB, image/png)
2012-10-10 19:02 EDT, Christoph Torlinsky
no flags Details

  None (edit)
Description Christoph Torlinsky 2012-10-10 19:00:32 EDT
Created attachment 625226 [details]
Services in Service Groups are Shown

Description of problem:

Created a simple two node test Cluster with Web Application (httpd) and SCSI
fencing.

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

How reproducible:

Add Subservices and Resources into Cluster using ccs
ccs -h hanode1 --addservice webserver  recovery=relocate autostart=0
ccs -h hanode1 --addsubservice webserver apache name=web server_root=/etc/httpd config_file=/etc/httpd/conf/httpd.conf shutdown_wait=0
ccs -h hanode1 --addsubservice webserver ip address=10.1.3.100 monitor_link=1

WebServer will be running against a simple gfs2 mount /mnt/cluster_apps
Validate the cluster.conf
<?xml version="1.0"?>
<cluster config_version="29" name="webcluster">
        <fence_daemon post_fail_delay="3" post_join_delay="20"/>
        <clusternodes>
                <clusternode name="hanode1" nodeid="1">
                        <fence>
                                <method name="DiskRes">
                                        <device name="scsi3"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="hanode2" nodeid="2">
                        <fence>
                                <method name="DiskRes">
                                        <device name="scsi3"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices>
                <fencedevice agent="fence_scsi" devices="/dev/sdc" name="scsi3"/>
        </fencedevices>
        <rm>
                <failoverdomains/>
                <resources/>
                <service autostart="0" name="webserver" recovery="relocate">
                        <apache config_file="/etc/httpd/conf/httpd.conf" name="web" server_root="/etc/httpd" sh
utdown_wait="0"/>
                        <ip address="10.1.3.100" monitor_link="1"/>
                </service>
        </rm>
        <logging debug="on"/>
</cluster>



Steps to Reproduce:
1.create ccs entries and form cluster with command-line , add all the relevant subservices as listed above for a simple failover httpd server
2.check the cluster.conf

3.start luci on one of the nodes and login as root, then add the newly created cluster, and check the Services tab, it will be empty, check the Service Groups Tab , it will contain the SG and Services - Services themselves are not listed.
(See screenshots attached)  
Actual results:

Services that are created not showing up in Services Tab, but are OK in Service Group view, luci does not pickup everything as expected by someone logging in the first time.

Expected results:

Services and Service Groups all listed correctly.

Additional info: See Attached screenshots
Comment 1 Christoph Torlinsky 2012-10-10 19:02:52 EDT
Created attachment 625228 [details]
Services Tab Empty but Services exist
Comment 2 Christoph Torlinsky 2012-10-10 19:09:01 EDT
luci.log shows Traces / Callbacks being made

looks like webcluster object not found , but it is there, there is multiple
IP on this host configured for cluster interconnects. 192.168.3.200 is the Web Firefox client Desktop. 


/usr/lib/python2.6/site-packages/sqlalchemy/engine/default.py:230: SAWarning: Unicode type received
 non-unicode bind param value 'ricci'
  param.append(processors[key](compiled_params[key]))
/usr/lib/python2.6/site-packages/sqlalchemy/engine/default.py:230: SAWarning: Unicode type received
 non-unicode bind param value ''
  param.append(processors[key](compiled_params[key]))

00:38:38,678 ERROR [luci.lib.db_helpers] Database object for cluster webcluster not found
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/luci/lib/db_helpers.py", line 37, in get_cluster_db_obj
    db_obj = DBSession.query(Cluster).filter_by(name=unicode(cluster_name)).one()
  File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 1257, in one
    raise orm_exc.NoResultFound("No row was found for one()")
NoResultFound: No row was found for one()
00:38:42,912 ERROR [luci.lib.db_helpers] Database object for cluster webcluster not found
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/luci/lib/db_helpers.py", line 37, in get_cluster_db_obj
    db_obj = DBSession.query(Cluster).filter_by(name=unicode(cluster_name)).one()
  File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 1257, in one
    raise orm_exc.NoResultFound("No row was found for one()")
NoResultFound: No row was found for one()
00:40:46,033 INFO  [paste.httpserver.ThreadPool] kill_hung_threads status: 10 threads (0 working, 1
0 idle, 0 starting) ave time N/A, max time 0.00sec, killed 0 workers
----------------------------------------
Exception happened during processing of request from ('192.168.3.200', 56293)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 1068, in process_request_in_thr
ead
    self.finish_request(request, client_address)
  File "/usr/lib64/python2.6/SocketServer.py", line 322, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib64/python2.6/SocketServer.py", line 617, in __init__
    self.handle()
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 442, in handle
    BaseHTTPRequestHandler.handle(self)
  File "/usr/lib64/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib/python2.6/site-packages/paste/httpserver.py", line 431, in handle_one_request
    self.raw_requestline = self.rfile.readline()
  File "/usr/lib64/python2.6/socket.py", line 450, in readline
    data = self._sock.recv(self._rbufsize)
Error: [('SSL routines', 'SSL23_READ', 'ssl handshake failure')]
----------------------------------------
[root@faust luci]#
Comment 4 Ryan McCabe 2012-10-10 21:25:20 EDT
This is the expected behavior. I think there is some confusion with the terminology. Traditionally, service groups have been referred to as "services" in this cluster stack. Relatively recently, the terminology was changed to "service group" to more closely match the pacemaker terminology. What you're referring to as services (the things that comprise the service groups, i.e. <apache>,<ip>, etc) are called resources throughout the GUI and docs. The resources tab lists only global resources (those resources that are defined outside of particular services in <rm><resources/></rm>) and have no status associated with them -- they're just bits of configuration that can be referenced inside service groups.

For your config, you could have done:

<rm>
  <resources>
    <apache config_file="/etc/httpd/conf/httpd.conf" name="web" server_root="/etc/httpd" shutdown_wait="0"/>
    <ip address="10.1.3.100" monitor_link="1"/>
  </resources>
  <service autostart="0" name="webserver" recovery="relocate">
    <apache ref="web"/>
    <ip ref="10.1.3.100"/> 
  </service>
</rm>

And "web" and "10.1.3.100" would show up in the resources tab.
Comment 5 Christoph Torlinsky 2012-10-11 05:30:58 EDT
Ryan, not sure I agree here. It may not be a bug , but a Useability problem.
I would have expected resources be listed in the Resource tab, as there is no
tab for Global Resources. Incidentally when adding Resources into a Service (Group) - I do see a Global Resource label from the Pull down Menu, furthermore 
I can do something like this :

     <rm>
                <resources>
                        <script file="/etc/init.d/httpd" name="httpd"/>
                </resources>
                <service autostart="0" name="webserver" recovery="relocate">
                        <apache config_file="/etc/httpd/conf/httpd.conf" name="web" server_root="/etc/httpd" sh
utdown_wait="0"/>
                        <ip address="10.1.3.100">
                                <script ref="httpd"/>
                        </ip>
                </service>
        </rm>
        <logging debug="on"/>
</cluster>


Which adds the Global Resource as as Child Resource of a None Global Resource, which just gets a "check mark" in use in the Luci GUI , that does not relate
actually where in use it might be . It's confusing to be honest,
Would we want to fix that up in the GUI a bit and make it consistent to the Admin Guide - emphasize the distinction between Global in use and Service Group specific Resource as does the Admin Guide in the ccs command-line example.
Comment 6 Christoph Torlinsky 2012-10-11 05:51:30 EDT
Let me clarify, i mean it's a useability bug.
Comment 7 Jan Pokorný 2012-12-04 13:02:31 EST
Christoph,

it looks to me that if anything breaks the terminology (although it
is relative in the context of convergence towards pacemaker) it is ccs
with its "--addsubservice".  E.g., in the usage samples, global resource
"web_fs" is defined using "--addresource" only to be referenced in
"--addsubservice ref=web_fs" sample later on.
Comment 8 Jan Pokorný 2012-12-05 10:27:44 EST
> /usr/lib/python2.6/site-packages/sqlalchemy/engine/default.py:230:
> SAWarning: Unicode type received non-unicode bind param value 'ricci'
> param.append(processors[key](compiled_params[key]))
> /usr/lib/python2.6/site-packages/sqlalchemy/engine/default.py:230:
> SAWarning: Unicode type received non-unicode bind param value ''
> param.append(processors[key](compiled_params[key]))

-> [bug 852197]

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