[ https://issues.apache.org/jira/browse/DTACLOUD-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13576205#comment-13576205 ]
Ronelle Landy commented on DTACLOUD-458: ---------------------------------------- This seems to work for XML output (200 returned) but not for JSON (406 returned): >> curl -v -X POST --user "un:pw5" -F "cmd=uname -a; ls -l" -F >> "private_key=`cat <location to key>`" -F "username=ec2-user" >> "http://cloud-qe-3.idm.lab.bos.redhat.com:3006/api/instances/i-79cbfa09/run?format=xml" * Done waiting for 100-continue < HTTP/1.1 200 OK < Content-Type: application/xml < Date: Mon, 11 Feb 2013 23:16:28 GMT < Content-Length: 395 < X-Deltacloud-Driver: ec2 < Cache-Control: max-age=0, private, must-revalidate < ETag: fefe7a0193c2c58f37c0f76bf4a3cd2f < Server: Apache-Deltacloud/1.1.0 < Connection: keep-alive < <instance href='http://cloud-qe-3.idm.lab.bos.redhat.com:3006/api/instances/i-79cbfa09' id='i-79cbfa09'> <public_address> ec2-204-236-242-72.compute-1.amazonaws.com </public_address> <command> uname -a; ls -l </command> <output>Linux ip-10-110-39-106 2.6.34.7-56.40.amzn1.x86_64 #1 SMP Fri Oct 22 18:48:49 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux total 0</output> </instance> * Connection #0 to host cloud-qe-3.idm.lab.bos.redhat.com left intact * Closing connection #0 >> curl -v -X POST --user "un:pw" -F "cmd=uname -a; ls -l" -F >> "private_key=`cat <location to key>`" -F "username=ec2-user" >> "http://cloud-qe-3.idm.lab.bos.redhat.com:3006/api/instances/i-79cbfa09/run?format=json" * Done waiting for 100-continue < HTTP/1.1 406 Not Acceptable < X-XSS-Protection: 1; mode=block < Content-Type: text/html;charset=utf-8 < X-Content-Type-Options: nosniff < Date: Mon, 11 Feb 2013 23:20:07 GMT < Content-Length: 0 < X-Frame-Options: SAMEORIGIN < X-Deltacloud-Driver: ec2 < Server: Apache-Deltacloud/1.1.0 < Connection: keep-alive < * Connection #0 to host cloud-qe-3.idm.lab.bos.redhat.com left intact > When sending a 'run on instance' request, the user should be able to specify > the username > ----------------------------------------------------------------------------------------- > > Key: DTACLOUD-458 > URL: https://issues.apache.org/jira/browse/DTACLOUD-458 > Project: DeltaCloud > Issue Type: Bug > Environment: Latest Deltacloud version from GitHub repository. EC2 > driver. > Reporter: Enrique Fernandez Casado > Assignee: Michal Fojtik > Attachments: > 0001-Allows-to-specify-a-username-when-running-a-comman-D.patch > > > When sending a 'run on instance' request, Deltacloud (or the EC2 driver) > seems to have the 'root' user hardcoded. The end-user should be able to > specify the username he wants to remotely execute the command as (e.g. -F > "username=<username>" using CURL). > https://github.com/apache/deltacloud/blob/master/server/lib/deltacloud/drivers/ec2/ec2_driver.rb#L305 > 'root' is not the default user for Linux instances any more. It is actually > quite common to find Linux instances where the 'ec2-user' user is required. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira