Created attachment 777830 [details] Engine log Description of problem: Adding the same host with public key works through the UI while it fails when invoked by the REST PAI Version-Release number of selected component (if applicable): 3.3 How reproducible: 100% Steps to Reproduce: 1. add server public key to hosts authorized_keys 2. call for post to /api/hosts with xml : <host> <cluster href="/api/clusters/INSERTID" id="INSERTID"/> <name>bla</name> <address>INSERT IP</address> <root_password>1</root_password> <ssh> <port>22</port> <authentication_type>publickey</authentication_type> </ssh> </host> Actual results: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <fault> <reason>Operation Failed</reason> <detail>[var action add, var type host, vds cannot authenticate to server]</detail> </fault> Expected results: Hosts added successfully Additional info: In the log it seems as if the engine tries to connect with password and not public key: "Failed to authenticate session with host bla: javax.naming.AuthenticationException: SSH authentication to 'root.1.17' failed make sure host is configured for password authenticatio" log attached
<authentication_type>publickey</authentication_type> is unknown field, <authentication_method> should be used.. the question is why Noam decided to use authentication_type instead. Might be that I wrote it somewhere and it's misleading the user. If someone bumps into such usage please let me know. The full description described here: http://www.ovirt.org/Features/Ssh_Abilities When the authentication method is not provided the default is to use password authentication, that's the reason for the printed error.