voxpupuli / puppet-keepalived

Puppet Module to manage Keepalived
https://forge.puppet.com/puppet/keepalived
Apache License 2.0
49 stars 150 forks source link

Detail: undefined method `each' for "check_haproxy":String in 4.1.0 #323

Open mburlic opened 5 months ago

mburlic commented 5 months ago

When trying to update to 4.1.0

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Failed to parse template keepalived/vrrp_instance.erb:
  Filepath: /etc/puppetlabs/code/environments/haprox/modules/keepalived/templates/vrrp_instance.erb
  Line: 103
  Detail: undefined method `each' for "check_haproxy":String
 (file: /etc/puppetlabs/code/environments/haprox/modules/keepalived/manifests/vrrp/instance.pp, line: 291, column: 16) (file: /etc/puppetlabs/code/environments/haprox/modules/keepalived/manifests/config.pp, line: 62) on node
mburlic commented 5 months ago

I see changes were made 2 days ago. Hopping for release soon.

jadestorm commented 5 months ago

I am also seeing this -- it is due to track_script accepting only a String, but the template file was updated to treat it like an array. I actually do not see a fix for this in the latest code: https://github.com/voxpupuli/puppet-keepalived/blob/master/templates/vrrp_instance.erb#L102C1-L103C1

jadestorm commented 5 months ago

Well to be fair -- the latest code would allow me to wrap my string in an array and solve it. =) But it's also allowing a String to be passed but the template (I think?) would fail as far as I'm reading it.

jadestorm commented 5 months ago

I stand corrected -- the latest code does indeed handle passing a single string just fine. I must be missing something in my reading of the template.