build-tools: similar minikube profile names conflict

Bug #1995400 reported by Davlet Panech
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Davlet Panech

Bug Description

Brief Description
-----------------
StarlingX Debian build tools can't handle Minikube profiles & possibly helm chart installations that are too similar to each other. The scripts use substring matching eg when trying to determine whether a minikube profile already exists, such searching falsely succeeds if one profile is a substring of another.

Possible culprits
------------------
https://opendev.org/starlingx/tools/src/commit/80e0d7b82827825a16ee982bf324bc7148998367/stx-init-env#L68
https://opendev.org/starlingx/tools/src/commit/80e0d7b82827825a16ee982bf324bc7148998367/stx-init-env#L87

** There may be other similar problems **

Severity
--------
Major

Steps to reproduce
------------------
I don't have the exact steps, but roughly:

1) Clone two copies of stx-tools
2) Set them up to use profile names ("MINIKUBENAME") such that one is a substring of the other. Eg "stx" and "stx1"

Expected Behavior
------------------
Environment management scripts must not interfere with each other between the 2 environments.

Also: I suspect helm charts get installed globally (?), rather than inside a particular minikube profile. Double check.

Actual Behavior
---------------
Environments interfere with each other.

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Debian

Branch/Pull Time/Commit
-----------------------
master/2022-11-01

Last Pass
---------
Never

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

Test Activity
-------------
N/A

Ghada Khalil (gkhalil)
tags: added: stx.build
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tools (master)

Reviewed: https://review.opendev.org/c/starlingx/tools/+/894220
Committed: https://opendev.org/starlingx/tools/commit/f44dfffbe5ae4b2b454bee99ffba0c8f4bc9816b
Submitter: "Zuul (22348)"
Branch: master

commit f44dfffbe5ae4b2b454bee99ffba0c8f4bc9816b
Author: Willy Njomen <email address hidden>
Date: Wed Sep 20 13:00:33 2023 -0400

    Updated minikube profile name

    I fixed the issue with minikube_started() and helm_started() where the
    grep command was not grepping the correct docker image and helm chart
    due to matching substring. It was solved using helm ls command and the
    option --kube-context when minikube eixist to pass minikube profile
    and helm ls with the option --namespace when minikube is not exist.

    TESTS
    ========================================

    * setup a use profile names "MINIKUBENAME" Eg "stx" and "stx1"
    * setup a similar environment to reproduce the issue

    Closes-Bug: 1995400
    Change-Id: Ic9b2224240e0e02be30957a96e7deb24da122136
    Signed-off-by: Willy Njomen <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → High
tags: added: stx.9.0
Changed in starlingx:
assignee: nobody → Davlet Panech (dpanech)
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.