You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "Joshua Cohen (JIRA)" <ji...@apache.org> on 2016/09/20 16:33:20 UTC
[jira] [Updated] (AURORA-1777) aurora_admin client unable to drain
hosts
[ https://issues.apache.org/jira/browse/AURORA-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joshua Cohen updated AURORA-1777:
---------------------------------
Sprint: Twitter Aurora Q2'16 Sprint 21
> aurora_admin client unable to drain hosts
> -----------------------------------------
>
> Key: AURORA-1777
> URL: https://issues.apache.org/jira/browse/AURORA-1777
> Project: Aurora
> Issue Type: Bug
> Reporter: Zameer Manji
> Assignee: Joshua Cohen
>
> Running the following command:
> {noformat}
> aurora-admin host_drain --hosts=<some-host> <some-cluster>
> {noformat}
> Results in the following error message:
> {noformat}
> WARN] Connection error with scheduler: Unknown error talking to http://<snip>/api: Header value False must be of type str or bytes, not <type 'bool'>, reconnecting...
> {noformat}
> Diving deeper shows that we are setting the value of 'User-Agent' in the transport to 'False'.
> The root cause of this can be found in {{host_maintenance.py}} where we create the client like so:
> {noformat}
> def __init__(self, cluster, verbosity, wait_event=None):
> self._client = AuroraClientAPI(cluster, verbosity == 'verbose')
> self._wait_event = wait_event or Event()
> {noformat}
> However the constructor for {{AuroraClientAPI}} is:
> {noformat}
> def __init__(
> self,
> cluster,
> user_agent,
> verbose=False,
> bypass_leader_redirect=False):
> if not isinstance(cluster, Cluster):
> raise TypeError('AuroraClientAPI expects instance of Cluster for "cluster", got %s' %
> type(cluster))
> self._scheduler_proxy = SchedulerProxy(
> cluster,
> verbose=verbose,
> user_agent=user_agent,
> bypass_leader_redirect=bypass_leader_redirect)
> self._cluster = cluster
> {noformat}
> Notice the second argument is {{user_agent}}.
> This bug started to become a problem because we upgraded requests and it includes https://github.com/kennethreitz/requests/commit/be31a90906deb5553c2e703fb05cf6964ee23ed5.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)