Skip to content
Snippets Groups Projects
  • manish.mishra's avatar
    6720c2b3
    migration: check magic value for deciding the mapping of channels · 6720c2b3
    manish.mishra authored
    
    Current logic assumes that channel connections on the destination side are
    always established in the same order as the source and the first one will
    always be the main channel followed by the multifid or post-copy
    preemption channel. This may not be always true, as even if a channel has a
    connection established on the source side it can be in the pending state on
    the destination side and a newer connection can be established first.
    Basically causing out of order mapping of channels on the destination side.
    Currently, all channels except post-copy preempt send a magic number, this
    patch uses that magic number to decide the type of channel. This logic is
    applicable only for precopy(multifd) live migration, as mentioned, the
    post-copy preempt channel does not send any magic number. Also, tls live
    migrations already does tls handshake before creating other channels, so
    this issue is not possible with tls, hence this logic is avoided for tls
    live migrations. This patch uses read peek to check the magic number of
    channels so that current data/control stream management remains
    un-effected.
    
    Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
    Reviewed-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
    Suggested-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Signed-off-by: default avatarmanish.mishra <manish.mishra@nutanix.com>
    Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
    6720c2b3
    History
    migration: check magic value for deciding the mapping of channels
    manish.mishra authored
    
    Current logic assumes that channel connections on the destination side are
    always established in the same order as the source and the first one will
    always be the main channel followed by the multifid or post-copy
    preemption channel. This may not be always true, as even if a channel has a
    connection established on the source side it can be in the pending state on
    the destination side and a newer connection can be established first.
    Basically causing out of order mapping of channels on the destination side.
    Currently, all channels except post-copy preempt send a magic number, this
    patch uses that magic number to decide the type of channel. This logic is
    applicable only for precopy(multifd) live migration, as mentioned, the
    post-copy preempt channel does not send any magic number. Also, tls live
    migrations already does tls handshake before creating other channels, so
    this issue is not possible with tls, hence this logic is avoided for tls
    live migrations. This patch uses read peek to check the magic number of
    channels so that current data/control stream management remains
    un-effected.
    
    Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
    Reviewed-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
    Suggested-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Signed-off-by: default avatarmanish.mishra <manish.mishra@nutanix.com>
    Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>