Can you make sure that the SSH key is configured properly and authorized in the host?
On Mon, Dec 13, 2021 at 10:19 PM Grace Chen <hippoq...@gmail.com> wrote: > Hi Saif, > I added it but got this error: > ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is > "[Cannot add Host. Connecting to host via SSH has failed, verify that the > host is reachable (IP address, routable address etc.) You may refer to the > engine.log file for further details.]". HTTP response code is 409. > > On Thu, Dec 9, 2021 at 5:53 AM Saif Abu Saleh <sabus...@redhat.com> wrote: > >> Hi, >> >> Can you try the following below? >> >> ssh_key = types.Ssh(public_key=my_ssh_key_string, >> authentication_method=types.SshAuthenticationMethod('publickey')) >> host = hosts_service.add_using_ssh( >> types.Host( >> name=name, >> description='', >> address=address, >> port=22, >> ssh=ssh_key, >> cluster=types.Cluster( >> name=cluster, >> ), >> ), >> ) >> >> >> >> Thanks, >> Saif >> >> On Wed, Dec 8, 2021 at 6:28 PM Grace Chen <hippoq...@gmail.com> wrote: >> >>> I am writing a script to create a host using public ssh key >>> the function I am using is add_using_ssh: >>> my ssh_key is a an Ssh type already >>> ssh_key = types.Ssh(public_key=my_ssh_key_string) >>> >>> host = hosts_service.add_using_ssh( >>> types.Host( >>> name=name, >>> description='', >>> address=address, >>> root_password=None, >>> port=22, >>> ssh=ssh_key, >>> cluster=types.Cluster( >>> name=cluster, >>> ), >>> ), >>> ) >>> When I choose from GUI, it doesn't ask me to put in root password, so I >>> set it as None (Not sure if this is correct) >>> >>> I got error: >>> ovirtsdk4.Error: Fault reason is "Request syntactically incorrect.". >>> Fault detail is "For correct usage, see: >>> ovirt-engine/apidoc#services/hosts/methods/add". HTTP response code is 400. >>> >>> looks like I didn't get all the parameters assigned? >>> Can anybody help with this? >>> >>> >>> _______________________________________________ >>> Devel mailing list -- devel@ovirt.org >>> To unsubscribe send an email to devel-le...@ovirt.org >>> Privacy Statement: https://www.ovirt.org/privacy-policy.html >>> oVirt Code of Conduct: >>> https://www.ovirt.org/community/about/community-guidelines/ >>> List Archives: >>> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/MWDE4JADQRXCGYBH53BGJJTHCCU4H5UV/ >>> >>
_______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/UE7JLO2HCM4S5JMSYZLK7RAXOTUMOCHD/