Comment 2 for bug 1950512

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

Reviewed: https://review.opendev.org/c/starlingx/distcloud/+/817807
Committed: https://opendev.org/starlingx/distcloud/commit/20ddd891a8532279269e93282a9dd88e43043d26
Submitter: "Zuul (22348)"
Branch: master

commit 20ddd891a8532279269e93282a9dd88e43043d26
Author: Yuxing Jiang <email address hidden>
Date: Fri Nov 12 13:56:03 2021 -0500

    Validate sw version and image in install values

    During a redfish remote installation on a BMC configured subcloud, we
    want to use the active load stored in dc-vault in to save the space in
    the root partition of the system controllers. And if the "image" value
    is not offered, we are referencing the active load in dc-vault. We
    still want to allow the users to download an image from the network
    from a specified path and software version. But it is not ensured to
    success as not covered by tests.

    This commit adds the validation if we want to reference the active
    load, to ensure we only accept the active software version in the
    install values when referencing it. After this change, if the image
    was not offered and the software version was not the active version, a
    subcloud installation will be aborted, and an error message will be
    prompted to indicate the error in install values.

    Tests:
    Happy paths:
    1. Subcloud installation with correct image path and the active
    software version.
    2. Subcloud installation with correct active software version but no
    image path.
    3. Subcloud installation with specified image path and software
    version different from the active version.
    4. Subcloud install values update with correct image path and the
    active software version.
    5. Subcloud install values update with orrect active software version
    but no image path.
    6. Subcloud install values update specified image path and software
    version different from the active version.
    7. Subcloud install values update with existing data install in DB.
    8. Subcloud install values update without existing data install in DB.

    Unhappy paths:
    1. Subcloud installation with a software version different from the
    active version but without the image path.
    2. Subcloud install values update with a software version different
    from the active version but without the image path.
    3. Subcloud install values update without the bmc address.

    Closes-bug: 1950512

    Signed-off-by: Yuxing Jiang <email address hidden>
    Change-Id: I99409616557de580054f3f88e16c4c930ebe9a24