Uploaded image for project: 'Coopr'
  1. Coopr
  2. COOPR-769

shell automator cant run commands with absolute paths

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: 0.9.9, Code Name: Ursa Major
    • Fix Version/s: 0.9.10 Code Name: Mensa
    • Component/s: plugins
    • Labels:
      None
    • Rank:
      1|hzyy6n:

      Description

      the following defined service:

        "provisioner": {
          "actions": {
            "start": {
              "type": "shell",
              "fields": {
                "args": "run co.cask.cdap.data.tools.UpgradeTool upgrade",
                "script": "/opt/cdap/master/bin/svc-master"
              }
            }
          }
        }
      

      fails as follows:

      2015-08-14 18:14:40 -0700 dereks-macbook-air.local.53715 DEBUG: ---ssh-exec command: cd /var/cache/coopr/shell_automator/scripts; export PATH=$PATH:/var/cache/coopr/shell_automator/scripts; sudo /var/cache/coopr/shell_automator/lib/coopr_wrapper.sh /var/cache/coopr/shell_automator/00000053-174-2479.json /opt/cdap/master/bin/svc-master run co.cask.cdap.data.tools.UpgradeTool upgrade
      2015-08-14 18:14:40 -0700 dereks-macbook-air.local.53715 DEBUG: stderr: /var/cache/coopr/shell_automator/lib/coopr_wrapper.sh: line 75: .//opt/cdap/master/bin/svc-master: No such file or directory
      

      due to the following seemingly-incorrect clause here:
      https://github.com/caskdata/coopr-provisioner/blob/develop/lib/provisioner/worker/plugins/automators/shell_automator/lib/coopr_wrapper.sh#L75

        Attachments

          Activity

            People

            • Assignee:
              derek Derek Wood
              Reporter:
              derek Derek Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: