Skip to content
This repository was archived by the owner on Jul 31, 2021. It is now read-only.

include ::gocd::server doesn't work #5

Open
genebean opened this issue Aug 25, 2017 · 1 comment
Open

include ::gocd::server doesn't work #5

genebean opened this issue Aug 25, 2017 · 1 comment

Comments

@genebean
Copy link

Running puppet apply -e "include ::gocd::server" initially the error

Error: Evaluation Error: Unknown variable: '::gocd::common::manage_daemon_user'. at /etc/puppetlabs/code/environments/production/modules/gocd/manifests/common/user.pp:24:6 on node localhost.localdomain

I manually edited user.pp and changed managed_daemon_user to manage_user and then ran into another error:

Error: Evaluation Error: Error while evaluating a Function Call, validate_re(): input needs to be a String, not a NilClass at /etc/puppetlabs/code/environments/production/modules/gocd/manifests/server/config.pp:26:3 on node localhost.localdomain

It seems the value being referenced is set to undef. This is where I stopped debugging and figured I'd see if you would be willing to take a look. I am trying a simple proof of concept use case via the Vagrantfile below:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "genebean/centos-7-puppet5"
  config.vm.network "forwarded_port", guest: 8153, host: 8153
  config.vm.network "forwarded_port", guest: 8154, host: 8154
  # config.vm.network "private_network", ip: "192.168.33.10"

  config.vm.provider "virtualbox" do |vb|
    # Customize the amount of memory on the VM:
    vb.memory = "2048"
  end

  config.vm.provision "shell", inline: <<-SHELL
    puppet module install jmkeyes-gocd --version 0.0.6
    puppet apply -e "include ::gocd::server"
    puppet apply -e "class { '::gocd::agent': server => 'localhost', }"
  SHELL
end
@jmkeyes
Copy link
Owner

jmkeyes commented Aug 31, 2017

Thanks for filing a bug report!

It seems there were two issues at play:

  • Class[gocd::common::user] had an invalid variable reference (manage_daemon_user vs manage_user). (Fixed as of f42f328.)
  • The input validation for JVM memory parameters in gocd::server::config needed to be guarded with conditionals so the validation would only apply when the jvm_min_memory and jvm_max_memory parameters were explicitly supplied. (Fixed as of bd9dd4a.)

I've pushed those fixes to the master branch as the noted commits above.

Please try out the fixes at your earliest convenience.

If they work for you, I'll release a new version of the module to the Forge.

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

No branches or pull requests

2 participants