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

azure: restore disk with zone #1298

Merged
merged 1 commit into from
Apr 25, 2019
Merged

azure: restore disk with zone #1298

merged 1 commit into from
Apr 25, 2019

Conversation

sylr
Copy link
Contributor

@sylr sylr commented Mar 18, 2019

Signed-off-by: Sylvain Rabot sylvain@abstraction.fr

Closes #1159

@skriss
Copy link
Member

skriss commented Mar 19, 2019

thanks @sylr! Any chance you were able to test this on a cluster supporting availability zones?

@sylr
Copy link
Contributor Author

sylr commented Mar 19, 2019

No, I should have created a draft PR. This is not for merge yet unless someone can test it does not break anything/is working.

@skriss
Copy link
Member

skriss commented Mar 19, 2019

OK, no problem. Let us know if you're able to test it. I can help out eventually, just need to find the time to figure out how to spin up such a cluster..

@skriss
Copy link
Member

skriss commented Apr 23, 2019

I was able to get an Azure AZ-based cluster up and running. This code does not work as-is -- it needs to be rebased (the file has been renamed to volume_snapshotter.go), and also the Zones field is existing just 1, 2, etc., whereas the volumeAZ param passed in is e.g. westus2-2. We'll probably need to parse it ourselves -- I think we can just split on -, and if and only if there's a second part, pass it to Zones.

@skriss
Copy link
Member

skriss commented Apr 23, 2019

OK, I did a quick test with modified code that looked like this:

        // TODO add comment
	parts := strings.Split(volumeAZ, "-")
	if len(parts) == 2 {
		disk.Zones = &[]string{parts[1]}
	}

And it worked correctly for both AZ clusters/disks, and non-AZ clusters/disks.

@sylr, if you can update this PR, then we can get it merged and in for v1.0!

@skriss
Copy link
Member

skriss commented Apr 23, 2019

pls also add a changelog file, changelogs/unreleased/1298-sylr

@sylr sylr force-pushed the az-zone branch 2 times, most recently from 9896fdb to 80a30f6 Compare April 25, 2019 08:15
@sylr
Copy link
Contributor Author

sylr commented Apr 25, 2019

@skriss I made it so that it alway take the last item in the array.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
Copy link
Member

@skriss skriss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I was able to successfully test for both AZ disks and non-AZ disks. Thanks @sylr!

@skriss
Copy link
Member

skriss commented Apr 25, 2019

@nrb or @carlisia pls review/merge when ready.

Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@carlisia carlisia merged commit 011db15 into vmware-tanzu:master Apr 25, 2019
jessestuart pushed a commit to jessestuart/velero that referenced this pull request May 28, 2019
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
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.

Azure: Disk with Zone are not restored with Zone
3 participants