Skip to content

feat: add retry for getting compute name from az metadata #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kristina-solovyova
Copy link
Contributor

@kristina-solovyova kristina-solovyova commented Jul 5, 2024

Resolves issue: https://wekaio.atlassian.net/browse/CLOUD-1959

Root cause:

++ curl -s -H Metadata:true --noproxy '*' 'http://169.254.169.254/metadata/instance?api-version=2021-02-01'
++ jq .compute.name
+ compute_name=
++ echo ''
++ cut -c2-
++ rev
++ cut -c2-
++ rev
+ compute_name=
+ retry=0
+ curl 'https://irudp1-irudp1-function-app.azurewebsites.net/api/deploy?code=XXX-BQ==' --fail -H Content-Type:application/json -d '{"name": ":irudp1-irudp1-backend000004"}'

And from the host via ssh:

curl -s -H Metadata:true --noproxy '*' 'http://169.254.169.254/metadata/instance?api-version=2021-02-01' | jq .compute.name
"irudp1-irudp1-vmss_4"

@kristina-solovyova kristina-solovyova merged commit 03ff51e into dev Jul 5, 2024
5 checks passed
@kristina-solovyova kristina-solovyova deleted the add-retry-for-getting-compute-name-from-metadata branch July 5, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants