Closed Woljtek closed 1 year ago
IVV_CCB_2023_w08 : Moved into "Accepted CS" for further analysis, Priority major
Here the script to check the requirements: https://app.zenhub.com/files/398313496/52a8c1de-726d-435a-aaba-bddd4a0a2893/download
CS_CCB_2023_w08 : Moved into "Product Backlog", high priority
I couldn't reproduce the issue with the version you used. But the error message seems to says there is a problem with the word "vault" inside your configuration maybe this part has a typo like an invisible character, you can check it using the following command:
cat -A inventory/sample/host_vars/setup/main.yaml
You could also launch the playbook with a high verbosity :
ansible-playbook generate_inventory.yaml -i inventory/mycluster/hosts.yaml -vvv
The cat -A
command shows unexpected characters that yamllint accepts.
I dont have any idea to prevent End User to this kind of error.
The first error hidden this one:
TASK [Get inventory_vars content] *********************************************************************************************************************************************************************************
task path: /home/coprs/Documents/2-OPS/rs-config/infrastructure/generate_inventory.yaml:18
Loading collection community.hashi_vault from /home/coprs/.local/lib/python3.8/site-packages/ansible_collections/community/hashi_vault
fatal: [setup]: FAILED! => {
"msg": "An unhandled exception occurred while running the lookup plugin 'community.hashi_vault.hashi_vault'. Error was a <class 'requests.exceptions.InvalidHeader'>, original message: Header part ('XXX') from {'X-Vault-Token': 'XXXX'} must be of type str or bytes, not <class 'ansible.parsing.yaml.objects.AnsibleUnicode'>"
}
PLAY RECAP ********************************************************************************************************************************************************************************************************
setup : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Do have any idea of the root cause?
I can't seem to find an explanation for this issue. Did you try to execute the playbook with -vvv ? Maybe there will be more information
You could also try to add the following block before the task "Get inventory_vars content" in generated_inventory.yaml and check if the token is written as expected
- name: debug
ansible.builtin.debug:
msg: Token = {{ vault.token }}
CS_CCB_2023_w10 : Action @Woljtek : test what is suggested by @eroan-marie
I made the test. It gives a new error:
TASK [Get inventory_vars content] *********************************************************************************************************************************************************************************
fatal: [setup]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'community.hashi_vault.hashi_vault'. Error was a <class 'requests.exceptions.InvalidHeader'>, original message: Header part ('myToken') from {'X-Vault-Token': 'myToken'} must be of type str or bytes, not <class 'ansible.parsing.yaml.objects.AnsibleUnicode'>"}
@Woljtek is it working now or are you still getting errors ?
@Woljtek , please propose a conclusion for that ticket ?
I miss the question of @nleconte-csgroup .
No; it doesn't, the issue is still here.
I found an acceptable WA.
I propose to decrease the priority to minor and handle this point after the V2 delivery. @pcuq-ads Do you agree ?
RSRRv2_SystemCCB : need some "how to" documentation to explain how to avoid this issue during deployment.
RSRRv2_CS-FR_CCB : Looks like the issue is caused by the user's mishandling here. However, it will be documented in infrastructure version 1.6.0
Delivered in infrastructure 1.6.0-rc1 (https://github.com/COPRS/infrastructure/releases)
SYS_CCB_w29 : The documentation has been updated on release 1.6.0-rc1.
Environment: Platform: OPS Orange Cloud Configuration: OPS Bastion: Ubuntu 20.04.5 LTS (Focal Fossa) RS config : ops v1.4
Traçability: Deployment
Current Behavior: I deployed a new bastion from a Ubuntu OS. I follow the deployment quickstart procedure from the infrastructure repository including in RS-config. At step 5, at got the following error:
Expected Behavior: The file
hosts.yaml
shall be generated or updated.Steps To Reproduce: Follow the deployment quickstart procedure. The error comes at step 5: Generate or download the inventory variables
Test execution artefacts (i.e. logs, screenshots…) Format of inventory/sample/host_vars/setup/main.yaml file used for deployment:
Check of prerequisites:
Bug Generic Definition of Ready (DoR)
Bug Generic Definition of Done (DoD)