When only Cinder overrides enable netapp-nfs in a mixed-backend
environment, the reapply semantic check resolves the target
StorageClass for mariadb and rabbitmq using the default Cinder chart
context. This makes the lifecycle code believe those StatefulSets are
switching from "general" to "netapp-nas-backend", even though their
own configuration did not change, and application-apply is rejected.
Fix the semantic check to fetch available volume backends using the
owning chart context for mariadb and rabbitmq before comparing the
current PVC StorageClass with the selected backend. Add a unit test
covering the chart-specific lookup so a Cinder-only override cannot
reintroduce this false migration error.
Test Plan:
[PASS] Build stx-o tarball
Validation with Cinder/MariaDB netapp-nfs override (AIO-SX):
[PASS] Apply using Cinder Volumes and MariaDB with NetApp NFS
[PASS] Reapply not blocked after changing Cinder Volumes to NetApp iSCSI
[PASS] Reapply blocked after changing MariaDB to NetApp iSCSI
[PASS] verify mariadb and rabbitmq PVCs remain on StorageClass
"netapp-nfs"
Closes-bug: 2146600
Change-Id: Id16dcf2a8de588a708a8005db8767a06a0638590
Signed-off-by: Luis Henrique Silva Cazuriaga <LuisHenrique.SilvaCazuriaga@windriver.com>