Filter fuel tasks with non numeric ID shoud return significant error

Bug #1497026 reported by Mh Raies
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Andrey Tykhonov
6.1.x
Won't Fix
Medium
MOS Maintenance

Bug Description

I am trying to filter fuel Tasks.
When I passed task ID as a character then empty dictionary is returned. Its seems misleading.
Please find command below -

[root@fuel www]# fuel task
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
id | status | name | cluster | progress | uuid
---|--------|------------------------------------|---------|----------|-------------------------------------
60 | ready | verify_networks | 6 | 100 | 9bea2319-3c54-4d60-bb98-26eb87fd0cd6
65 | ready | check_networks | 6 | 100 | 375a1470-1140-4b4c-8aac-5906987b140b
69 | ready | deployment | 6 | 100 | 803d73c8-f004-4a25-8b53-99c397434aa6
61 | ready | check_dhcp | 6 | 100 | d5540ddc-d9d5-430e-a34e-118b9094cb23
62 | ready | check_repo_availability | 6 | 100 | 414822b6-841e-4745-891a-d6366c7fdf3c
63 | ready | check_repo_availability_with_setup | 6 | 100 | 50eefec2-a1eb-4487-a67b-6e18a22974e8
68 | ready | provision | 6 | 100 | 7b056cc4-f39e-410d-aa60-ac9c0536e8fc
64 | ready | deploy | 6 | 100 | 61de6f38-b5af-4af8-be7f-e3d9c546f5a4

[root@fuel www]# fuel task --task 60
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
id | status | name | cluster | progress | uuid
---|--------|-----------------|---------|----------|-------------------------------------
60 | ready | verify_networks | 6 | 100 | 9bea2319-3c54-4d60-bb98-26eb87fd0cd6
[root@fuel www]#

[root@fuel www]# fuel task --task z
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
{}

[root@fuel www]# fuel task --delete --task z
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
{}
[root@fuel www]#

For Non numeric task IDs it should return a valid significant error message.

Mh Raies (raiesmh08)
tags: added: python-fuelclient
Revision history for this message
Alexander Gordeev (a-gordeev) wrote :

Looks like nailgun suffers from missing task ID validation.

Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 8.0
tags: added: module-nailgun
tags: added: low-hanging-fruit
tags: removed: python-fuelclient
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Andrey Tykhonov (atykhonov)
Revision history for this message
Andrey Tykhonov (atykhonov) wrote :

This bug is not valid anymore. When nailgun API receives wrong id it returns error: HTTPError: 404 Client Error: Not Found.

Changed in fuel:
status: Confirmed → Invalid
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

Fuel client indeed does not check the type of this argument but it should. However, Nailgun API should also check the type so the bug requires two patches.

Changed in fuel:
status: Invalid → Confirmed
Revision history for this message
Andrey Tykhonov (atykhonov) wrote :

I'm not able to reproduce this bug using the latest Fuel client. Mh Raies, could you please tell which exactly version do you use (fuel --version) ?

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: Confirmed → Incomplete
Revision history for this message
Mh Raies (raiesmh08) wrote :

Hey Andrey,

I was using Fuel #6.1. And on 6.1 this problem seems to be persist.
Please check on MOS#6.1

Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Raies, thank you for your report and I'm sorry. We don't fix medium-priority bugs in previous releases. Issue seems to disappear during 7.0 development timeframe. So in newer versions it will not bother you.

Changed in fuel:
status: Incomplete → Invalid
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
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.