enterprisemediawiki / meza

Setup an enterprise MediaWiki server with simple commands
MIT License
41 stars 27 forks source link

deploy failure at "Ensure replication user exists on master" #1240

Closed revansx closed 4 years ago

revansx commented 5 years ago

Environment

Issue details - meza deploy fails at:

TASK [database : Ensure replication user exists on master.] *********************************************************************************************************************************
Sunday 17 November 2019  18:26:22 -0500 (0:00:00.324)       0:11:12.344 *******
fatal: [localhost]: FAILED! => {}

MSG:

The conditional check 'not role_is_valid_master|skipped
' failed. The error was: template error while templating string: no filter named 'skipped'. String: {% if not role_is_valid_master|skipped
 %} True {% else %} False {% endif %}

The error appears to be in '/opt/meza/src/roles/database/tasks/replication.yml': line 25, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

#
- name: Ensure replication user exists on master.
  ^ here
revansx commented 5 years ago

Here is the referenced code in replicator.yml

---
#
# The following conditionals are reused many times in the tasks in this file.
# As such, they've been encapsulated in these tasks and registered to vars.
# FIXME #812: The logic "not role_is_valid_slave|skipped" is awkward
- name: Check if valid slave
  command: /bin/true
  register: role_is_valid_slave
  when: >
    (mysql_replication_role == 'slave')
    and mysql_replication_user
    and (mysql_replication_master != '')
- name: Check if valid master
  command: /bin/true
  register: role_is_valid_master
  when: >
    (mysql_replication_role == 'master')
    and mysql_replication_user
    and (mysql_replication_master != '')
#
# Make sure MySQL user for replication exists on master
#
- name: Ensure replication user exists on master.

It would seem something in the first section failed just above the last line, but this code hasn't changed in months. https://github.com/enterprisemediawiki/meza/blob/master/src/roles/database/tasks/replication.yml

darenwelsh commented 4 years ago

I just created a new VM with CentOS 1810 minimal on VirtualBox, pulled meza master, updated yum, and got the same error from deploy.

darenwelsh commented 4 years ago

I tried checking out meza tag 31.8.3 and got the same deploy error.

darenwelsh commented 4 years ago

From our work dev server deploy on Nov 8:

TASK [database : Ensure replication user exists on master.] ********************
Friday 08 November 2019  16:32:48 -0600 (0:00:00.361)       0:02:25.503 *******
^[[0;35m[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using ^[[0m
^[[0;35m`result|skipped` use `result is skipped`. This feature will be removed in ^[[0m
^[[0;35mversion 2.9. Deprecation warnings can be disabled by setting ^[[0m
^[[0;35mdeprecation_warnings=False in ansible.cfg.^[[0m
^[[0;32mok: [localhost]^[[0m

So we're not seeing this error on RH 4.8.5-39. In the above output, it mentions deprecation of the pipe syntax and suggests "result is skipped" instead. It says this pipe syntax will be removed in version 2.9. I assume that's Ansible. But when I check ansible --version on this work machine I get 2.9.1. So I'm confused.

darenwelsh commented 4 years ago

After locally modifying from "|skipped" to "is skipped", the deploy was successful. While that deploy was running I searched the meza repo for "|skipped" and found this commit that makes the same change. The problem is that this is part of the 32.x-dev branch, which I think is intended for the MediaWiki 1.32 release. One option would be to complete development of that branch so it can be merged into master (with a tag), but I don't know enough about all the other changes associated with that branch. But meza seems to be broken currently on master. So something needs to be done. I'm leaning toward making the change from "|skipped" to "is skipped" as a hot fix to master.