-
Notifications
You must be signed in to change notification settings - Fork 262
MGMT-24155: Use LVM operator instead of LSO for CNV dependency #10285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,30 +67,30 @@ func (o *operator) GetFullName() string { | |
|
|
||
| // GetDependencies provides a list of dependencies of the Operator | ||
| func (o *operator) GetDependencies(cluster *common.Cluster) ([]string, error) { | ||
| lsoOperator := []string{lso.Operator.Name} | ||
| lvmOperator := []string{lvm.Operator.Name} | ||
|
|
||
| // Disable lso for ARM deployment as it's not supported | ||
| // to allow CNV ARM operator | ||
| if cluster.CPUArchitecture == common.ARM64CPUArchitecture || cluster.CPUArchitecture == common.MultiCPUArchitecture { | ||
| return make([]string, 0), nil | ||
| if !featuresupport.IsFeatureCompatibleWithArchitecture(models.FeatureSupportLevelIDLVM, cluster.OpenshiftVersion, cluster.CPUArchitecture) { | ||
| return []string{}, nil | ||
| } | ||
|
|
||
| if cluster.OpenshiftVersion == "" { | ||
| return lsoOperator, nil | ||
| return []string{lvm.Operator.Name}, nil | ||
| } | ||
|
|
||
| // SNO | ||
| if common.IsSingleNodeCluster(cluster) { | ||
| if isGreaterOrEqual, _ := common.BaseVersionGreaterOrEqual(lvm.LvmsMinOpenshiftVersion4_12, cluster.OpenshiftVersion); isGreaterOrEqual { | ||
| return lvmOperator, nil | ||
| if isSupported, _ := common.BaseVersionGreaterOrEqual(lvm.LvmsMinOpenshiftVersion4_12, cluster.OpenshiftVersion); isSupported { | ||
| return []string{lvm.Operator.Name}, nil | ||
| } | ||
| return []string{lso.Operator.Name}, nil | ||
| } | ||
|
|
||
| if isSupported, _ := common.BaseVersionGreaterOrEqual(lvm.LvmMinMultiNodeSupportVersion, cluster.OpenshiftVersion); isSupported { | ||
| return []string{lvm.Operator.Name}, nil | ||
| } | ||
| return lsoOperator, nil | ||
|
|
||
| return []string{lso.Operator.Name}, nil | ||
|
shay23bra marked this conversation as resolved.
|
||
| } | ||
|
|
||
| func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID { | ||
| return []models.FeatureSupportLevelID{models.FeatureSupportLevelIDLSO, models.FeatureSupportLevelIDLVM} | ||
| return []models.FeatureSupportLevelID{models.FeatureSupportLevelIDLVM} | ||
| } | ||
|
Comment on lines
92
to
94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Find how GetDependenciesFeatureSupportID is used to understand if this inconsistency matters
rg -n "GetDependenciesFeatureSupportID" --type=go -C5Repository: openshift/assisted-service Length of output: 34862 🏁 Script executed: sed -n '60,95p' internal/operators/cnv/cnv_operator.goRepository: openshift/assisted-service Length of output: 1261 Add
Update line 93 to: return []models.FeatureSupportLevelID{models.FeatureSupportLevelIDLVM, models.FeatureSupportLevelIDLSO}🤖 Prompt for AI Agents |
||
|
|
||
| // GetClusterValidationIDs returns cluster validation IDs for the Operator | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If LVM not supported, return no dependencies? Isn't this contradicting
For older versions that didn’t have LVM - multi-node OCP < 4.15 and SNO < 4.12, the existing LSO dependency is preserved as a fallback since LVM is not supported for those configurations.or am I reading it wrong?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, it's architecture specific 😅
sorry