voxpupuli / puppet-gluster

Create and manage Gluster pools, volumes, and mounts
https://forge.puppet.com/puppet/gluster
MIT License
16 stars 72 forks source link

Use $fact to retrieve fact #215

Closed scornelissen85 closed 4 years ago

scornelissen85 commented 4 years ago

Pull Request (PR) description

It will use the Puppet variable $fact to retrieve a fact name. Before this change, it used getvar() and in Puppet 6 the build-in getvar() is used which don't support a dash - in it's variable name. We had the challenge with migration to Puppet 6 this code failed because we have a volume with the name test-vol1 (with a dash). With this change the Puppet code will build a catalog on Puppet 6. A fact may actually contain a dash and getvar() shouldn't be used for getting a fact variable.

This Pull Request (PR) fixes the following issues

Fixes #214

glorpen commented 4 years ago

@scornelissen85 I've tried this PR and for hash access there should be no :: in "::gluster_volume_${title}_bricks", currently if with $already_exists is not executed because of undef value.

scornelissen85 commented 4 years ago

You're right, I will change that.

ekohl commented 4 years ago

Looks good, but needs a rebase to fix the merge conflict. Mind also squashing the commits while you're at it?

ekohl commented 4 years ago

Well, I just merged #219 and of course that also introduced merge conflicts. Sorry.

rwaffen commented 4 years ago

Hi everyone...

the tests seem to be all green, can we hope to have a merge in the next time then? ;-) Waiting for this change :-)

Greetings, Robert