Subcloud error_description field being included in the output of backup create and restore commands
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Gustavo Herzmann |
Bug Description
Brief Description
-----------------
The error_description field is currently being returned by the subcloud-backup create and subcloud-backup restore command (which differs from the output generated by the 'subcloud show' command). This makes the output hard to read because the error message can have up to 2048 characters and it displays the error description from the last executed command, which might confuse the user. The user should instead use the 'dcmanager subcloud errors <subcloud>' to view the error description.
Severity
--------
Minor: System/Feature is usable with minor issue
Steps to Reproduce
------------------
Create a subcloud backup with the following command and notice the error_description field in the returned output.
dcmanager subcloud-backup create --subcloud subcloud1
Try to restore the backup with the following command and notice the error_description field in the returned output.
dcmanager subcloud-backup restore --with-install --registry-images --restore-values restore_values.yml --subcloud subcloud1
Expected Behavior
------------------
The output returned from the backup create and restore commands should not contain the error_description field.
Actual Behavior
----------------
The output returned from the backup commands contains the error_description field.
Reproducibility
---------------
100% reproducible
System Configuration
-------
Distributed cloud system
Branch/Pull Time/Commit
-------
2022-11-09 master
Last Pass
---------
NA.
Timestamp/Logs
--------------
Example of the output when there was an install failure before executing the command:
[sysadmin@
Enter the sysadmin password for the subcloud:
Re-enter sysadmin password to confirm:
+------
| Field | Value |
+------
| id | 9 |
| name | subcloud6 |
| description | None |
| location | None |
| software_version | 22.12 |
| management | unmanaged |
| availability | offline |
| deploy_status | install-failed |
| error_description | FAILED installing playbook of (subcloud6). |
| | detail: fatal: [subcloud6]: FAILED! => changed=true |
| | cmd: |
| | msg: non-zero return code |
| | stderr: |- |
| | stderr_lines: <omitted> |
| | skipping: [localhost] => (item={"changed": False, "stat": {"exists": False}, "invocation": {"module_args": {"path": "/root/
| | skipping: [localhost] => (item={"changed": False, "stat": {"exists": False}, "invocation": {"module_args": {"path": "/root/
| | skipping: [localhost] => (item={"changed": False, "stat": {"exists": False}, "invocation": {"module_args": {"path": "/root/site.yml", "follow": False, "get_md5": False, "get_checksum": True, "get_mime": True, "get_attributes": True, "checksum_
| | skipping: [localhost] => (item={"changed": False, "stat": {"exists": False}, "invocation": {"module_args": {"path": "/root/
| | TASK [common/prepare-env : Fail if host is unreachable] *******
| | FAILED TASK: TASK [Waiting 3600 seconds for port 22 become open on 2620:10a:
| management_subnet | fd01:15::0/64 |
| management_start_ip | fd01:15::2 |
| management_end_ip | fd01:15::11 |
| management_
| systemcontrolle
| group_id | 1 |
| created_at | 2022-11-10 23:34:35.659963 |
| updated_at | 2022-11-14 03:21:41.462675 |
| backup_status | complete |
| backup_datetime | 2022-11-11 01:23:29.371694 |
+------
Test Activity
-------------
Developer Testing
Workaround
----------
NA.
Changed in starlingx: | |
status: | New → In Progress |
assignee: | nobody → Gustavo Herzmann (gherzman) |
description: | updated |
Changed in starlingx: | |
importance: | Undecided → Low |
tags: | added: stx.8.0 stx.distcloud |
Fix proposed to branch: master /review. opendev. org/c/starlingx /distcloud- client/ +/865019
Review: https:/