Distributed Cloud – subcloud bootstrap failed due to no attribute 'username'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Tao Liu |
Bug Description
Brief Description
-----------------
Configure docker_registries in a subcloud override file using an aws erc registry for the system images, and add the subcloud via dcmanager subcloud add command. The subcloud bootstrap failed due to no attribute 'username' error.
The aws ecr user credentials are returned from a python script, and the return value is a dictionary which is written to the stdout using print(). The stdout contains a preceding, and trailing blank line when Ansible runs a playbook on a remote host. As such, the return value was not treated as a dictionary and attempts to reference 'username' field in the user credentials dictionary resulted in failure.
The fix is to strip both leading and trailing \r\n from the user credentials output.
Severity
--------
Critical
Steps to Reproduce
------------------
Install and configure a distributed cloud system, and add a subcloud using an aws erc registry.
Expected Behavior
------------------
Subcloud bootstrap was completed successfully.
Actual Behavior
----------------
Subcloud bootstrap failed.
Reproducibility
---------------
100%
System Configuration
-------
AIO-DX system controller
One AIO-SX subcloud
Branch/Pull Time/Commit
-------
BUILD_DATE= 2019-11-06_10-52-51
Last Pass
---------
N/A
Timestamp/Logs
--------------
TASK [common/
fatal: [subcloud1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.
Test Activity
-------------
Developer Testing
Changed in starlingx: | |
assignee: | nobody → Tao Liu (tliu88) |
Fix proposed to branch: master /review. opendev. org/697313
Review: https:/