[octane] Key error on parse fuelclient output

Bug #1603951 reported by Arthur Svechnikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Anastasia Balobashina
Mitaka
Fix Released
High
Anastasia Balobashina

Bug Description

Octane raises KeyError on line [0], because of an incorrect output of fuelclient.
It's possible that fuelclient may have different output on different servers:

the first one
 [root@fuel ~]# fuel2 env show 1 -f json -v
 found extension EntryPoint.parse('yaml = clifftablib.formatters:YamlFormatter')
 found extension EntryPoint.parse('json = clifftablib.formatters:JsonFormatter')
 found extension EntryPoint.parse('html = clifftablib.formatters:HtmlFormatter')
 found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
 found extension EntryPoint.parse('json = cliff.formatters.json_format:JSONFormatter')
 found extension EntryPoint.parse('shell = cliff.formatters.shell:ShellFormatter')
 found extension EntryPoint.parse('value = cliff.formatters.value:ValueFormatter')
 found extension EntryPoint.parse('yaml = cliff.formatters.yaml_format:YAMLFormatter')
 Making authentication request to http://10.109.10.2:8000/keystone/v2.0/tokens
 Making authentication request to http://10.109.10.2:8000/keystone/v2.0/tokens
 {
   "status": "operational",
   "is_customized": false,
   "release_id": 2,
   "name": "7env",
   "fuel_version": "7.0",
   "changes": [],
   "id": 1
 }

the second one
 [root@fuel ~]# fuel2 env show 1 -f json -v
 found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
 found extension EntryPoint.parse('json = cliff.formatters.json_format:JSONFormatter')
 found extension EntryPoint.parse('shell = cliff.formatters.shell:ShellFormatter')
 found extension EntryPoint.parse('value = cliff.formatters.value:ValueFormatter')
 found extension EntryPoint.parse('yaml = cliff.formatters.yaml_format:YAMLFormatter')
 found extension EntryPoint.parse('yaml = clifftablib.formatters:YamlFormatter')
 found extension EntryPoint.parse('json = clifftablib.formatters:JsonFormatter')
 found extension EntryPoint.parse('html = clifftablib.formatters:HtmlFormatter')
 Making authentication request to http://10.20.0.2:8000/keystone/v2.0/tokens
 Making authentication request to http://10.20.0.2:8000/keystone/v2.0/tokens
 [{"Field": "id", "Value": 1}, {"Field": "status", "Value": "operational"}, {"Field": "fuel_version", "Value": "8.0"}, {"Field": "name", "Value": "test"}, {"Field": "release_id", "Value": 2}, {"Field": "is_customized", "Value": false}, {"Field": "changes", "Value": []}]

It happens due to extensions arbitrary order.

[0] https://github.com/openstack/fuel-octane/blob/e3e25aa3c9fe508c54dba84111f84189fb6bed8f/octane/util/env.py#L119

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: nobody → Fuel Octane (fuel-octane-team)
Ilya Kharin (akscram)
Changed in fuel:
status: New → Confirmed
milestone: none → 9.1
Ilya Kharin (akscram)
Changed in fuel:
importance: Undecided → High
no longer affects: fuel/newton
Ilya Kharin (akscram)
Changed in fuel:
milestone: 9.1 → 10.0
Changed in fuel:
assignee: Fuel Octane (fuel-octane-team) → Anastasiya (atolochkova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-octane (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-octane (master)

Reviewed: https://review.openstack.org/347822
Committed: https://git.openstack.org/cgit/openstack/fuel-octane/commit/?id=9c44fad4f4037b65d8447c64794ccb625a4e9e80
Submitter: Jenkins
Branch: master

commit 9c44fad4f4037b65d8447c64794ccb625a4e9e80
Author: Anastasiya <email address hidden>
Date: Wed Jul 27 16:05:27 2016 +0300

    Add processing for different output to clone_env function

    because fuelclient may have different output on different servers
    (dictionary or array)

    Change-Id: I662781e324b44094f86c875aaee5474eab8ac53e
    Closes-bug: 1603951

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

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

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

Reviewed: https://review.openstack.org/356018
Committed: https://git.openstack.org/cgit/openstack/fuel-octane/commit/?id=8b652032039dac6e91659cbb84fedaf7446f13c1
Submitter: Jenkins
Branch: stable/mitaka

commit 8b652032039dac6e91659cbb84fedaf7446f13c1
Author: Anastasiya <email address hidden>
Date: Wed Jul 27 16:05:27 2016 +0300

    Add processing for different output to clone_env function

    because fuelclient may have different output on different servers
    (dictionary or array)

    Change-Id: I662781e324b44094f86c875aaee5474eab8ac53e
    Closes-bug: 1603951
    (cherry picked from commit 9c44fad4f4037b65d8447c64794ccb625a4e9e80)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-octane (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-octane (master)

Change abandoned by Yuriy Taraday (<email address hidden>) on branch: master
Review: https://review.openstack.org/357109
Reason: Wrong branch, yeah.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-octane (stable/mitaka)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-octane (stable/mitaka)

Change abandoned by Yuriy Taraday (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/357129
Reason: I'll preserve Change-Id next time.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-octane (stable/mitaka)
Download full text (9.5 KiB)

Reviewed: https://review.openstack.org/357135
Committed: https://git.openstack.org/cgit/openstack/fuel-octane/commit/?id=34753632922d252dd47115cd6ad1460d3f987b11
Submitter: Jenkins
Branch: stable/mitaka

commit 90af105bdb1d292802f840ef68a556b7d0a202d7
Author: Pavel Chechetin <email address hidden>
Date: Wed Aug 17 17:24:56 2016 +0300

    Automated configuration of rsyncd

    Automated configuration (using custom graph feature) is added.
    rsyncd.conf is configurated using Augeas resource in Puppet as
    an elegent solution which doesn't interfere with existing
    configuration by Fuel bootstrap.

    It adds two Rsync section: octane_code, octane_data.

    RPM spec is also updated to incorporate octane_tasks Puppet module
    into Octane package and set Rsync up.

    Untapped controller group is deleted from upgrade-db-orig graph.

    Change-Id: Ia8ea7214b0b93f414d1de9b07a48e1602c0d2ae3

commit 1596f3732de97e239bbb997b07e3171fcd1fb6cb
Author: Nikita Zubkov <email address hidden>
Date: Mon Jul 25 20:00:43 2016 +0300

    Replace SQL SELECTs with API calls

    This allow us not to rely on objects internal database representation

    Change-Id: I10b1704835e4a3742638bc682eae18939ebca38c

commit 9c44fad4f4037b65d8447c64794ccb625a4e9e80
Author: Anastasiya <email address hidden>
Date: Wed Jul 27 16:05:27 2016 +0300

    Add processing for different output to clone_env function

    because fuelclient may have different output on different servers
    (dictionary or array)

    Change-Id: I662781e324b44094f86c875aaee5474eab8ac53e
    Closes-bug: 1603951

commit a8ab40b0f0f22f7419a19f0af3e8167b3da924a2
Author: Ilya Kharin <email address hidden>
Date: Tue Aug 16 11:48:28 2016 +0300

    Use ubuntu_bootstrap for old systems

    The bootstrap profile is no more used on the 9.0 Fuel Master node and
    for Cobbler systems that were created in 7.0 the profile attribute
    should be renamed to the default bootstrap profile

    Change-Id: I562506f2d457ba60df66afb0bc1ecc4bc30fd38d
    Closes-Bug: #1602583

commit e235f4012d51b49efba99a86bda21cd2a0b4560a
Author: Ilya Kharin <email address hidden>
Date: Tue Aug 16 11:35:59 2016 +0300

    Use load_yaml to get the astute content

    Change-Id: Ib2b04ee06b6fbcc72b76f6a759d950f20b5df469

commit 21aeddd74ea4b9f619800e3b6c3e24297bfc9c4f
Author: Roman Sokolkov <email address hidden>
Date: Thu Aug 11 16:22:18 2016 +0300

    Graph-based upgrade approach. Change to upgrade_db.

    Part 2. Change implements upgrade-db with Fuel graphs.

      - Added new function "upgrade_db_with_graph".
      - Added new "deployment" module to utils

    Co-Authored-By: Ilya Kharin <email address hidden>
    Change-Id: I5d3378824be8f41602cb056553e28dfdab3bf28a

commit 7af9395953d5758f52497b4e847171449117d8c9
Author: Andreas Jaeger <email address hidden>
Date: Fri Aug 12 20:53:27 2016 +0200

    Move other-requirements.txt to bindep.txt

    The default filename for documenting binary dependencies has been
    changed from "other-requirements.txt" to "bindep.txt" with the release
    of bindep 2.1.0. While the previous name is still supported, it wi...

Read more...

Revision history for this message
Dmitry Belyaninov (dbelyaninov) wrote :

Verified on snapshots #178 and #183 with different clusters.
Outputs of "fuel2 env show 1 -f json -v" are equal.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-octane ocata-eol

This issue was fixed in the openstack/fuel-octane ocata-eol release.

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.