Cudet doesn't filter nodes by role

Bug #1622623 reported by Dmitriy Kruglov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Won't Fix
Medium
Denis Meltsaykin
Mitaka
Confirmed
Medium
Denis Meltsaykin

Bug Description

Detailed bug description:
Cudet tool fails to filter nodes by the given role when applying custom filter (via custom configuration file).

Steps to reproduce:
1 Deploy a 9.1 cluste, e.g. 1 controller + 1 compute + 1 cinder nodes
2 Install Cudet
  yum install -y python-cudet
3 CD to /usr/share/cudet/
4 Update cudet-config.yaml Cudet config file - set a role to filter by in [filters][roles] list type parameter
5 Run the tool specifying config file to use
  cudet -c ./cudet-config.yaml

Expected result: the tool is executed according to filter parameters specified in the config file.
Actual result: command execution returns 'No valid nodes were found which could fit filter parameters.' message.

It looks like the problem is in this method (cudet/nodes.py module):
    def _do_filter(self, nodes_info, attr):
        return [node for node in nodes_info
                if node.get(attr) in self.filters[attr]]

In case of filtering by role the node.get(attr) expression returns a list, e.g. ['cinder'], and filter values are also provided in lists.
So in case of filtering by role there is "['cinder'] in ['cinder']" check for the mentioned case.

Description of the environment:
MOS 9.1, snapshot #251.

Tags: area-python
description: updated
Revision history for this message
Nastya Urlapova (aurlapova) wrote :

@Dima, status was changed to High.

Changed in fuel:
importance: Low → High
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
Dmitry Klenov (dklenov)
tags: added: area-python
Changed in fuel:
status: New → Confirmed
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

The functionality you are referring to is not declared in the design specification: https://review.fuel-infra.org/#/c/25269/3/source/specs/customization-detection-tool.rst and might be, of course broken. I doubt this is a high impact bug, as the workaround is to use a per node filter, which is described in the above spec. Hence, I am lowering the issue to Medium and targeting it to 9.2.

Changed in fuel:
milestone: 9.1 → 9.2
importance: High → Medium
assignee: Fuel Sustaining (fuel-sustaining-team) → Denis Meltsaykin (dmeltsaykin)
Roman Vyalov (r0mikiam)
Changed in fuel:
status: Confirmed → Won't Fix
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.