[Sahara] Filter (on strings?) not working at least for Node Group and Cluster Template pages

Bug #1503235 reported by Luigi Toscano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Chad Roberts

Bug Description

When I try to filter by Name, Plugin or Description in Node Groups Template and Cluster Template pages, no results are returned.
Filtering by Version works (but only exact match).

I did not test the filters for "Job templates", "Cluster" and "Jobs" yet.

Tested on RDO Liberty snapshot:
python-django-horizon-8.0.0.0b4-dev181.el7.centos.noarch
and most likely seen also on Kilo.

Revision history for this message
Trevor McKay (tmckay) wrote :

Thanks tosky

Using the stable/liberty branch from git, I find the following:

Node group templates:

1) filter by name works with an exact match
2) filter by plugin in horizon gives an error message "Unable to fetch node group template list" (will follow up with logs and/or stack trace)
3) filter by version works with exact match
4) On the stable/liberty branch there is no filter by description for node groups

Cluster templates:
1) filter by name works with an exact match
2) filter by plugin in horizon gives an error message "Unable to fetch node group template list" (will follow up with logs and/or stack trace)
3) filter by version works with exact match
4) filter by description works with exact match

So, in summary, for ng/cluster templates I find that filter by plugin breaks, but the others work with an exact match (lack of globbing is a known issue that we hope to address in Mitaka)

Job templates:
1) filter by name works with exact match
2) filter by type works with exact match
3) filter by description works with exact match

Clusters:
1) filter by name works with exact match
2) filter by status works with exact match

Jobs:
1) filter by id works with exact match
2) filter by job template (job) works with exact match
3) filter by cluster works with exact match
4) filter by status works with exact match

Revision history for this message
Trevor McKay (tmckay) wrote :

Plugin search breaks because the field in the db is "plugin_name", not plugin.

We will debate whether this is something to patch in Sahara, or in Horizon

2015-10-06 15:22:12.025 20175 ERROR sahara.utils.api [req-9af7d84b-2945-4d60-b2be-86abb5f23356 ] Traceback (most recent call last):
  File "/home/fedora/sahara/sahara/utils/api.py", line 97, in handler
    return func(**kwargs)
  File "/home/fedora/sahara/sahara/api/acl.py", line 44, in handler
    return func(*args, **kwargs)
  File "/home/fedora/sahara/sahara/api/v10.py", line 148, in node_group_templates_list
    **u.get_request_args().to_dict())])
  File "/home/fedora/sahara/sahara/service/api.py", line 201, in get_node_group_templates
    return conductor.node_group_template_get_all(context.ctx(), **kwargs)
  File "/home/fedora/sahara/sahara/conductor/resource.py", line 42, in handle
    ret = func(*args, **kwargs)
  File "/home/fedora/sahara/sahara/conductor/api.py", line 220, in node_group_template_get_all
    return self._manager.node_group_template_get_all(context, **kwargs)
  File "/home/fedora/sahara/sahara/conductor/manager.py", line 312, in node_group_template_get_all
    return self.db.node_group_template_get_all(context, **kwargs)
  File "/home/fedora/sahara/sahara/db/api.py", line 95, in decorator
    res = func(*args, **kwargs)
  File "/home/fedora/sahara/sahara/db/api.py", line 246, in node_group_template_get_all
    return IMPL.node_group_template_get_all(context, **kwargs)
  File "/home/fedora/sahara/sahara/db/sqlalchemy/api.py", line 532, in node_group_template_get_all
    return query.filter_by(**kwargs).all()
  File "/home/fedora/sahara/.tox/venv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 1334, in filter_by
    for key, value in kwargs.items()]
  File "/home/fedora/sahara/.tox/venv/lib/python2.7/site-packages/sqlalchemy/orm/base.py", line 383, in _entity_descriptor
    (description, key)
InvalidRequestError: Entity '<class 'sahara.db.sqlalchemy.models.NodeGroupTemplate'>' has no property 'plugin'

Chad Roberts (croberts)
Changed in horizon:
assignee: nobody → Chad Roberts (croberts)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/231551

Changed in horizon:
status: New → In Progress
Revision history for this message
Chad Roberts (croberts) wrote :

The problem of using the wrong field name, "plugin" instead of "plugin_name" is indeed a horizon bug. The remainder of the bug is actually going to be fixed in the Sahara service. A new bug will be created there to address that part of this bug.

Revision history for this message
Chad Roberts (croberts) wrote :

Here is the bug that was split out for fixing in Sahara: https://bugs.launchpad.net/sahara/+bug/1503345

David Lyle (david-lyle)
Changed in horizon:
milestone: none → mitaka-1
tags: added: liberty-rc2-potential
tags: added: liberty-backport-potential
removed: liberty-rc2-potential
Changed in horizon:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/231551
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6463f35bf65c2e98f26ffa39c1723bdc7b6a52a0
Submitter: Jenkins
Branch: master

commit 6463f35bf65c2e98f26ffa39c1723bdc7b6a52a0
Author: Chad Roberts <email address hidden>
Date: Tue Oct 6 11:42:57 2015 -0400

    Fixing template filtering by plugin name

    Filtering the node group templates and cluster templates
    tables by plugin was failing because it was using the
    incorrect field name. It has now been updated to search
    against "plugin_name", which is correct.

    Change-Id: I41760fa9cfa714cf1c9ae90229cb48ff759289fc
    Closes-Bug: #1503235

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0b1

This issue was fixed in the openstack/horizon 9.0.0.0b1 development milestone.

Changed in horizon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.