Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gschueler opened this issue Jun 23, 2012 · 2 comments
Closed
Labels
Milestone

Comments

@gschueler
Copy link
Member

  • 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.

original LH ticket

Original Creator: Dave Carey

@ghost ghost assigned gschueler Jun 23, 2012
@ralph-tice
Copy link

I also have this problem, because all my nodes come out of the ec2 plugin and i have spaces in my node names there.

@haimari
Copy link

haimari commented Nov 25, 2015

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants