halim kim created AMBARI-25964:
----------------------------------

             Summary: Ambari WFManager generate workflow xml file with wrong 
action schema version
                 Key: AMBARI-25964
                 URL: https://issues.apache.org/jira/browse/AMBARI-25964
             Project: Ambari
          Issue Type: Bug
            Reporter: halim kim


If you generate and submit workflow xml file with default setting of ambari 
wfmanager, submitted workflow will be failed.

The reason of failure is wrong oozie action schema version.
below is example workflow xml file with default setting.

{code:xml}
<workflow-app name="test"
    xmlns="uri:oozie:workflow:1.0">
    <start to="shell_1"/>
    <action name="shell_1">
        <shell
            xmlns="uri:oozie:shell-action:1">
            <job-tracker>${resourceManager}</job-tracker>
            <name-node>${nameNode}</name-node>
            <exec>test.sh</exec>
        </shell>
        <ok to="end"/>
        <error to="kill"/>
    </action>
    <kill name="kill">
        <message>${wf:errorMessage(wf:lastErrorNode())}</message>
    </kill>
    <end name="end"/>
</workflow-app>
{code}

You can see that shell-action schema version is '1'.
However there is no action schema version '1' in Oozie. there is only '1.0' 
action schema version. wfmanager should generate workflow xml file with shell 
action schema version '1.0' not '1' like below.

{code:xml}
<workflow-app name="test"
        xmlns="uri:oozie:workflow:1.0">
        <start to="shell_1"/>
        <action name="shell_1">
                <shell
                        xmlns="uri:oozie:shell-action:1.0">
                        <job-tracker>${resourceManager}</job-tracker>
                        <name-node>${nameNode}</name-node>
                        <exec>test.sh</exec>
                </shell>
                <ok to="end"/>
                <error to="kill"/>
        </action>
        <kill name="kill">
                <message>${wf:errorMessage(wf:lastErrorNode())}</message>
        </kill>
        <end name="end"/>
</workflow-app>
{code}

This bug happens when you leave schema version setting untact. If you set 
action schema version manually, it doesn't occur.






--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to