Uploaded image for project: 'Hue'
  1. Hue
  2. HUE-2180 [oozie] Editor revamp
  3. HUE-2476

[oozie] Import workflow with ssh action ignores <args> tag

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.0, 3.6.0, 3.7.0
    • Fix Version/s: 3.8.0
    • Component/s: con.oozie
    • Labels:
      None

      Description

      Oozie import ssh does not import args

      export HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/73-hue-HUE_SERVER
      /opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue shell_plus
      from django.contrib.auth.models import User
      from liboozie.types import WorkflowList, Workflow as OozieWorkflow, Coordinator as OozieCoordinator, Bundle as OozieBundle, CoordinatorList, WorkflowAction, BundleList
      from oozie.models import Workflow, Node, Kill, Link, Job, Coordinator, History, find_parameters, NODE_TYPES, Bundle
      from oozie.importlib.workflows import import_workflow
      # type a user that exists
      workflow = Workflow.objects.new_workflow(User.objects.get(username='user that exists'))
      workflow.save()
      wf = """
      <workflow-app name="Ssh" xmlns="uri:oozie:workflow:0.1">
          <start to="Ssh"/>
          <action name="Ssh">
              <ssh xmlns="uri:oozie:ssh-action:0.1">
                  <host>${host}@${user}</host>
                  <command>ls</command>
                    <args>-l</args>
                    <capture-output/>
              </ssh>
              <ok to="end"/>
              <error to="kill"/>
          </action>
          <kill name="kill">
              <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
          </kill>
          <end name="end"/>
      </workflow-app>
      """
      import_workflow(workflow, wf)
      workflow.save()
      node = Node.objects.get(workflow=workflow, node_type='ssh').get_full_node()
      node.host
      node.command
      # expected node params should at least show some 'args' eg [{"type": "arg", "value": "-l"}]
      node.params
      
      
      workflow.delete(skip_trash=True)
      

        Attachments

          Activity

            People

            • Assignee:
              michalis Michalis Kongtongk
              Reporter:
              michalis Michalis Kongtongk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: