[ 
https://issues.apache.org/jira/browse/AMBARI-25964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

halim kim updated AMBARI-25964:
-------------------------------
    Description: 
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.

In my case, I used Oozie version 5.x and only oozie 5.x version has action 
schema version 1.0. 
(https://github.com/apache/oozie/tree/master/client/src/main/resources)


  was:
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.





> 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
>            Priority: Trivial
>
> 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.
> In my case, I used Oozie version 5.x and only oozie 5.x version has action 
> schema version 1.0. 
> (https://github.com/apache/oozie/tree/master/client/src/main/resources)



--
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