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

Added db2_exec_nofail and support for admin nodes #10

Merged
merged 2 commits into from
Nov 10, 2016
Merged

Conversation

crayfishx
Copy link
Owner

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 error
because 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 the
exists? 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 try
and 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 a
unified result.

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 error
because 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 the
exists? method.  Therefore all exists? methods now call db2_exec_nofail

Previously, any nodes added as admin => true would cause puppet to try
and 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 a
unified result.
@crayfishx crayfishx added this to the 1.1.1 milestone Nov 10, 2016
@crayfishx crayfishx merged commit 0b45cd0 into master Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant