Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soft fail on missing ipaddress gem #155

Merged
merged 1 commit into from
Apr 21, 2016
Merged

soft fail on missing ipaddress gem #155

merged 1 commit into from
Apr 21, 2016

Conversation

fraenki
Copy link
Member

@fraenki fraenki commented Apr 21, 2016

Starting with version 0.5 the ipaddress gem is required. I'm OK with this, but if the gem is missing the whole puppet run fails (which is a bad thing after all):

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Could not autoload puppet/type/network_config: cannot load such file -- ipaddress at /etc/puppet/environments/development/modules/profile/manifests/os/network.pp:164:3 on node xxx.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

What this means is that it's not possible to install the required gem if the network module was already included (i.e. by the ENC). This makes it hard to use this module in an environment with massive automation and auto-deployed VMs.

The gem is only used to provide (better) validation, so my proposal is to not kill the puppet run if the gem is missing, but instead send a clear warning message:

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Warning: /var/lib/puppet/lib/puppet/type/network_config.rb:6: ipaddress gem was not found
Info: Caching catalog for xxx.example.com
Info: Applying configuration version '1461246353'
Notice: Finished catalog run in 2.77 seconds

@jyaworski
Copy link
Member

@fraenki derp. Thanks.

@jyaworski jyaworski merged commit 5301da3 into voxpupuli:master Apr 21, 2016
@igalic
Copy link
Contributor

igalic commented Apr 21, 2016

alternatively, we could use this simple regex: voxpupuli/puppet-tea#2 (comment)

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

Successfully merging this pull request may close these issues.

3 participants