Data migration in the system controller will fail if there is an unmanaged subcloud

Bug #1883458 reported by Tee Ngo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Tee Ngo

Bug Description

Brief Description
-----------------
There is a code flaw in the data migration script 50-dcmanager-subcloud-status-migration.py that can fail data migration to 20.06 in the system controller if there is a subcloud that has never been managed.

Severity
--------
Major

Steps to Reproduce
------------------
Bring up a 20.01 distributed cloud
Add a couple of subclouds without managing them
Perform upgrade of the system controller to 20.06

Expected Behavior
------------------
System Controller upgrade to 20.06 completes successfully

Actual Behavior
----------------
System Controller failed during the data migration step as subcloud load status records, which are created based on the data of patch status records, failed to be inserted when patch updated_at field is empty.

Reproducibility
---------------
100% reproducible

System Configuration
--------------------
Distributed Cloud

Branch/Pull Time/Commit
-----------------------
June 6th master load

Last Pass
---------
First time this was tested with subclouds that have never been managed. This is not a typical use case in production but is a legitimate one nonetheless.

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Developer Testing of another feature

Workaround
----------

Tee Ngo (teewrs)
Changed in starlingx:
assignee: nobody → Tee Ngo (teewrs)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

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

Changed in starlingx:
status: New → In Progress
Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.4.0 / high priority - issue related to system upgrades, an stx.4.0 prep feature

summary: - Data migration to 20.06 in the system controller will fail if there is
- an unmanaged subcloud
+ Data migration in the system controller will fail if there is an
+ unmanaged subcloud
description: updated
tags: added: stx.4.0 stx.distcloud stx.update
Changed in starlingx:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/735487
Committed: https://git.openstack.org/cgit/starlingx/config/commit/?id=fa6d877289b073137f9b7e4736b23070a0d3807c
Submitter: Zuul
Branch: master

commit fa6d877289b073137f9b7e4736b23070a0d3807c
Author: Tee Ngo <email address hidden>
Date: Sun Jun 14 21:02:24 2020 -0400

    Fix subcloud status migration script

    If a system controller upgrade is performed when there is at least one
    subcloud that has never been managed, data migration will fail due to
    type mismatch. This is because the empty updated_at field of the
    patching status record that is used to create the load status
    record for the subcloud results in a "None" value used for the sql insert.
    This commit resolves the issue.

    Closes-Bug: 1883458
    Change-Id: Idbe636c26f66f00725b48f935fac0a1d1cf44a89
    Signed-off-by: Tee Ngo <email address hidden>

Changed in starlingx:
status: In Progress → 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.