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

Playbook is failing on mysql role #1343

Closed
g7morris opened this issue Nov 18, 2019 · 16 comments
Closed

Playbook is failing on mysql role #1343

g7morris opened this issue Nov 18, 2019 · 16 comments
Labels
Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also

Comments

@g7morris
Copy link

g7morris commented Nov 18, 2019

Hello everyone,

I was able to replicate this issue on both a local vagrant and remote deploy several times.

I am using Ansible 2.9.1

The current playbook fails during this mysql task with:

TASK [geerlingguy.mysql : Check master replication status.] ********************
Monday 18 November 2019  11:27:39 -0500 (0:00:00.034)       0:02:50.073 ******* 
fatal: [default]: FAILED! => {"msg": "The conditional check '((slave.Is_Slave is defined and not slave.Is_Slave) or (slave.Is_Slave is not defined and slave|failed)) and (mysql_replication_role == 'slave') and (mysql_replication_master != '')\n' failed. The error was: template error while templating string: no filter named 'failed'. String: {% if ((slave.Is_Slave is defined and not slave.Is_Slave) or (slave.Is_Slave is not defined and slave|failed)) and (mysql_replication_role == 'slave') and (mysql_replication_master != '')\n %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/gavin/Code/Islandora_Foundation/islandora-playbook/roles/external/geerlingguy.mysql/tasks/replication.yml': line 25, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Check master replication status.\n  ^ here\n"}

When I comment out the last line in roles/external/geerlingguy.mysql/tasks/main.yml i.e.
#- include_tasks: replication.yml, this role no longer fails. Given I'm not running any type of MySQL cluster, there should be no negative impact.

This seems to be an error with the geerlingguy.mysql/tasks/replication.yml upstream Ansible role rather but it isn't clear what Islandora users are supposed to do here?

Line 25 in the replication.yml task is tags: ['skip_ansible_galaxy'] of which all lines have this tag. Not clear what this issue is.

@dannylamb
Copy link
Contributor

I updated from 16.04 to 18.04 on my machine, and now I'm hitting this. I was able to build after you made this issue while I was still on 16.04, but now no longer. 🎉

@dannylamb
Copy link
Contributor

I can confirm I'm on 2.9.1 as well. I'm bumping the version of the role in galaxy to get the latest and seeing if that fixes anything.

@dannylamb
Copy link
Contributor

Nope, even with the latest geerlingguy mysql role, it fails 😢

@dannylamb
Copy link
Contributor

By downgrading to Ansible 2.8.7 I've managed to build successfully.

I guess at least it's narrowed down to just Ubuntu 18.04 hosts and Ansible 2.9.x and the mysql role... I can live with 2.8.7 but we at least need to warn in the readme, docs, etc if we can't enforce it even: https://adamj.eu/tech/2016/08/19/restricting-the-ansible-version-in-use/ (suggested by @whikloj in Slack)

@ruebot
Copy link
Member

ruebot commented Jan 7, 2020

Oh, hi. 👋

I hit this today. Dropping ansible down from 2.9.1 to 2.8.7 solved it for me as well.

@dannylamb
Copy link
Contributor

O hai @ruebot

@dannylamb
Copy link
Contributor

@dwilcox just hit this too... I'll go update the documentation

@dannylamb
Copy link
Contributor

^^ documentation PR

@wgilling
Copy link
Contributor

How do I downgrade from ansible 2.9.3 to ansible 2.8.7????

Every step of this playbook has not worked due to problems with backward or forward compatibility. It's very frustrating.

@GilNovacomm
Copy link

@wgilling
You can use pip:
pip install -I ansible==2.8.7

@DigitLib
Copy link

DigitLib commented Feb 7, 2020

It is a geerlingguy.mysql version 2.9.0 and it is solved on 2.9.5
Tested both on CentOS and Ubuntu and work well
Ansible 3.8.1
Vagrant 2.2.7

@dannylamb
Copy link
Contributor

That's awesome news. Thanks for reporting @DigitLib !

@DigitLib
Copy link

DigitLib commented Feb 7, 2020

@dannylamb There are many geerligguy roles updated, tested now on Ubuntu...PASSED...check for CentOS...
Should we update requirements?

@DigitLib
Copy link

DigitLib commented Feb 7, 2020

@dannylamb Here is a list of updated roles

geerlingguy.php-mysql 2.0.1 > 2.0.2

geerlingguy.apache 3.0.0 > 3.1.0

geerlingguy.php-versions 2.1.5 > 4.0.2

geerlingguy.php 3.6.0 > 3.7.0

geerlingguy.composer 1.7.0 > 1.7.6

geerlingguy.git 2.0.2 > 2.1.0

geerlingguy.mysql 2.9.0 > 2.9.5

geerlingguy.postgresql 1.4.3 > 2.0.1

geerlingguy.solr 4.2.1 > 4.2.2

geerlingguy.java 1.8.1 > 1.9.7

geerlingguy.drupal 2.5.0 > 3.0.0

geerlingguy.drush 3.1.1 > 3.1.2

CentOS PASSED!

PLAY RECAP *********************************************************************
default : ok=445 changed=229 unreachable=0 failed=0 skipped=196 rescued=0 ignored=2

I can make PR to upgrade geerlingguy?

@whikloj
Copy link
Member

whikloj commented Apr 7, 2020

If you all want to try again this should be resolved for ansible 2.9.

@kstapelfeldt kstapelfeldt added Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also and removed Ansible labels Sep 25, 2021
@kstapelfeldt
Copy link
Member

We are closing this due to the time that has passed, and @whikloj 's suggestion that it's likely been fixed. Please open or resubmit if it remains an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also
Projects
None yet
Development

No branches or pull requests

8 participants