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

Compatibility with newer Ansible versions (tested 2.17.5) #411

Merged
merged 6 commits into from
Jan 9, 2025

Conversation

vreniers
Copy link
Collaborator

This patch introduces several fixes to allow compatibility with newer ansible versions.
Ansible versions 2.14 or older are EOL (source)

The patch introduces the following:

  • Patches the async plugin library
  • Patches scylla-ansible-manager to properly pass variables to the scylla-ansible-node role with newer Ansible versions.
  • Patches a bug in deactivation of services: Services were listed as a fact but with a 'non-found' status.
  • Detects errors when scylla-manager does not start.

Fixes #409: A newer Ansible version was required to execute properly with Ubuntu 24 which came with a newer Python version out-of-the-box, which was not supported by older Ansible versions.

- Per https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/shebang.html: It states that #!/usr/bin/env python should not be used, but rather #!/usr/bin/python.
These handler class variables were removed, and instead became options that can be set.
…'t exist.

Bug fix: A service that is defined in ansible facts, is no guarantee for its existence. A service such as "firewalld" may appear, but it could have a status as 'not-found'.
… starting the manager.

Errors should not be ignored when the manager service cannot start.
vladzcloudius
vladzcloudius previously approved these changes Oct 11, 2024
Copy link
Collaborator

@igorribeiroduarte igorribeiroduarte left a comment

Choose a reason for hiding this comment

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

Just these 2 small nitpicks
Other than that, LGTM

ansible-scylla-manager/meta/main.yml Outdated Show resolved Hide resolved
ansible-scylla-manager/tasks/main.yml Show resolved Hide resolved
Newer ansible versions change the behavior regarding dependencies. Variables were not properly passed, such as the desired scylla_version, which ended up using ansible-scylla-node defaults such as a scylla_version of '0.0.0'. This removes the now redundant import role in common.yml and properly specifies the dependency along with its variables.

Signed-off-by: Vincent Reniers <[email protected]>
When you register a variable in a loop, ansible puts the results inside
a results object, so trying to access the 'wait_for_cql_port_output.failed'
directly as it was being done doesn't work.
@igorribeiroduarte igorribeiroduarte merged commit b564efd into scylladb:master Jan 9, 2025
2 checks passed
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.

[monitoring] Ubuntu 24 as image for monitoring VM errors with docker install
3 participants