Cudet doesn't filter nodes by role
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.
description: | updated |
tags: | added: area-python |
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
status: | Confirmed → Won't Fix |
@Dima, status was changed to High.