Backport fix for LP 1533792 to 1.25 branch #4109

Merged
merged 1 commit into from Jan 14, 2016

Conversation

Projects
None yet
2 participants
Contributor

davecheney commented Jan 14, 2016

Fixes LP 1533792

gccgo-4.9 as shipped in Trusty has a number of issues when interfaces
and reflection are combined. In an ideal world these bugs would not
happen, but they do, so the most expedient course of action is to
work around them in our code.

This change replaces the reflection driven construction of a state.SubnetInfo
structure with a more straight forward method which permutes the string
fields known to the structure today. This isn't as future proof as the
previous method, but avoiding the faustian combinaton of interfaces and
reflection should make this code more reliable on buggy compilers.

(Review request: http://reviews.vapour.ws/r/3531/)

Rewrite AddSubnetsWithTemplate to work around gccgo bug
Fixes LP 1533792

gccgo-4.9 as shipped in Trusty has a number of issues when interfaces
and reflection are combined. In an ideal world these bugs would not
happen, but they do, so the most expedient course of action is to
work around them in our code.

This change replaces the reflection driven construction of a state.SubnetInfo
structure with a more straight forward method which permutes the string
fields known to the structure today. This isn't as future proof as the
previous method, but avoiding the faustian combinaton of interfaces and
reflection should make this code more reliable on buggy compilers.
Contributor

davecheney commented Jan 14, 2016

$$JDFI$$

Contributor

jujubot commented Jan 14, 2016

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

Contributor

jujubot commented Jan 14, 2016

Build failed: Does not match ['fixes-1533849', 'fixes-1533751']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5948

Contributor

davecheney commented Jan 14, 2016

$$JFDI$$

Contributor

jujubot commented Jan 14, 2016

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

Contributor

jujubot commented Jan 14, 2016

Build failed: Does not match ['fixes-1533849', 'fixes-1533751']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5949

Contributor

davecheney commented Jan 14, 2016

$$fixes-1533849$$

Contributor

jujubot commented Jan 14, 2016

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

jujubot added a commit that referenced this pull request Jan 14, 2016

Merge pull request #4109 from davecheney/backport-1533792-1.25
Backport fix for LP 1533792 to 1.25 branch

Fixes LP 1533792

gccgo-4.9 as shipped in Trusty has a number of issues when interfaces
and reflection are combined. In an ideal world these bugs would not
happen, but they do, so the most expedient course of action is to
work around them in our code.

This change replaces the reflection driven construction of a state.SubnetInfo
structure with a more straight forward method which permutes the string
fields known to the structure today. This isn't as future proof as the
previous method, but avoiding the faustian combinaton of interfaces and
reflection should make this code more reliable on buggy compilers.

(Review request: http://reviews.vapour.ws/r/3531/)

@jujubot jujubot merged commit 0377d2a into juju:1.25 Jan 14, 2016

@davecheney davecheney deleted the davecheney:backport-1533792-1.25 branch Jan 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment