0
votes

I am using puppet module "Biemond orawls" orawls to install and orchestrate weblogic server, in orawls for successful configuration change puppet returns exit code and i restart the weblogic server for every successful "Change" to update the changed configuration which is not good every time, because during changing anything in weblogic from weblogic admin console we get the indication that server restart required which is only applicable for particular selected attribute or resource changes, and orawls do not give any option to get status of restart required like WLST, so i want to use WLST command isRestartRequired([attributeName]) during every edit session inside orawls code which will tell me if restart is required or not instead of restarting server for every successful change in weblogic server and i want this status to be returned from orawls to puppet apply command.

i am using puppet apply command to change any weblogic server resources like -

apply -e 'include amd_wls_cluster' ${PUPPET_COMMON_OPTS} ${IS_NOOP}

which returns few specific code like - Puppet apply exit code

--detailed-exitcodes: Provide extra information about the run via exit codes. If enabled, 'puppet apply' will use the following exit codes:
0: The run succeeded with no changes or failures; the system was already in the desired state.
1: The run failed.
2: The run succeeded, and some resources were changed.
4: The run succeeded, and some resources failed.
6: The run succeeded, and included both changes and failures.

Here i want to add my own custom status code may be 7 if WLST isRestartRequired([attributeName]) return true

i tried searching a lot but could not find anything, is this possible to return custom exit code from biemond orawls to puppet.

or is there any such option which i can use to identify if server restart is required using puppet's biemond orawls module.

Thank you in advance.

1
A more typical approach would be to have Puppet manage the service on each managed node. This way you can easily limit restarts to circumstances that require them. I'm uncertain whether this would present a problem for your particular configuration.John Bollinger

1 Answers

0
votes

i tried searching a lot but could not find anything, is this possible to return custom exit code from biemond orawls to puppet.

No, Puppet does not provide a mechanism for customizing its exit codes. There is no hook exposed to modules that could provide for this.

or is there any such option which i can use to identify if server restart is required using puppet's biemond orawls module.

As I wrote in comments, the usual pattern is to let Puppet manage the service restart (or even a server restart, though I don't see why that would be necessary). It's unclear exactly how that would look with orawls, which appears to have a ridiculously large public interface, but it looks like the docs contain several example configurations, and I would hope to see such a thing in at least one of those.

Alternatively, the Puppet agent can be configured (and in some versions is configured by default) to send reports describing each run to (typically) the master. The master can then be configured to process these via a user-provided processing module. These reports contain information about exactly which resources were changed, so you could surely use them to decide remotely whether to restart services / servers.