Fuel openstack-config command list does not show full historical data

Bug #1560007 reported by Alexandr Kostrikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Evgeny Konstantinov
Mitaka
Fix Released
High
Evgeny Konstantinov

Bug Description

Detailed bug description:
As launchpad spec [0] states, openstack-config --list should show historical data, but it show only last active configuration.

But after applying of two configuration `list` shows only one in history.

[root@nailgun ~]# fuel openstack-config --env 1 --node 2 --upload --file /tmp/compute.yaml
Openstack configuration with id 9 has been uploaded from file '/tmp/compute.yaml'
[root@nailgun ~]# vim /tmp/compute.yaml
[root@nailgun ~]# fuel openstack-config --env 1 --node 2 --upload --file /tmp/compute.yaml
Openstack configuration with id 10 has been uploaded from file '/tmp/compute.yaml'
[root@nailgun ~]# fuel openstack-config --env 1 --node 2 --list
id | is_active | config_type | cluster_id | node_id | node_role
---|-----------|-------------|------------|---------|----------
10 | True | node | 1 | 2 | None
[root@nailgun ~]# fuel openstack-config --env 1 --node 2 --list --help
usage: fuel openstack-config [-h] [--env ENV] [--file FILE] [--node NODE]
                             [--role ROLE] [--config-id CONFIG-ID] [--deleted]
                             [--force]
                             (--list | --download | --upload | --delete | --execute)

optional arguments:
  -h, --help show this help message and exit
  --env ENV, --env-id ENV
                        environment id
  --file FILE Openstack configuration file
  --node NODE, --node-id NODE
                        Node ID
  --role ROLE, --role ROLE
                        Node role
  --config-id CONFIG-ID
                        Openstack config ID
  --deleted Get deleted configurations
  --force, -f Force configuration update
  --list, -l List openstack configurations
  --download, -d Download current openstack configuration
  --upload, -u Upload new openstack configuration
  --delete Delete openstack configuration
  --execute Apply openstack configuration

Examples:

 Download an existing configuration to file:
        fuel openstack-config --download --config-id 1 --file config.yaml

 Upload new configuration from file:
        fuel openstack-config --upload --env 1 --file config.yaml
        fuel openstack-config --upload --env 1 --node 1 --file config.yaml
        fuel openstack-config --upload --env 1
            --role controller --file config.yaml

 List all available configurations:
        fuel openstack-config --list --env 1
        fuel openstack-config --list --env 1 --node 1
        fuel openstack-config --list --env 1 --deleted

 Delete an existing configuration:
        fuel openstack-config --delete --config 1

 Deploy configuration:
        fuel openstack-config --execute --env 1
        fuel openstack-config --execute --env 1 --node 1
        fuel openstack-config --execute --env 1 --role controller
        fuel openstack-config --execute --env 1 --force

[root@nailgun ~]#

Expected results:
As spec states, user should see historical data on *any* configuration.
For now it is possible to see only previous without any date/time related information.

Actual result:
Only last applied configuration is shown.

Workaround:
User should use database to get historical information.

tags: added: team-mixed
Changed in fuel:
status: New → Confirmed
milestone: none → 9.0
assignee: Fuel Mixed (fuel-mixed-team) → Fuel Python Team (fuel-python)
Revision history for this message
Bartosz Kupidura (zynzel) wrote :

This is proper behavior.
When you upload new configuration for the same entity (node, role, cluster) - previous active configuration is marked as inactive/deleted. From spec:

"is_active field will be automatically managed by nailgun.
When user upload new data, old data for given entity (ex. node_role=compute)
will be mark as inactive (is_active=False) and new data will be marked as
active (is_active=True)."

List action show active records by default, if you want to show deleted (inactive) records use --deleted:

[root@nailgun log]# fuel openstack-config --list --env 1 --deleted
id | is_active | config_type | cluster_id | node_id | node_role
---|-----------|-------------|------------|---------|----------
1 | False | node | 1 | 1 | None
[root@nailgun log]# fuel openstack-config --list --env 1
id | is_active | config_type | cluster_id | node_id | node_role
---|-----------|-------------|------------|---------|----------
2 | True | node | 1 | 1 | None
[root@nailgun log]#

Changed in fuel:
status: Confirmed → Invalid
Revision history for this message
Alexandr Kostrikov (akostrikov-mirantis) wrote :

We need to update documentation so it is clear to users all options to list.

Changed in fuel:
status: Invalid → New
assignee: Fuel Python Team (fuel-python) → Fuel Documentation Team (fuel-docs)
Changed in fuel:
status: New → Confirmed
Changed in fuel:
assignee: Fuel Documentation Team (fuel-docs) → Evgeny Konstantinov (evkonstantinov)
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

steps to reproduce

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Dmitry Pyzhov (dpyzhov)
tags: added: area-docs
removed: area-python
tags: removed: need-info
Changed in fuel:
milestone: 9.0 → 10.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-docs (master)

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

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

Reviewed: https://review.openstack.org/369349
Committed: https://git.openstack.org/cgit/openstack/fuel-docs/commit/?id=57f868ca45471fe4e1fc3ef822980f30b9f311fd
Submitter: Jenkins
Branch: master

commit 57f868ca45471fe4e1fc3ef822980f30b9f311fd
Author: Evgeny Konstantinov <email address hidden>
Date: Tue Sep 13 14:11:08 2016 +0300

    Add note on the --list parameter

    The openstack-config --list command shows data
    only for the active config as per design

    Change-Id: Ie024271059024c4ddd73cacd710bb64266c0f0d7
    Closes-Bug: #1560007

Changed in fuel:
status: In Progress → Fix Committed
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.