#569 new
Dave Carey

scp: ambiguous target - for Job with script referencing a node with a space

Reported by Dave Carey | May 8th, 2012 @ 02:28 AM

  • Issue Type: Bug
  • Rundeck version: 1.4.2.1
  • JDK Version: 1.6.0_26
  • Server OS: Linux - Red-Hat Enterprise
    • Install type: Jar

Issue:

A job which uses an inline script as part of a workstep will fail where the specified node has a space in it.
The Job was within a project configured to use the Default "SCP File Copier" and the Default "SSH Node Executor"

In the case of the reportee the issue manifested as the following error in the job log:-
"Caused by: server indicated an error: scp: ambiguous target"

I had stripped the script down so that it was no more than an echo and I'd run adhoc commands against the same node filter without issue. This determined that is was a particular problem with an in-line script within a job workstep.

By debugging using the 'Stub File Copier and Node Executor' i was able to see the cause of the problem as the following
"[stub] execute on node Churchill Build: /tmp/1336199783131-Churchill Build-stub-script.sh"

Notice the " " between 'Churchill' and 'Build'

i.e. A node name had been configured with a logical name of 'Churchill Build'. The workaround is to ensure no spaces in node-names However this is a bug, so hence raising this ticket.

Per discussion with Moses on the RunDesk forum:- (thanks for assistance in diagnosing the cause as well)

Dave, the fact that the space isn't escaped or otherwise mangled is probably a bug. Could you file it? Thanks.

Generally, people use the FQDN of the node's hostname for the node name, which is probably why no one ran into this before. The only big exception is when you have two logical nodes pointing to e.g. the same host but different usernames-- people usually use the format user@hostname for those cases.

Reproduce: (Describe steps to reproduce bug here.) * Set up a node name with a space in it. See example resources file attached * Create a job with a simple in-line script. (whoami is sufficient) * Execute on the node with the space in it.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues

Shared Ticket Bins

People watching this ticket

Attachments

Pages