assisted-service
assisted-service copied to clipboard
ECOPROJECT-2080: Add MTV operator as an option to cluster post installation
This PR adds an option to install Migration Toolkit for Virtualization.
Resolves: https://issues.redhat.com/browse/ECOPROJECT-2080
Signed-off-by: Cosmin Tupangiu [email protected]
Hi @tupyy. Thanks for your PR.
I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/retitle ECOPROJECT-2080: Add MTV operator as an option to cluster post installation
@tupyy: This pull request references ECOPROJECT-2080 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.
In response to this:
This PR adds an option to install Migration Toolkit for Virtualization.
Resolves: https://issues.redhat.com/browse/ECOPROJECT-2080
Signed-off-by: Cosmin Tupangiu [email protected]
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
/test edge-unit-test /test edge-lint /test edge-images
Codecov Report
Attention: Patch coverage is 74.71264% with 44 lines in your changes missing coverage. Please review.
Project coverage is 68.74%. Comparing base (
26185f1) to head (67bbb13). Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #6711 +/- ##
==========================================
+ Coverage 68.71% 68.74% +0.03%
==========================================
Files 249 251 +2
Lines 37440 37611 +171
==========================================
+ Hits 25727 25857 +130
- Misses 9414 9443 +29
- Partials 2299 2311 +12
| Files with missing lines | Coverage Δ | |
|---|---|---|
| internal/cluster/statemachine.go | 99.64% <100.00%> (+<0.01%) |
:arrow_up: |
| internal/cluster/validation_id.go | 92.30% <100.00%> (ø) |
|
| internal/featuresupport/feature_support_level.go | 96.49% <ø> (ø) |
|
| internal/featuresupport/features_platforms.go | 92.73% <100.00%> (+0.64%) |
:arrow_up: |
| internal/host/statemachine.go | 100.00% <100.00%> (ø) |
|
| internal/host/validation_id.go | 90.90% <100.00%> (ø) |
|
| internal/operators/builder.go | 100.00% <100.00%> (ø) |
|
| internal/featuresupport/features_olm_operators.go | 88.43% <85.71%> (-0.53%) |
:arrow_down: |
| internal/operators/mtv/manifest.go | 73.91% <73.91%> (ø) |
|
| internal/operators/mtv/operator.go | 69.89% <69.89%> (ø) |
/test
@tupyy: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.
In response to this:
/test
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
@eifrach Thank you for the review. I've done the fixes. PTAL
@eifrach PTAL
/test edge-unit-test /test edge-lint /test edge-images
some validation tests:
# listing all operators
$ curl -s 'http://rdu-infra-edge-02.infra-edge.lab.eng.rdu2.redhat.com:8090/api/assisted-install/v2/supported-operators' | jq .
[
"odf",
"cnv",
"lvm",
"mce",
"mtv",
"lso"
]
Check support level on version and arch
> curl -s 'http://rdu-infra-edge-02.infra-edge.lab.eng.rdu2.redhat.com:8090/api/assisted-install/v2/support-levels/features?openshift_version=4.13&cpu_architecture=arm64' | jq '.features | { MTV: .MTV, CNV: .CNV}'
{
"MTV": "unavailable",
"CNV": "unavailable"
}
> curl -s 'http://rdu-infra-edge-02.infra-edge.lab.eng.rdu2.redhat.com:8090/api/assisted-install/v2/support-levels/features?openshift_version=4.13&cpu_architecture=x86_64' | jq '.features | { MTV: .MTV, CNV: .CNV}'
{
"MTV": "unavailable",
"CNV": "supported"
}
> curl -s 'http://rdu-infra-edge-02.infra-edge.lab.eng.rdu2.redhat.com:8090/api/assisted-install/v2/support-levels/features?openshift_version=4.16&cpu_architecture=x86_64' | jq '.features | { MTV: .MTV, CNV: .CNV}'
{
"MTV": "supported",
"CNV": "supported"
}
> curl -s 'http://rdu-infra-edge-02.infra-edge.lab.eng.rdu2.redhat.com:8090/api/assisted-install/v2/support-levels/features?openshift_version=4.16&cpu_architecture=arm64' | jq '.features | { MTV: .MTV, CNV: .CNV}'
{
"MTV": "supported",
"CNV": "dev-preview"
}
adding MTV to a cluster with CNV
curl -X 'PATCH' \
'http://rdu-infra-edge-02.infra-edge.lab.eng.rdu2.redhat.com:8090/api/assisted-install/v2/clusters/b58b02f5-1311-4b5b-baa7-a7846cd90d27' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"olm_operators": [ {"name": "mtv"}]}' | jq .
# validate the operator was added
> curl -s "http://rdu-infra-edge-02.infra-edge.lab.eng.rdu2.redhat.com:8090/api/assisted-install/v2/clusters/b58b02f5-1311-4b5b-baa7-a7846cd90d27/monitored-operators?operator_name=mtv" | jq .
[
{
"cluster_id": "b58b02f5-1311-4b5b-baa7-a7846cd90d27",
"name": "mtv",
"namespace": "openshift-mtv",
"operator_type": "olm",
"status_updated_at": "0001-01-01T00:00:00.000Z",
"subscription_name": "mtv-operator",
"timeout_seconds": 3600
}
]
preflight requirements
> curl -s "http://rdu-infra-edge-02.infra-edge.lab.eng.rdu2.redhat.com:8090/api/assisted-install/v2/clusters/5ba559dc-202f-4ebe-96de-c278f3e4da92/preflight-requirements"
{
"dependencies": [
"cnv"
],
"operator_name": "mtv",
"requirements": {
"master": {
"qualitative": [
"400 MiB of additional RAM",
"1 additional CPUs"
],
"quantitative": {
"cpu_cores": 1,
"ram_mib": 400
}
},
"worker": {
"qualitative": null,
"quantitative": {}
}
}
},
tested manual on compact Cluster
> oc --kubeconfig kubeconfig get clusterversions.config.openshift.io
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
version 4.16.9 True False 4m56s Cluster version is 4.16.9
> oc --kubeconfig kubeconfig get subscriptions.operators.coreos.com -A
NAMESPACE NAME PACKAGE SOURCE CHANNEL
openshift-cnv hco-operatorhub kubevirt-hyperconverged redhat-operators stable
openshift-mtv mtv-operator mtv-operator redhat-operators
openshift-storage lvms-operator lvms-operator redhat-operators
> oc --kubeconfig kubeconfig get operators
NAME AGE
kubevirt-hyperconverged.openshift-cnv 31m
lvms-operator.openshift-storage 31m
mtv-operator.openshift-mtv 31m
/ok-to-test
looks good to me, give me a few I'll merge it
@tupyy Hey, I think we need to need to split these changes to more than one PR. We should have an epic which specifies the different tasks we should do to get the extra operator in assisted service, for example:
- Add the necessary changes in assisted-test-infra (test env for this repo)
- Adding a CI job that tests it (using test-infra)
- Add feature flags
- more.
It would be great to have a doc explaining what are changes are we performing and why (the Jira issue doesn't explain much) for clarity and documentation sake.
WDYT @eifrach
@tupyy any progress with this change?
@pkliczewski I need to complete the doc with the minimal requirements. I was waiting for reply from MTV team. just got it.
/retest
/retest
@eifrach PTAL. I'm down to one job jailed
/lgtm
/hold
/test edge-e2e-ai-operator-disconnected-capi
/test edge-e2e-metal-assisted-mtv-4-17
/test edge-e2e-metal-assisted-mtv-4-17
/unhold /lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: eifrach, tupyy
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [eifrach]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/override ci/prow/edge-e2e-ai-operator-disconnected-capi
@eifrach: Overrode contexts on behalf of eifrach: ci/prow/edge-e2e-ai-operator-disconnected-capi
In response to this:
/override ci/prow/edge-e2e-ai-operator-disconnected-capi
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.