Skip to content
This repository has been archived by the owner on May 23, 2020. It is now read-only.

move db creation file to delegated_dbhost #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oskapt
Copy link

@oskapt oskapt commented Jul 22, 2018

Description of PR

This change will retrieve the file used to initialize the database and then copy it to the delegated_dbhost before loading it. it intentionally does not remove the file afterward, in case something goes wrong and the file needs to be re-imported. it also only executes for the series of conditions around zabbix >=3.0 and was only tested on Ubuntu.

Type of change

Bugfix Pull Request

Fixes an issue

it fixes #96.

This change will retrieve the file used to initialize the database and then copy it to the `delegated_dbhost` before loading it.  it intentionally does not remove the file afterward, in case something goes wrong and the file needs to be re-imported. it also only executes for the series of conditions around zabbix `>=3.0` and was only tested on Ubuntu.

it resolves dj-wasabi#96.
@dj-wasabi
Copy link
Owner

Hi @oskapt

The CI test failed with error:

    TASK [ansible-zabbix-server : MySQL | Create database and import file >= 3.0] ***
    skipping: [zabbix-server-pgsql-centos]
    skipping: [zabbix-server-pgsql-debian]
    skipping: [zabbix-server-pgsql-ubuntu]
    fatal: [zabbix-server-mysql-centos -> zabbix-server-mysql-centos]: FAILED! => {"changed": false, "failed": true, "msg": "target /var/tmp/zabbix-server-mysql-centos//usr/share/doc/zabbix-server-mysql-3.4.11/create.sql.gz does not exist on the host"}
    fatal: [zabbix-server-mysql-debian -> zabbix-server-mysql-debian]: FAILED! => {"changed": false, "failed": true, "msg": "target /var/tmp/zabbix-server-mysql-debian//usr/share/doc/zabbix-server-mysql/create.sql.gz does not exist on the host"}
    fatal: [zabbix-server-mysql-ubuntu -> zabbix-server-mysql-ubuntu]: FAILED! => {"changed": false, "failed": true, "msg": "target /var/tmp/zabbix-server-mysql-ubuntu//usr/share/doc/zabbix-server-mysql/create.sql.gz does not exist on the host"}
    
    TASK [ansible-zabbix-server : Check if we have sql_done files >= 3.0] **********
    skipping: [zabbix-server-pgsql-centos]
    skipping: [zabbix-server-pgsql-debian]
    skipping: [zabbix-server-pgsql-ubuntu]

Could you please take a look at it? Thanks!

@oskapt
Copy link
Author

oskapt commented Jul 30, 2018

i have a local change that should fix this, but i'm unable to test it without building a new zabbix system for testing. how can i replicate your CI environment? i'd like to know that everything works before updating the PR.

@dj-wasabi
Copy link
Owner

Install Molecule and do a molecule test. If this exit with a status code of 0 than all is fine. See: https://molecule.readthedocs.io/en/latest/

@dj-wasabi
Copy link
Owner

@oskapt

How is it going? Do you need some help? Should I take a look at how to implement this and maybe add it to the molecule tests?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

installation does not create database on remote host
2 participants