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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

vreniers
Copy link
Contributor

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.
internode:
enabled: false
client:
enabled: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

So, this is how you do it these days, huh?
Interesting...

when: manager_agent_config_change.changed and start_scylla_service is defined and start_scylla_service|bool
ignore_errors: true
#TODO: remove ignore_errors when ansible is bumped to 2.10.4 or 2.9.16 as per https://github.com/ansible/ansible/issues/71528

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is one of the changes that may break things with older Ansible

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the only such change AFAICT

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

dependencies:
- role: "ansible-scylla-node"
vars:
scylla_version: "{{ scylla_manager_db_vars.scylla_version|default('latest') }}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a functional change and shouldn't be part of this patch
You should move it to a separate patch and explain the reason for the change, or maybe just remove it from the current PR since it doesn't seem to be related.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed.

scylla_manager_enabled: false
scylla_version: 'latest'
scylla_edition: "{{ scylla_manager_db_vars.scylla_edition|default('oss') }}"
elrepo_kernel: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you remove this variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I get the impression that this manager setup wants the most basic local ScyllaDB setup as possible. Ideally, there shouldn't be much to pass in terms of variables in such a case.

This variable it already happens to be false by default in the scylla-node role. Since it's not doing anything, I removed it.

I.e. I think we should align the scylla-node role to have the most 'basic' defaults as possible. Minimal hassle to get an out-of-the-box working experience.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've placed the variable back, and we can address such variables and defaults in a separate PR.

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]>
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