AnsweredAssumed Answered

UCS Director SSH Command and Input Variable Issue

Question asked by Jeremy Waldrop on Nov 20, 2014
Latest reply on Nov 24, 2014 by michzimm

I am having an issue with issuing cmds to a Linux host when there are variables in the cmd string. Here is my command

 

cd /opt/Navisphere/bin

echo ./naviseccli -h 10.1.32.51 storagegroup -addhlu -gname ${Host Name} -hlu 100 -alu 100 > test.log

 

If I don't use a variable the test.log file is created with the text. Is there a trick to using variables with SSH cmds?

 

I am trying to echo the text into a new file named test.log but it doesn't work. The log from the task looks like this

 

Service Request ID: 192

Workflow Inputs:

- Host Name

 

 

 

 

Nov 20, 2014 16:57:24 UTC Request submitted

Nov 20, 2014 16:57:27 UTC Executing workflow item number 1

Nov 20, 2014 16:57:27 UTC Completed workflow item number 1, with status Completed

Nov 20, 2014 16:57:33 UTC Executing workflow item number 2

Nov 20, 2014 16:57:33 UTC Trigger context executeWorkFlowStep called

Nov 20, 2014 16:57:33 UTC Executing custom action SSH-TEST (SSH Command)

Nov 20, 2014 16:57:33 UTC Executing custom action SSH-TEST (SSH Command)

Nov 20, 2014 16:57:34 UTC Successfully connected, now executing command on device 10.1.32.249

Nov 20, 2014 16:57:39 UTC now executing command cd /opt/Navisphere/bin

Nov 20, 2014 16:57:41 UTC now executing command echo ./naviseccli -h 10.1.32.51 storagegroup -addhlu -gname test1234 -hlu 100 -alu 100 > test.log

Nov 20, 2014 16:57:41 UTC Command execution on device 10.1.32.249 completed .

Nov 20, 2014 16:57:41 UTC

Nov 20, 2014 16:57:41 UTC Task #1 (SSH-TEST (SSH Command)) completed successfully in 8 seconds

Nov 20, 2014 16:57:41 UTC Input/Output values for Task #1 (SSH-TEST (SSH Command)):

Nov 20, 2014 16:57:41 UTC [Local Input: Host IP Address = 10.1.32.249]

Nov 20, 2014 16:57:41 UTC [Local Input: Login = root]

Nov 20, 2014 16:57:41 UTC [Local Input: Password = **masked-value**]

Nov 20, 2014 16:57:41 UTC [Template Input:Command = cd /opt/Navisphere/bin echo ./naviseccli -h 10.1.32.51 storagegroup -addhlu -gname ${Host Name} -hlu 100 -alu 100 > test.log ]

Nov 20, 2014 16:57:41 UTC [Resolved Template Input: Command = cd /opt/Navisphere/bin echo ./naviseccli -h 10.1.32.51 storagegroup -addhlu -gname test1234 -hlu 100 -alu 100 > test.log ]

Nov 20, 2014 16:57:41 UTC [Local Input: Command = cd /opt/Navisphere/bin echo ./naviseccli -h 10.1.32.51 storagegroup -addhlu -gname test1234 -hlu 100 -alu 100 > test.log ]

Nov 20, 2014 16:57:41 UTC [Local Input: Error Text = ]

Nov 20, 2014 16:57:41 UTC [Local Input: Undo Command = ]

Nov 20, 2014 16:57:41 UTC [Local Input: Error Text[Undo] = ]

Nov 20, 2014 16:57:41 UTC [Output: OUTPUT_SSH_COMMAND = ]

Nov 20, 2014 16:57:41 UTC Completed workflow item number 2, with status Completed

Nov 20, 2014 16:57:45 UTC Executing workflow item number 3

Nov 20, 2014 16:57:45 UTC Completed workflow item number 3, with status Completed

Outcomes