Skip to content
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

ECOPROJECT-2080: Add MTV operator as an option to cluster post installation #6711

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tupyy
Copy link

@tupyy tupyy commented Aug 30, 2024

This PR adds an option to install Migration Toolkit for Virtualization.

Resolves: https://issues.redhat.com/browse/ECOPROJECT-2080

Signed-off-by: Cosmin Tupangiu cosmin@redhat.com

@openshift-ci openshift-ci bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 30, 2024
@openshift-ci openshift-ci bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. api-review Categorizes an issue or PR as actively needing an API review. labels Aug 30, 2024
Copy link

openshift-ci bot commented Aug 30, 2024

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.

Copy link

openshift-ci bot commented Aug 30, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tupyy
Once this PR has been reviewed and has the lgtm label, please assign adriengentil for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eifrach
Copy link
Contributor

eifrach commented Sep 2, 2024

/retitle ECOPROJECT-2080: Add MTV operator as an option to cluster post installation

@openshift-ci openshift-ci bot changed the title Add MTV operator as an option to cluster post installation ECOPROJECT-2080: Add MTV operator as an option to cluster post installation Sep 2, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 2, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 2, 2024

@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 cosmin@redhat.com

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.

@eifrach
Copy link
Contributor

eifrach commented Sep 2, 2024

/test edge-unit-test
/test edge-lint
/test edge-images

Copy link

codecov bot commented Sep 2, 2024

Codecov Report

Attention: Patch coverage is 73.65269% with 44 lines in your changes missing coverage. Please review.

Project coverage is 68.73%. Comparing base (17927d8) to head (71502e3).
Report is 80 commits behind head on master.

Files with missing lines Patch % Lines
internal/operators/mtv/operator.go 67.44% 22 Missing and 6 partials ⚠️
internal/operators/mtv/manifest.go 73.91% 6 Missing and 6 partials ⚠️
internal/featuresupport/features_olm_operators.go 85.71% 3 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6711      +/-   ##
==========================================
+ Coverage   68.64%   68.73%   +0.08%     
==========================================
  Files         246      251       +5     
  Lines       36860    37605     +745     
==========================================
+ Hits        25301    25846     +545     
- Misses       9307     9446     +139     
- Partials     2252     2313      +61     
Files with missing lines Coverage Δ
internal/cluster/statemachine.go 99.64% <100.00%> (+<0.01%) ⬆️
internal/cluster/validation_id.go 92.30% <100.00%> (ø)
internal/featuresupport/feature_support_level.go 96.49% <ø> (ø)
internal/featuresupport/features_platforms.go 92.17% <100.00%> (+0.08%) ⬆️
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%) ⬇️
internal/operators/mtv/manifest.go 73.91% <73.91%> (ø)
internal/operators/mtv/operator.go 67.44% <67.44%> (ø)

... and 22 files with indirect coverage changes

This commit adds the MTV operator as an option to post cluster
installation.

Signed-off-by: Cosmin Tupangiu <cosmin@redhat.com>
@tupyy
Copy link
Author

tupyy commented Sep 2, 2024

/test

Copy link

openshift-ci bot commented Sep 2, 2024

@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.

@tupyy
Copy link
Author

tupyy commented Sep 2, 2024

@eifrach Thank you for the review.
I've done the fixes. PTAL

@tupyy
Copy link
Author

tupyy commented Sep 3, 2024

@eifrach PTAL

@eifrach
Copy link
Contributor

eifrach commented Sep 3, 2024

/test edge-unit-test
/test edge-lint
/test edge-images

@eifrach
Copy link
Contributor

eifrach commented Sep 3, 2024

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": {}
    }
  }
},

@eifrach
Copy link
Contributor

eifrach commented Sep 3, 2024

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

@eifrach
Copy link
Contributor

eifrach commented Sep 3, 2024

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Sep 3, 2024
@openshift-ci openshift-ci bot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 3, 2024
@eifrach
Copy link
Contributor

eifrach commented Sep 4, 2024

looks good to me,
give me a few I'll merge it

@danmanor
Copy link
Contributor

danmanor commented Sep 4, 2024

@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

@pkliczewski
Copy link
Contributor

@tupyy any progress with this change?

@tupyy
Copy link
Author

tupyy commented Oct 7, 2024

@pkliczewski I need to complete the doc with the minimal requirements. I was waiting for reply from MTV team. just got it.

@tupyy tupyy force-pushed the mvp branch 4 times, most recently from 3e623fb to eaa8173 Compare October 8, 2024 09:24
@tupyy
Copy link
Author

tupyy commented Oct 9, 2024

/retest

1 similar comment
@tupyy
Copy link
Author

tupyy commented Oct 9, 2024

/retest

Copy link

openshift-ci bot commented Oct 9, 2024

@tupyy: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/edge-subsystem-aws eaa8173 link true /test edge-subsystem-aws

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@tupyy
Copy link
Author

tupyy commented Oct 9, 2024

@eifrach PTAL. I'm down to one job jailed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants