Ignore proxy for charm peer communication
Designate-bind services use http communication to manage initial zone transfers from the leader to other units. This should be done within the space designated for dns-backend in the charm bindings. To ensure this, we must bypass proxy configurations when using wget between units by adding --no-proxy flag to the wget command. Change-Id: I3cebb1e01ffde9a9585f152451bf9bcebbdd3f58 Closes-Bug: #1796969
This commit is contained in:
parent
011952f510
commit
04dc8c02ed
|
@ -418,7 +418,9 @@ class DesignateBindCharm(openstack_charm.OpenStackCharm):
|
|||
:returns: None
|
||||
"""
|
||||
print("{} {}".format(url, target_dir))
|
||||
cmd = ['wget', url, '--retry-connrefused', '-t', '10']
|
||||
# set arg no-proxy as this should be a direct connection on
|
||||
# dns-backend space lp#1796969
|
||||
cmd = ['wget', url, '--no-proxy', '--retry-connrefused', '-t', '10']
|
||||
subprocess.check_call(cmd, cwd=target_dir)
|
||||
|
||||
def retrieve_zones(self, cluster_relation=None):
|
||||
|
|
|
@ -367,8 +367,8 @@ class TestDesignateBindCharm(Helper):
|
|||
a = designate_bind.DesignateBindCharm()
|
||||
a.wget_file('http://ip1/tarfile.tar', '/tmp')
|
||||
self.check_call.assert_called_once_with(
|
||||
['wget', 'http://ip1/tarfile.tar', '--retry-connrefused', '-t',
|
||||
'10'],
|
||||
['wget', 'http://ip1/tarfile.tar', '--no-proxy',
|
||||
'--retry-connrefused', '-t', '10'],
|
||||
cwd='/tmp'
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue