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 legacy proxy setting handling #8949
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
!!build!! |
There is something wrong with DNS resolution of the build environment.
|
!!build!! |
I don't have any access to the CI environment to debug the above and not sure my build requests will be authorized to see if this is an intermittent issue. My local snap builds were successful though and I was able to bootstrap a controller and test this functionality. |
!!build!! |
Pull-request updated, HEAD is now 1347544 |
!!build!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this?
Something like:
func (s *ProxyUpdaterSuite) TestProxyConfigJujuProxy(c *gc.C) {
s.state.SetModelConfig(coretesting.Attrs{
"juju-http-proxy": "http proxy",
"juju-https-proxy": "https proxy",
"apt-http-proxy": "apt http proxy",
"apt-https-proxy": "apt https proxy",
})
cfg := s.facade.ProxyConfig(s.oneEntity())
s.state.Stub.CheckCallNames(c,
"ModelConfig",
"APIHostPortsForAgents",
)
noProxy := "0.1.2.3,0.1.2.4,0.1.2.5"
r := params.ProxyConfigResult{
JujuProxySettings: params.ProxyConfig{
HTTP: "http proxy", HTTPS: "https proxy", FTP: "", NoProxy: noProxy},
APTProxySettings: params.ProxyConfig{
HTTP: "http://apt http proxy", HTTPS: "https://apt https proxy", FTP: "", NoProxy: ""},
}
c.Assert(cfg.Results[0], jc.DeepEquals, r)
}
Fails before, passes after.
@manadart |
Pull-request updated, HEAD is now 737de74 |
Auto-population of no-proxy with controller ip addresses caused proxyupdater to use legacy proxy settings instead of new juju-* proxy settings. This change modifies this logic to first check if new juju proxy settings are present and auto-populate them with controller IPs, otherwise legacy proxy settings are auto-populated. Logging is also improved to be more explicit about the type of settings applied.
Pull-request updated, HEAD is now 4f8fb48 |
Modified one test and added another one. Am I right to assume that I can use your CI for test runs or is there any documented process to run tests in a private lab (at least on a high-level)? Is running !!build!! only available for core Juju devs? |
!!build!! |
|
#8967 ## Please provide the following details to expedite Pull Request review: ---- ## Description of change A cherry-pick of a commit to fix https://bugs.launchpad.net/juju/+bug/1782236 ## QA steps #8949 ## Documentation changes No changes ## Bug reference https://bugs.launchpad.net/juju/+bug/1782236
Please provide the following details to expedite Pull Request review:
Description of change
Auto-population of no-proxy with controller ip addresses caused
proxyupdater to use legacy proxy settings instead of new juju-* proxy
settings.
This change modifies this logic to first check if new juju proxy
settings are present and auto-populate them with controller IPs,
otherwise legacy proxy settings are auto-populated.
Logging is also improved to be more explicit about the type of settings
applied.
QA steps
Documentation changes
No changes to CLI or API - this is fix to make this functionality work as documented.
Bug reference
https://bugs.launchpad.net/juju/+bug/1782236