IBM / cloud-pak-deployer

Configuration-based installation of OpenShift and Cloud Pak for Data/Integration/Watson AIOps on various private and public cloud infrastructure providers. Deployment attempts to achieve the end-state defined in the configuration. If something fails along the way, you only need to restart the process to continue the deployment.
https://ibm.github.io/cloud-pak-deployer/
Apache License 2.0
137 stars 67 forks source link

Missing variable private_registry_url #570

Closed techietav closed 11 months ago

techietav commented 11 months ago

Describe the bug Install fails when it tries to connect to a private registry.

TASK [connect-private-image-registry : Try to login to the specified registry at quay.apps.cluster1.hursley.ibm.com] * Sunday 22 October 2023 07:46:42 +0000 (0:00:00.249) 0:01:32.383 ** fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 1\n\nThe error appears to be in '/cloud-pak-deployer/automation-roles/50-install-cloud-pak/connect-private-image-registry/tasks/main.yml': line 46, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Try to login to the specified registry at {{ private_registry_url }}\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}

Looking in the file it could be missing quotes at the skopeo login line.

To Reproduce Run the deployer after specifying a private registry and validating that I can login on the cmdline. registry is defined in the cp4d-473.yaml

global_config: environment_name: fusion env_id: dsic-cluster1 confirm_destroy: False image_registry:

fketelaars commented 11 months ago

Hi @techietav , the vault secret holding the registry credentials must have the format of registry_user:registry_password

The error is probably caused by the credentials not including both user and password.

fketelaars commented 11 months ago

I will make a change to ensure the credentials are validated and a meaningful error is thrown.

techietav commented 11 months ago

Confirmed that I required the user:password in the secret.