Skip to content

Bug: Azure E2E using -rg resource group #658

@kaovilai

Description

@kaovilai

Contact Details

No response

Describe bug

If content of

AZURE_RESOURCE_FILE ?= /var/run/secrets/ci.openshift.io/multi-stage/metadata.json

is believed to be
```
sh-4.4$ cat metadata.json
{"clusterName":"ci-op-w718n0np-32d40","clusterID":"6de2d426-68af-43d3-9d1a-d72666edc550","infraID":"ci-op-w718n0np-32d40-4fdtv","azure":{"cloudName":"AzurePublicCloud","region":"eastus","resourceGroupName":""}}
```

then
CI_AZURE_RESOURCE_GROUP=$(cat $AZURE_RESOURCE_FILE | awk '/infraID/ { gsub(/["]|,.*/,""); print $2}')

is not getting infraID correctly.
The output of

echo '{"clusterName":"ci-op-w718n0np-32d40","clusterID":"6de2d426-68af-43d3-9d1a-d72666edc550","infraID":"ci-op-w718n0np-32d40-4fdtv","azure":{"cloudName":"AzurePublicCloud","region":"eastus","resourceGroupName":""}}' | awk '/infraID/ { gsub(/["]|,.*/,""); print $2}'

is in fact

#empty

What happened?

Resource group -rg was (occasionally?) used

CI_AZURE_RESOURCE_GROUP="${CI_AZURE_RESOURCE_GROUP}-rg"; \

and causes Azure CI run to fail

time="2022-04-30T03:54:36Z" level=error msg="Error backing up item" backup=openshift-adp/mysql-e2e-0cd8e63e-c839-11ec-88cf-0a580a81136e error="error getting volume info: rpc error: code = Unknown desc = compute.DisksClient#Get: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code=\"ResourceGroupNotFound\" Message=\"Resource group '-rg' could not be found.\"" logSource="pkg/backup/backup.go:417" name=mysql-6bb6964964-kbwxj

#654 (comment)

OADP Version

Unreleased (built from source)

OpenShift Version

No response

Velero pod logs

No response

Restic pod logs

No response

Operator pod logs

No response

New issue

  • This issue is new

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions