Uploaded image for project: 'FreeNAS / TrueNAS'
  1. FreeNAS / TrueNAS
  2. NAS-108234

Replication tasks created with API generated key pairs fail to authenticate

    XMLWordPrintable

    Details

      Description

      The vCenter plugin creates replication tasks using the API. It first generates a Key, creates an SSH Key Pair with that key, then creates an SSH Connection, the finally creates a Replication task with this connection. All API commands succeed and the task is sucessfully created, which can be validated by the UI. However, the task fails due to an authentication error as follows:

      [2020/11/05 09:23:36] INFO     [Thread-9] [zettarepl.paramiko.replication_task__task_6] Connected (version 2.0, client OpenSSH_8.3p1)
      [2020/11/05 09:23:36] INFO     [Thread-9] [zettarepl.paramiko.replication_task__task_6] Authentication (publickey) failed.
      [2020/11/05 09:23:36] ERROR    [replication_task__task_6] [zettarepl.replication.run] For task 'task_6' non-recoverable replication error ReplicationError('Authentication failed.')

      A workaround is to create a new SSH Key Pair from the UI, then assign that key pair to the API generated SSH Connection. The task will succeed. Regenerating the SSH Key Pair created from the API will not work. Neither will rediscovering the public key for the connection and key pair.

       

      Attached is the API call for a functional and non functional task/connection, the functional being copied from the one starting with "vcenter_".

        Attachments

        1. debug-truenas-20201109085327.tgz
          288 kB
          Zack Welch
        2. repls
          10 kB
          Zack Welch

          Attachments

            JEditor

              Issue Links

                Activity

                  People

                  Assignee:
                  releng Release Council
                  Reporter:
                  zwelch Zack Welch
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved: