Changed how AZs are determined in vsphere. #6738

Merged
merged 1 commit into from Dec 21, 2016

Conversation

Projects
None yet
4 participants
Contributor

perrito666 commented Dec 20, 2016

Changed how Availability Zones are found for vsphere, what we model as zones can either be clusters or hosts on vsphere and the method of determining which are available, that seemed cargo culted from gce provider, was not appliable to the current provider.

This should fix:
https://bugs.launchpad.net/juju/+bug/1649690
https://bugs.launchpad.net/juju/+bug/1650422

QA

  • To reproduce bootstrap a vsphere machine using --to zone=something and then without deleting bootstrap another without placement, all should work.

I don't know anything about vSphere but this looks great to me!

provider/vsphere/environ_availzones.go
+ }
+ logger.Infof("found %d zones: %v", len(zoneInstances), zoneInstances)
+ } else {
+ zoneInstances, err := AllAvailabilityZones(env)
@babbageclunk

babbageclunk Dec 21, 2016

Member

It looks like this function returns Zones rather than ZoneInstances - it'd be clearer to name the variable zones. (I was going to suggest that you move the name-collection outside the loop until I realised they were different types.)

provider/vsphere/environ_availzones.go
+ for _, z := range zoneInstances {
+ zoneNames = append(zoneNames, z.Name())
+ }
+ logger.Infof("found %d zones: %v", len(zoneInstances), zoneInstances)
@jameinel

jameinel Dec 21, 2016

Owner

why print 'zoneInstances' rather than 'zoneNames' here? Given 'zoneNames' is the thing we consider important enough to return. Is there something more interesting in the instance itself?

Contributor

perrito666 commented Dec 21, 2016

$$merge$$

Contributor

jujubot commented Dec 21, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Dec 21, 2016

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/9921

Contributor

perrito666 commented Dec 21, 2016

$$merge$$

Contributor

jujubot commented Dec 21, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 84452da into juju:develop Dec 21, 2016

1 check failed

github-check-merge-juju Built PR, ran unit tests, and tested LXD deploy. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment