【发布时间】:2018-05-07 13:37:18
【问题描述】:
我正在使用 puppet 模块“Biemond orawls”orawls 在 orawls 中安装和编排 weblogic 服务器,以便成功更改配置 puppet 返回
退出代码,我为每个成功的“更改”重新启动 weblogic 服务器以更新每次都不好的更改配置,因为在从 weblogic 管理控制台更改 weblogic 中的任何内容期间,我们得到指示需要重新启动服务器,这仅适用于特定选定的属性或资源更改,并且 orawls 没有提供任何选项来获取所需的重启状态,如 WLST,所以我想在 orawls 代码中的每个编辑会话期间使用 WLST 命令isRestartRequired([attributeName]),这将告诉我是否需要重启为 weblogic 服务器中的每个成功更改重新启动服务器,我希望从 orawls 返回此状态到 puppet 应用命令。
我正在使用 puppet apply 命令来更改任何 weblogic 服务器资源,例如 -
apply -e 'include amd_wls_cluster' ${PUPPET_COMMON_OPTS} ${IS_NOOP}
返回一些特定代码,例如 - 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.
在这里我想添加我自己的自定义状态码,如果 WLST isRestartRequired([attributeName]) 返回 true,则可能是 7
我尝试了很多搜索但找不到任何东西,这是否可以将自定义退出代码从 biemond orawls 返回到 puppet。
或者是否有任何此类选项可用于确定是否需要使用 puppet 的 biemond orawls 模块重新启动服务器。
提前谢谢你。
【问题讨论】:
-
更典型的方法是让 Puppet 管理每个托管节点上的服务。这样,您可以轻松地将重新启动限制在需要它们的情况下。我不确定这是否会给您的特定配置带来问题。