Added db2_exec_nofail and support for admin nodes #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix errors when configuring a new instance
When a newly created instance is configured, puppet fails when
determining whether or not nodes, dcs and database entries exist because
the command "
db2 LIST * DIRECTORY
" will cause db2 to throw an errorbecause the directory doesn't exist. There are various scenarios here
so the best way is to allow
db2_exec
to fail when being called from theexists? method. Therefore all exists? methods now call
db2_exec_nofail
Fix idempotency problems with admin node entries
Previously, any nodes added as
admin => true
would cause puppet to tryand configure them again on the next run, that's because we need to
separate commands to list the configured nodes, list node directory and
list admin node directory. This commit adds support to the
db2_catalog_node
provider to query both types of node entry and return aunified result.