nova-cloud-controller not pushes ssh keys

Bug #1859050 reported by Michał Ajduk
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Fix Released
Critical
Alex Kavanagh

Bug Description

In some situations nova cloud controller never pushes SSH keys for live migration.

https://github.com/openstack/charm-nova-cloud-controller/blob/master/hooks/nova_cc_hooks.py#L702

Method _goal_state_achieved_for_relid always return false if units_so_far and all_units are out of order.

Example:
units_so_far = ['nova-compute/0', 'nova-compute/1', 'nova-compute/2', 'nova-compute/3', 'nova-compute/4', 'nova-compute/5', 'nova-compute/6']

target_units = ['nova-compute/3', 'nova-compute/2', 'nova-compute/5', 'nova-compute/0', 'nova-compute/6', 'nova-compute/4', 'nova-compute/1']

This returns false here:
https://github.com/openstack/charm-nova-cloud-controller/blob/master/hooks/nova_cc_hooks.py#L741

However there are 7 units required and 7 units present so the goal state is reached.

Michał Ajduk (majduk)
description: updated
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Michael, thanks for the bug report, and an extremely good catch there! I'll put together a patch for this.

Changed in charm-nova-cloud-controller:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Alex Kavanagh (ajkavanagh)
Revision history for this message
Michał Ajduk (majduk) wrote :

I've submitted patch already:
https://review.opendev.org/701804

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (master)

Fix proposed to branch: master
Review: https://review.opendev.org/701805

Changed in charm-nova-cloud-controller:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-nova-cloud-controller (master)

Change abandoned by Michal Ajduk (<email address hidden>) on branch: master
Review: https://review.opendev.org/701804
Reason: This overlaps with 701805

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (stable/19.10)

Fix proposed to branch: stable/19.10
Review: https://review.opendev.org/701927

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.opendev.org/701805
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=0db6d59353ff34ca7c655214d17a2a790f77e377
Submitter: Zuul
Branch: master

commit 0db6d59353ff34ca7c655214d17a2a790f77e377
Author: Alex Kavanagh <email address hidden>
Date: Thu Jan 9 18:42:57 2020 +0000

    Fix _goal_state_achieved_for_relid() with unsorted lists

    Essentially, the functions returning the related units and expected
    units (for goal state) might not be sorted, something the author of
    the code (me) hadn't taken into account. This fixes that by comparing
    sorted lists.

    Change-Id: I5c7bfe39b80f103e95fd5105d2185a89975ec23c
    Closes-bug: #1859050

Changed in charm-nova-cloud-controller:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (stable/19.10)

Reviewed: https://review.opendev.org/701927
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=ab75b539ab7623312f56a55599dcab2fc943233f
Submitter: Zuul
Branch: stable/19.10

commit ab75b539ab7623312f56a55599dcab2fc943233f
Author: Alex Kavanagh <email address hidden>
Date: Thu Jan 9 18:42:57 2020 +0000

    Fix _goal_state_achieved_for_relid() with unsorted lists

    Essentially, the functions returning the related units and expected
    units (for goal state) might not be sorted, something the author of
    the code (me) hadn't taken into account. This fixes that by comparing
    sorted lists.

    Change-Id: Id6ca9fc756b0ef18d00863fa4641ab1c244db939
    Closes-bug: #1859050

James Page (james-page)
Changed in charm-nova-cloud-controller:
milestone: none → 20.02
Liam Young (gnuoy)
Changed in charm-nova-cloud-controller:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.