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

Upgrade cassandra image to 4.1.3 in docker compose files #5461

Merged

Conversation

taylanisikdemir
Copy link
Contributor

@taylanisikdemir taylanisikdemir commented Nov 22, 2023

What changed?
Docker compose files were referring to an older version (3.11) of Cassandra. Updated them with current GA version 4.1.3.

ubercadence/server:master-auto-setup container's initialization script waits on Cassandra to be up and corresponding wait command is updated to use --cqlversion=3.4.6 (previously 3.4.4).

Misc change: I was also interested in to see Cassandra's full query logs. Added docs/howtos/cassandra-fql.md to explain the steps on how to check FQL.

Why?
To keep things up to date. Assuming Cassandra 4+ is more widely used.

How did you test it?

  • Locally run make test and bench tests
  • Tried a few of the docker-compose-*.yml files

Potential risks
Users who depends on ubercadence/server:master-auto-setup should pull new image before running docker-compose. Hopefully this is only used for development/discovery use cases. Left a note in changelog for this.

@taylanisikdemir taylanisikdemir changed the title Upgrade Cassandra to GA version 4.1.3 in docker compose files Upgrade cassandra image to 4.1.3 in docker compose files Nov 22, 2023
@taylanisikdemir taylanisikdemir marked this pull request as ready for review November 22, 2023 23:20
- "7943:7933"
- "7944:7934"
- "7945:7935"
- "7949:7939"
- "7843:7833"
environment:
- "CASSANDRA_SEEDS=cassandra"
- "PROMETHEUS_ENDPOINT_0=0.0.0.0:9000"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

avoiding usage of port 9000 because it's a popular port and high chance of conflict. (I encountered this issue)

@taylanisikdemir taylanisikdemir merged commit c54c886 into cadence-workflow:master Nov 26, 2023
16 checks passed
@taylanisikdemir taylanisikdemir deleted the taylan/cassandra_v4 branch November 26, 2023 18:56
@SaurabhGoyal
Copy link

This is causing versioning issues when using docker-compose.yml to spin up the container -

cadence_1        | 
cadence_1        | Warning: Using a password on the command line interface can be insecure.
cadence_1        | Recommendation: use the credentials file to securely provide the password.
cadence_1        | 
cadence_1        | Traceback (most recent call last):
cadence_1        |   File "/usr/bin/cqlsh", line 8, in <module>
cadence_1        |     sys.exit(main())
cadence_1        |   File "/usr/lib/python3.9/site-packages/cqlsh/__main__.py", line 7, in main
cadence_1        |     cqlsh_main(*read_options(sys.argv[1:], os.environ))
cadence_1        |   File "/usr/lib/python3.9/site-packages/cqlsh/cqlsh.py", line 2329, in main
cadence_1        |     shell = Shell(hostname,
cadence_1        |   File "/usr/lib/python3.9/site-packages/cqlsh/cqlsh.py", line 476, in __init__
cadence_1        |     load_balancing_policy=WhiteListRoundRobinPolicy([self.hostname]),
cadence_1        |   File "/usr/lib/python3.9/site-packages/cassandra/policies.py", line 425, in __init__
cadence_1        |     self._allowed_hosts_resolved = [endpoint[4][0] for a in self._allowed_hosts
cadence_1        |   File "/usr/lib/python3.9/site-packages/cassandra/policies.py", line 426, in <listcomp>
cadence_1        |     for endpoint in socket.getaddrinfo(a, None, socket.AF_UNSPEC, socket.SOCK_STREAM)]
cadence_1        |   File "/usr/lib/python3.9/socket.py", line 954, in getaddrinfo
cadence_1        |     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
cadence_1        | socket.gaierror: [Errno -2] Name does not resolve
cadence_1        | + echo 'waiting for cassandra to start up'
cadence_1        | + sleep 1
cadence_1        | waiting for cassandra to start up
cadence_1        | + cqlsh -u cassandra -p cassandra --cqlversion=3.4.4 --protocol-version=4 cassandra

@taylanisikdemir
Copy link
Contributor Author

This is causing versioning issues when using docker-compose.yml to spin up the container -

cadence_1        | 
cadence_1        | Warning: Using a password on the command line interface can be insecure.
cadence_1        | Recommendation: use the credentials file to securely provide the password.
cadence_1        | 
cadence_1        | Traceback (most recent call last):
cadence_1        |   File "/usr/bin/cqlsh", line 8, in <module>
cadence_1        |     sys.exit(main())
cadence_1        |   File "/usr/lib/python3.9/site-packages/cqlsh/__main__.py", line 7, in main
cadence_1        |     cqlsh_main(*read_options(sys.argv[1:], os.environ))
cadence_1        |   File "/usr/lib/python3.9/site-packages/cqlsh/cqlsh.py", line 2329, in main
cadence_1        |     shell = Shell(hostname,
cadence_1        |   File "/usr/lib/python3.9/site-packages/cqlsh/cqlsh.py", line 476, in __init__
cadence_1        |     load_balancing_policy=WhiteListRoundRobinPolicy([self.hostname]),
cadence_1        |   File "/usr/lib/python3.9/site-packages/cassandra/policies.py", line 425, in __init__
cadence_1        |     self._allowed_hosts_resolved = [endpoint[4][0] for a in self._allowed_hosts
cadence_1        |   File "/usr/lib/python3.9/site-packages/cassandra/policies.py", line 426, in <listcomp>
cadence_1        |     for endpoint in socket.getaddrinfo(a, None, socket.AF_UNSPEC, socket.SOCK_STREAM)]
cadence_1        |   File "/usr/lib/python3.9/socket.py", line 954, in getaddrinfo
cadence_1        |     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
cadence_1        | socket.gaierror: [Errno -2] Name does not resolve
cadence_1        | + echo 'waiting for cassandra to start up'
cadence_1        | + sleep 1
cadence_1        | waiting for cassandra to start up
cadence_1        | + cqlsh -u cassandra -p cassandra --cqlversion=3.4.4 --protocol-version=4 cassandra

You might have a previous sha of ubercadence/server:master-auto-setup on your machine. Try this to start fresh and let me know if it works

docker-compose stop
docker-compose rm -f
docker-compose pull   
docker-compose up

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

Successfully merging this pull request may close these issues.

3 participants