Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-278

Name a ScriptDeployment object without absolute path fails the execution

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.2
    • Fix Version/s: 0.12.1
    • Component/s: Core
    • Labels:
      None

      Description

      If you set a name to a ScriptDeployment this way:

      sd = ScriptDeployment('touch total_success', name='success.sh')

      it fails the execution when you call the conn.deploy_node() function without feedback to the user.

      The 'put' method of the 'ParamikoSSHClient' copies the file 'success.sh' in the relative path of the logged user (/root/success.sh or /home/ubuntu/success.sh in Ubuntu machines), but the 'run' method of the same class runs directly the 'success.sh' script and this file is not in the classpath.

      If you set the line previous to the return statement of the 'run' method:

      print ("Out: '%s', Error: '%s', Status: '%d'") % (so, se, status)

      You get:

      Out: '', Error: 'bash: success.sh: command not found', Status: '127'

      If the name of the 'ScriptDeployment' is an absolute path (sd = ScriptDeployment('touch total_success', name='/home/ubuntu/success.sh')), the execution runs fine.

        Attachments

        1. libcloud_278_full.patch
          7 kB
          Jaume Devesa
        2. libcloud_278.patch
          1 kB
          Jaume Devesa

          Activity

            People

            • Assignee:
              kami Tomaz Muraus
              Reporter:
              jdevesa Jaume Devesa
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: