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

Unable to use exhibitor #46

Closed
feikesteenbergen opened this issue Mar 7, 2016 · 3 comments
Closed

Unable to use exhibitor #46

feikesteenbergen opened this issue Mar 7, 2016 · 3 comments

Comments

@feikesteenbergen
Copy link
Contributor

When specifying exhibitor as a host, patroni dies:

postgres@786112c34b6e:~$ patroni postgres.yml
Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/patroni/__init__.py", line 71, in main
    patroni = Patroni(config)
  File "/usr/local/lib/python2.7/dist-packages/patroni/__init__.py", line 23, in __init__
    self.dcs = self.get_dcs(self.postgresql.name, config)
  File "/usr/local/lib/python2.7/dist-packages/patroni/__init__.py", line 37, in get_dcs
    return ZooKeeper(name, config['zookeeper'])
  File "/usr/local/lib/python2.7/dist-packages/patroni/zookeeper.py", line 83, in __init__
    self.exhibitor = ExhibitorEnsembleProvider(exhibitor['hosts'], exhibitor['port'], poll_interval=interval)
  File "/usr/local/lib/python2.7/dist-packages/patroni/zookeeper.py", line 32, in __init__
    while not self.poll():
  File "/usr/local/lib/python2.7/dist-packages/patroni/zookeeper.py", line 40, in poll
    json = self._query_exhibitors(self._exhibitors)
  File "/usr/local/lib/python2.7/dist-packages/patroni/zookeeper.py", line 55, in _query_exhibitors
    random.shuffle(exhibitors)
  File "/usr/lib/python2.7/random.py", line 289, in shuffle
    x[i], x[j] = x[j], x[i]
TypeError: 'str' object does not support item assignment

I assume that this is because exhibitor_hosts should be a list.

@a1exsh
Copy link
Member

a1exsh commented Mar 7, 2016

See zalando/patroni#143

@CyberDem0n
Copy link
Contributor

Yes, it expects to get list

EXHIBITOR_HOSTS: '["host1", "host2"]'

@alexeyklyukin
Copy link
Contributor

I think this is already fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants