Skip to content

Conversation

@arm4b
Copy link
Member

@arm4b arm4b commented Apr 8, 2019

Closes #58

See StackStorm/st2#4608 for more context.
st2 since v3.0 will require newer version of etcd which supports groups/memberships
See: https://docs.openstack.org/tooz/latest/reference/index.html#tooz.drivers.etcd3gw.Etcd3Driver

@arm4b arm4b added enhancement New feature or request Helm WIP labels Apr 8, 2019
[auth]
api_url = http://{{ .Release.Name }}-st2api{{ template "enterpriseSuffix" . }}:9101/
[coordination]
# TODO: Use 'etcd3+http' driver for tooz, per https://github.com/StackStorm/st2/pull/4608
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to switch to new driver, got:

$ kubectl logs sappy-seal-st2api-6566877d48-w2ft4
2019-04-08 19:59:43,772 DEBUG [-] Using Python: 2.7.12 (/opt/stackstorm/st2/bin/python)
2019-04-08 19:59:43,773 DEBUG [-] Using config files: /etc/st2/st2.conf,/etc/st2/st2.docker.conf,/etc/st2/st2.user.conf
2019-04-08 19:59:43,773 DEBUG [-] Using logging config: /etc/st2/logging.api.conf
2019-04-08 19:59:43,783 INFO [-] Connecting to database "st2" @ "sappy-seal-mongodb-ha:27017" as user "None".
2019-04-08 19:59:43,909 INFO [-] Successfully connected to database "st2" @ "sappy-seal-mongodb-ha:27017" as user "None".
2019-04-08 19:59:45,392 INFO [-] (PID=1) ST2 API is serving on http://0.0.0.0:9101.
2019-04-08 19:59:45,393 INFO [-] Creating st2api: StackStorm v3.0dev as OpenAPI app.
2019-04-08 19:59:46,307 ERROR [-] (PID=1) ST2 API quit due to exception.
Traceback (most recent call last):
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2api/cmd/api.py", line 82, in main
    return _run_server()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2api/cmd/api.py", line 71, in _run_server
    wsgi.server(sock, app.setup_app(), custom_pool=worker_pool, log=LOG, log_output=False)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2api/app.py", line 80, in setup_app
    router.add_spec(spec, transforms=transforms)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/router.py", line 212, in add_spec
    __import__(module_name)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2api/controllers/v1/keyvalue.py", line 437, in <module>
    key_value_pair_controller = KeyValuePairController()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2api/controllers/v1/keyvalue.py", line 62, in __init__
    self._coordinator = coordination.get_coordinator()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/services/coordination.py", line 227, in get_coordinator
    COORDINATOR = coordinator_setup(start_heart=start_heart)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/services/coordination.py", line 192, in coordinator_setup
    coordinator = coordination.get_coordinator(url, member_id, lock_timeout=lock_timeout)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/tooz/coordination.py", line 803, in get_coordinator
    invoke_args=(member_id, parsed_url, options)).driver
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/stevedore/driver.py", line 61, in __init__
    warn_on_missing_entrypoint=warn_on_missing_entrypoint
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/stevedore/named.py", line 81, in __init__
    verify_requirements)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/stevedore/extension.py", line 203, in _load_plugins
    self._on_load_failure_callback(self, ep, err)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/stevedore/extension.py", line 195, in _load_plugins
    verify_requirements,
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/stevedore/named.py", line 158, in _load_one_plugin
    verify_requirements,
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/stevedore/extension.py", line 223, in _load_one_plugin
    plugin = ep.resolve()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/tooz/drivers/etcd3gw.py", line 20, in <module>
    import etcd3gw
ImportError: No module named etcd3gw
2019-04-08 19:59:46,312 INFO [-] Connected to amqp://admin:**@sappy-seal-rabbitmq-ha-discovery:5672//

@Kami Looks like we'll need another pip dependency etcd3gw in st2 requirements.txt to make it work out of the box.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, as per my comment on Slack (etcd drivers in tooz are quite broken) - it needs a lot more work, not just driver installation so I put it on hold for a future release.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK works for me.
Leaving it as draft for now.

@arm4b arm4b closed this Jul 24, 2020
@arm4b arm4b deleted the enh/pin-3.x-etcd branch July 24, 2020 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Helm WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pin etcd to latest 3.x version

3 participants