Fuel openstack-config command list does not show full historical data
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]
optional arguments:
-h, --help show this help message and exit
--env ENV, --env-id ENV
--file FILE Openstack configuration file
--node NODE, --node-id NODE
--role ROLE, --role ROLE
--config-id 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) |
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
assignee: | Fuel Documentation Team (fuel-docs) → Evgeny Konstantinov (evkonstantinov) |
tags: |
added: area-docs removed: area-python |
tags: | removed: need-info |
Changed in fuel: | |
milestone: | 9.0 → 10.0 |
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]#