[
https://issues.apache.org/jira/browse/AMBARI-24079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David F. Quiroga updated AMBARI-24079:
--------------------------------------
Description:
[Configuring Storm for
Supervision|https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_storm-component-guide/content/config-storm-supv.html]
Currently under
[{{STORM/0.9.1/package/scripts}}|https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts]
there are {{supervisor.py}} and {{supervisor_prod.py}} (similar for Nimbus)
when configuring Storm for supervision you update the {{metainfo.xml}} to
reference the {{_prod.py}} files.
During a recent cluster upgrade ({{metainfo.xml}} changes lost) we looked at
combining the two files, so the scripts check for supervision support and use
it when available.
The "decision" to be supervised then occurs at the node level, and therefore
can be managed at the node-level rather than at the service/whole-cluster
level.
Currently we perform a basic check (shown below) for support before each action
(start, stop, status). A better way might be to do a conditional import.
{quote}{{def component_supported(component_name):}}
return_code, output = shell.call(("supervisorctl", "status",
format("storm-\{component_name}")))
{{ if return_code == 0 and 'ERROR' not in output:}}
# return code of 0 if program installed and component configured
{{ return True}}
{{ else:}}
{{ # return code of non 0 if program not installed or component not
configured}}
{{ return False}}
{quote}
was:
[Configuring Storm for
Supervision|https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_storm-component-guide/content/config-storm-supv.html]
Currently under
[{{STORM/0.9.1/package/scripts}}|https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts]
there are {{supervisor.py}} and {{supervisor_prod.py}} (similar for Nimbus)
when configuring Storm for supervision you update the {{metainfo.xml}} to
reference the {{_prod.py}} files.
During a recent cluster upgrade ({{metainfo.xml}} changes lost) we looked at
combining the two files, so the scripts check for supervision support and use
it when available.
The "decision" to be supervised then occurs at the node level, and therefore
can be managed at the node-level rather than at the service/whole-cluster
level.
Currently we perform a basic check (shown below) for support before each action
(start, stop, status). A better way might be to do a conditional import.
{quote}{{def component_supported(component_name):}}
return_code, output = shell.call(("supervisorctl", "status",
format("storm-\{component_name}")))
{{ if return_code == 0 and 'ERROR' not in output:}}
# return code of 0 if program installed and component configured
{{ return True}}
{{ else:}}
{{ # return code of non 0 if program not installed or component not
configured}}
{{ return False}}
{quote}
> Configuring Storm for Supervision
> ----------------------------------
>
> Key: AMBARI-24079
> URL: https://issues.apache.org/jira/browse/AMBARI-24079
> Project: Ambari
> Issue Type: Improvement
> Components: ambari-server
> Reporter: David F. Quiroga
> Assignee: David F. Quiroga
> Priority: Trivial
>
> [Configuring Storm for
> Supervision|https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_storm-component-guide/content/config-storm-supv.html]
> Currently under
>
> [{{STORM/0.9.1/package/scripts}}|https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts]
> there are {{supervisor.py}} and {{supervisor_prod.py}} (similar for Nimbus)
> when configuring Storm for supervision you update the {{metainfo.xml}} to
> reference the {{_prod.py}} files.
> During a recent cluster upgrade ({{metainfo.xml}} changes lost) we looked at
> combining the two files, so the scripts check for supervision support and use
> it when available.
> The "decision" to be supervised then occurs at the node level, and therefore
> can be managed at the node-level rather than at the service/whole-cluster
> level.
>
> Currently we perform a basic check (shown below) for support before each
> action (start, stop, status). A better way might be to do a conditional
> import.
>
> {quote}{{def component_supported(component_name):}}
> return_code, output = shell.call(("supervisorctl", "status",
> format("storm-\{component_name}")))
> {{ if return_code == 0 and 'ERROR' not in output:}}
> # return code of 0 if program installed and component configured
> {{ return True}}
> {{ else:}}
> {{ # return code of non 0 if program not installed or component not
> configured}}
> {{ return False}}
> {quote}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)