Skip to content
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

同一网域下配置多个网关,在登录时选择的网关的问题 #2658

Open
leeloveying opened this issue May 5, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@leeloveying
Copy link

commented May 5, 2019

[简述你的问题]
最近在同一网域下配置了多个网关(目的是高可用),在实际使用过程中发现当其中一个网关连接异常而另外一个网关正常的时候,并不能正常连接到主机,经过查看代码发现是随机选取的
def random_ssh_gateway(self):
return random.choice([g for g in self.gateways if g.protocol == 'ssh'])

期望:修改为遍历选取,当一个不可用时选择另外一个,当所有不可用时,返回报错信息,提示用户所有网关不可用

使用版本

Version 1.4.9-2

[注:] 完成后请关闭 issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.