Skip to content
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

Fix Vscale hostedzone #1925

Merged
merged 1 commit into from Nov 3, 2019
Merged

Fix Vscale hostedzone #1925

merged 1 commit into from Nov 3, 2019

Conversation

kuk
Copy link
Contributor

@kuk kuk commented Nov 16, 2018

In case of >1 domains "{.*\"name\":\s*\"$h\".*}")" matches {id: 1, name: a}, {id: 2, name: $h} that leads to wrong id (we look for id=2, but match id=1)

{[^{]*\"name\":\s*\"$h\"[^}]*} matches just {id: 2, name: $h}

@kuk
Copy link
Contributor Author

kuk commented Nov 1, 2019

@Neilpang could you please take a look at this PR. Currently Vscale DNS integration is broken, this PR fixes it

@Neilpang
Copy link
Member

Neilpang commented Nov 1, 2019

there can be more graceful fixes, for example:

echo  '{id: 1, name: a}, {id: 2, name: $h}' | tr "{" "\n" | grep "\"name\":\s*\"$h\".*}"

Split the text into multiple lines before greping them.

Because grep "[^{]" is not always safe on all the platforms.

@kuk
Copy link
Contributor Author

kuk commented Nov 3, 2019

Thank you, changed the code

@Neilpang Neilpang merged commit 6140a3c into acmesh-official:dev Nov 3, 2019
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.

None yet

2 participants