opendevstack / ods-project-quickstarters

CAUTION! This repo is DEPRECATED. For ODS 2+, please see ods-quickstarters repository.
Apache License 2.0
10 stars 19 forks source link

import_ocp_project_metadata.sh fails with repeated keys in ocp_project_config_source #4

Closed clemensutschig closed 6 years ago

clemensutschig commented 6 years ago

when the same keys exist multiple times in ocp_project_config_source - import fails and constructs the wrong URL to source environment information from.

Steps to reproduce - change ocp_project_config_source and duplicate

# KEY for searching
oc_env=https://192.168.99.100:8443
oc_env=https://openshift.default.svc.cluster.local

which are used to identify the correct source configuration thru

# find the right configuration based on the API host source config
if [[ -f "ocp_config" ]]; then
    sourceHost=$(grep export ocp_config | cut -d '=' -f2)
    sourceconfig=$(grep -H $sourceHost $scriptdir/migration_config/ocp_project_config_source | cut -d ':' -f1)
clemensutschig commented 6 years ago

@stitakis - hit this after migrating to opendevstack - with automated environment provisioning - fix verified at BI X