Change report message for 'fuel2 graph upload" command

Bug #1619586 reported by Dmitry Belyaninov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Vitalii Kulanov
Mitaka
Fix Released
Medium
Vitalii Kulanov
Newton
Fix Committed
Medium
Vitalii Kulanov

Bug Description

Detailed bug description:

During the verification of the https://bugs.launchpad.net/fuel/+bug/1618504
the same reports were printed for different cases.

Current filter for [-d DIR] option is 'tasks.yaml':
https://github.com/openstack/python-fuelclient/blob/master/fuelclient/commands/graph.py#L82

But in case there is no tasks.yaml in selected directory- command output is:

[root@nailgun ~]# ll tmp
total 0
[root@nailgun ~]# fuel2 graph upload -e1 -t gt -d tmp/
Deployment graph was successfully uploaded.

But should be slt: Nothing to upload or Can't find a graph

Steps to reproduce:
^^
Expected results:
^^
Actual result:
^^
Reproducibility:
100%
Workaround:
no info
Impact:
 <put your information here>
Description of the environment:
 Operation system: <put your information here>
 Versions of components: <put your information here>
 Reference architecture: <put your information here>
 Network model: <put your information here>
 Related projects installed: <put your information here>
Additional information:
 <put your information here>

Tags: area-python
Changed in fuel:
assignee: nobody → Vitalii Kulanov (vitaliy-t)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (master)

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

Changed in fuel:
status: New → In Progress
tags: added: area-python
Changed in fuel:
importance: Undecided → Medium
Andrey Maximov (maximov)
Changed in fuel:
milestone: none → 9.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/365305
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=9dfb28e33cfc1e40c5bd00feae0e78888f2957b9
Submitter: Jenkins
Branch: master

commit 9dfb28e33cfc1e40c5bd00feae0e78888f2957b9
Author: tivaliy <email address hidden>
Date: Sun Sep 4 07:30:50 2016 +0300

    Add files verification for 'fuel2 graph upload' command

    Now Nailgun reports about successful upload of deployment graph
    from directory that can even not contain any 'tasks.yaml' files.
    This patch fixes:
      * check if at least one 'tasks.yaml' file exists in specified
        directory path
      * check if at least one 'tasks.yaml' file in specified
        directory path is not empty

    Change-Id: I5de2474b8fbb46780450ee3873af6189a6cf17cc
    Closes-Bug: 1619586

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/375268

tags: removed: on-verification
tags: added: on-verification
Revision history for this message
Andrey Lavrentyev (alavrentyev) wrote :

Block: Waiting for the fix to be placed and merged to mitaka branch

Changed in fuel:
status: Fix Committed → In Progress
tags: removed: on-verification
Revision history for this message
Maksym Strukov (unbelll) wrote :

Need to clarify repro steps. Mentioned command requires a file as an argument instead of dir (Fuel 10 #791)

[root@nailgun ~]# fuel env
id | status | name | release_id
---+--------+-------+-----------
1 | new | dscds | 3
[root@nailgun ~]# ll tmp
total 0
[root@nailgun ~]# fuel2 graph upload -e1 -t gt --dir tmp/
usage: fuel2 graph upload [-h] (-e ENV | -r RELEASE | -p PLUGIN) [-t TYPE] -f
                          FILE
fuel2 graph upload: error: argument -f/--file is required

Revision history for this message
Vitalii Kulanov (vitaliy-t) wrote :

@Maksym not sure about your statement

I just try it on the latest community build.

[root@fuel ~]# fuel2 graph upload
usage: fuel2 graph upload [-h] (-e ENV | -r RELEASE | -p PLUGIN) -t TYPE
                          (-f FILE | -d DIR)
fuel2 graph upload: error: argument -t/--type is required
[root@fuel ~]# shotgun2 short-report
cat /etc/fuel_build_id:
 724
cat /etc/fuel_build_number:
 724
cat /etc/fuel_release:
 10.0
cat /etc/fuel_openstack_version:
 newton-10.0

Also you can check github https://github.com/openstack/python-fuelclient/blob/master/fuelclient/commands/graph.py#L97-L135

As for backporting this bug fix to stable. I think we do it asap after this critical bug fix (https://review.openstack.org/#/c/377971/) will be backported.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (stable/mitaka)

Reviewed: https://review.openstack.org/375268
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=5c1d3a4ba3af3d78f2e7bfdd804da3dec108e755
Submitter: Jenkins
Branch: stable/mitaka

commit 5c1d3a4ba3af3d78f2e7bfdd804da3dec108e755
Author: tivaliy <email address hidden>
Date: Sun Sep 4 07:30:50 2016 +0300

    Add files verification for 'fuel2 graph upload' command

    Now Nailgun reports about successful upload of deployment graph
    from directory that can even not contain any 'tasks.yaml' files.
    This patch fixes:
      * check if at least one 'tasks.yaml' file exists in specified
        directory path
      * check if at least one 'tasks.yaml' file in specified
        directory path is not empty

    Change-Id: I5de2474b8fbb46780450ee3873af6189a6cf17cc
    Closes-Bug: 1619586
    (cherry picked from commit 9dfb28e33cfc1e40c5bd00feae0e78888f2957b9)

tags: added: on-verification
Revision history for this message
Alexandra (aallakhverdieva) wrote :

Verified on 9.2 snapshot #406 (http://paste.openstack.org/show/586412/)

Case1 (empty folder):
[root@nailgun ~]# ll tmp
total 0
[root@nailgun ~]# fuel2 graph upload -e 1 -t graph_type -d tmp
Nothing to upload. Check if at least one 'tasks.yaml' file is not empty and exists in 'tmp' directory path

Case2 (empty task.yaml):
[root@nailgun ~]# more /tmp/tasks.yaml
[root@nailgun ~]# fuel2 graph upload -e 1 -t graph_type -d tmp
Nothing to upload. Check if at least one 'tasks.yaml' file is not empty and exists in 'tmp' directory path

Case3 (correct tasks.yaml)
[root@nailgun ~]# ll tmp/
total 164
-rw-r--r--. 1 root root 167138 Oct 19 13:40 tasks.yaml
[root@nailgun ~]# fuel2 graph upload -e 2 -t graph_type -d tmp
Deployment graph was successfully uploaded.

tags: removed: on-verification
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.