microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.49k stars 2.61k forks source link

CopyFilesOverSSHV0 0.172.0 fails where 0.171.0 did not. #13259

Closed travispalmer closed 4 years ago

travispalmer commented 4 years ago

Question, Bug, or Feature?
Type: Bug

Enter Task Name: CopyFilesOverSSHV0

Environment

Issue Description

When using CopyFilesOverSSHV0 version 0.171.0 copy is successful, however with version 0.172.0 it fails.

The following images are from the same release, with separate attempts(IE, no changes should be present other than agent version) Attempt 1 image

Attempt 2 image

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution] ReleaseLogs_1482.zip

Error logs

Successful 0.171.0: 2020-07-02T20:11:15.7022476Z ##[section]Starting: Securely copy files to the remote machine 2020-07-02T20:11:15.7179505Z ============================================================================== 2020-07-02T20:11:15.7179887Z Task : Copy files over SSH 2020-07-02T20:11:15.7180199Z Description : Copy files or build artifacts to a remote machine over SSH 2020-07-02T20:11:15.7180510Z Version : 0.171.0 2020-07-02T20:11:15.7180798Z Author : Microsoft Corporation 2020-07-02T20:11:15.7181169Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/copy-files-over-ssh 2020-07-02T20:11:15.7181551Z ============================================================================== 2020-07-02T20:11:16.9594205Z Setting up SSH service connection to remote temp.server.domain.com 2020-07-02T20:11:18.5564505Z Found 45 files to copy to the remote machine. 2020-07-02T20:11:18.5569651Z Copying file F:\ADOAgents\A5_work\r31\a\SplunkAutomation\AnsibleScripts\common\tasks\config_pass4SymmKey.yml to splunk/common\tasks\config_pass4SymmKey.yml on remote machine. 2020-07-02T20:11:18.8378949Z Copying file F:\ADOAgents\A5_work\r31\a\SplunkAutomation\AnsibleScripts\common\tasks\daemon_reload.yml to splunk/common\tasks\daemon_reload.yml on remote machine. 2020-07-02T20:11:19.0790415Z Copying file F:\ADOAgents\A5_work\r31\a\SplunkAutomation\AnsibleScripts\common\tasks\disable_bootstart.yml to splunk/common\tasks\disable_bootstart.yml on remote machine. 2020-07-02T20:11:19.3106964Z Copying file F:\ADOAgents\A5_work\r31\a\SplunkAutomation\AnsibleScripts\common\tasks\enable_bootstart.yml to splunk/common\tasks\enable_bootstart.yml on remote machine.

Failure 0.172.0: 2020-07-10T15:01:57.7991924Z ##[section]Starting: Securely copy files to the remote machine 2020-07-10T15:01:57.8103848Z ============================================================================== 2020-07-10T15:01:57.8104195Z Task : Copy files over SSH 2020-07-10T15:01:57.8104519Z Description : Copy files or build artifacts to a remote machine over SSH 2020-07-10T15:01:57.8104814Z Version : 0.172.0 2020-07-10T15:01:57.8105051Z Author : Microsoft Corporation 2020-07-10T15:01:57.8105414Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/copy-files-over-ssh 2020-07-10T15:01:57.8105828Z ============================================================================== 2020-07-10T15:01:58.8396704Z Setting up SSH service connection to remote host temp.server.domain.com 2020-07-10T15:02:00.3935072Z Found 45 files to copy to the remote machine. 2020-07-10T15:02:00.3945229Z Copying file F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\config_pass4SymmKey.yml to splunk/common\tasks\config_pass4SymmKey.yml on remote machine. 2020-07-10T15:02:00.5116334Z ##[error]Failed to copy F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\config_pass4SymmKey.yml. Failed to upload F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\config_pass4SymmKey.yml to splunk/common\tasks\config_pass4SymmKey.yml on remote machine. Error: put->put: Bad path: splunk/common\tasks parent not exist. 2020-07-10T15:02:00.5118779Z Copying file F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\daemon_reload.yml to splunk/common\tasks\daemon_reload.yml on remote machine. 2020-07-10T15:02:00.6233474Z ##[error]Failed to copy F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\daemon_reload.yml. Failed to upload F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\daemon_reload.yml to splunk/common\tasks\daemon_reload.yml on remote machine. Error: put->put: Bad path: splunk/common\tasks parent not exist. 2020-07-10T15:02:00.6235978Z Copying file F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\disable_bootstart.yml to splunk/common\tasks\disable_bootstart.yml on remote machine. 2020-07-10T15:02:00.7313703Z ##[error]Failed to copy F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\disable_bootstart.yml. Failed to upload F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\disable_bootstart.yml to splunk/common\tasks\disable_bootstart.yml on remote machine. Error: put->put: Bad path: splunk/common\tasks parent not exist. 2020-07-10T15:02:00.7316333Z Copying file F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\enable_bootstart.yml to splunk/common\tasks\enable_bootstart.yml on remote machine. 2020-07-10T15:02:00.8364316Z ##[error]Failed to copy F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\enable_bootstart.yml. Failed to upload F:\ADOAgents\A2_work\r174\a\SplunkAutomation\AnsibleScripts\common\tasks\enable_bootstart.yml to splunk/common\tasks\enable_bootstart.yml on remote machine. Error: put->put: Bad path: splunk/common\tasks parent not exist.

marlier commented 4 years ago

13264 Should address this -- it's linked against duplicate issue #13260

stuspethln commented 4 years ago

We are seeing the same issue when using SSH to copy assets from a Windows agent to a Linux server. It seems to be a problem with the fact that the directory separators in the contains parameter are being dereferenced to backslashes, which is then making the ssh host on the unix server mad.

bjs169 commented 4 years ago

We are seeing the same issue when using SSH to copy assets from a Windows agent to a Linux server. It seems to be a problem with the fact that the directory separators in the contains parameter are being dereferenced to backslashes, which is then making the ssh host on the unix server mad.

Did #13272 not resolve it for you? It resolved it for some other people including me.

stuspethln commented 4 years ago

In looking at that PR I don't see that it is completed yet, nor do I see a PR into a release. Is there a guide or something about how I can load changes from a feature branch into a build agent in my local environment?

marlier commented 4 years ago

Instead of merging my pr, they created one of their own. It was merged yesterday

On Tue, Jul 14, 2020, 14:20 stuspethln notifications@github.com wrote:

In looking at that PR I don't see that it is completed yet, nor do I see a PR into a release. Is there a guide or something about how I can load changes from a feature branch into a build agent in my local environment?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/azure-pipelines-tasks/issues/13259#issuecomment-658336104, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEANPTNIZC2NLTHY53WKATR3SOVPANCNFSM4OWZCIRQ .

stuspethln commented 4 years ago

ah sweet, everything is copacetic again with version 0.172.3. Thank you both

anatolybolshakov commented 4 years ago

Hi everyone! I'm closing this issue since it's resolved