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 865174 - luci GUI not synchronized with cluster.conf entries - not showing resources added with ccs
Summary: luci GUI not synchronized with cluster.conf entries - not showing resources a...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: luci
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ryan McCabe
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-10 23:00 UTC by Christoph Torlinsky
Modified: 2013-04-02 23:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-11 01:31:37 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 852197 0 low CLOSED luci + SQLAlchemy vs. non-unicode -> SAWarning: Unicode type received non-unicode bind param value ... in luci.log 2021-02-22 00:41:40 UTC

Internal Links: 852197

Description Christoph Torlinsky 2012-10-10 23:00:32 UTC
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 23:02:52 UTC
Created attachment 625228 [details]
Services Tab Empty but Services exist

Comment 2 Christoph Torlinsky 2012-10-10 23:09:01 UTC
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-11 01:25:20 UTC
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 09:30:58 UTC
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 09:51:30 UTC
Let me clarify, i mean it's a useability bug.

Comment 7 Jan Pokorný [poki] 2012-12-04 18:02:31 UTC
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ý [poki] 2012-12-05 15:27:44 UTC
> /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.