puppetlabs / puppetlabs-mysql

MySQL Puppet Module / Manifests + Types & Providers
Apache License 2.0
380 stars 790 forks source link

xtrabackup: handle missing facts gracefully #1630

Open fraenki opened 3 months ago

fraenki commented 3 months ago

Summary

When setting up a new server (or when reinstalling an existing server) with xtrabackup enabled, the Puppet Run may fail:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error:
Error while evaluating a Function Call, 'versioncmp' parameter 'a' expects a String value, got Undef
(file: /etc/puppetlabs/code/environments/development/modules/mysql/manifests/backup/xtrabackup.pp, line: 53, column: 8) on node

This patch adds a check to verify that the facts are available, before accessing them.

Additional Context

none

Related Issues (if any)

none

Checklist

fraenki commented 2 weeks ago

rebased