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

Add temporary support for mce installation #1474

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhanss
Copy link

@mhanss mhanss commented Nov 3, 2022

LSO has not been published to the 4.12 redhat-operators catalog, so it cannot be installed on OpenShift 4.12. Until this is resolved, installing LSO with 4.11 catalog as redhat-operators-v4-11.

@openshift-ci
Copy link

openshift-ci bot commented Nov 3, 2022

Hi @mhanss. Thanks for your PR.

I'm waiting for a openshift-metal3 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/test-infra repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 3, 2022
@@ -461,7 +461,10 @@ EOF
function oc_mirror_mce() {
tmpimageset=$(mktemp --tmpdir "mceimageset--XXXXXXXXXX")
_tmpfiles="$_tmpfiles $tmpimageset"

# TODO: Remove this once LSO is published to the 4.12 catalog.
if [[ ${OPENSHIFT_RELEASE_STREAM} == "4.12" || ${OPENSHIFT_RELEASE_STREAM} == "4.13" ]]; then
Copy link
Contributor

@bfournie bfournie Nov 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add another conditional so this is only changed when using MCE, e.g.
if [ ! -z "${AGENT_DEPLOY_MCE}" ]; then

Also it would be useful to log a warning message so its obvious that the release stream being used is not the one the user set

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Condition added!

function create_lso_operator_v4_11() {
if [[ ${OPENSHIFT_RELEASE_STREAM} == "4.12" || ${OPENSHIFT_RELEASE_STREAM} == "4.13" ]]; then
oc delete subscription local-storage-operator -n openshift-local-storage
cat > "${mceManifests}/lso_operator_4_11.yaml" << EOF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the 4_11 from the name of this file so it be made more generic if you need to this same mechanism for future releases

source: redhat-operators-v4-11
sourceNamespace: openshift-marketplace
EOF
apply_manifest "$mceManifests/lso_operator_4_11.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also remove 4_11 name here

spec:
installPlanApproval: Automatic
name: local-storage-operator
source: redhat-operators-v4-11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use a variable for "4-11" so can use for future releases

function mce_prepare_postinstallation_manifests() {
local mceManifests=$1

# TODO: Remove this once LSO is published to the 4.12 catalog.
create_lso_operator_v4_11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we think this same issue can happen in the future, e.g. when 4.13 is being released and its operator is not released yet we should make this generic, for example, call it "create_lp_operator_latest_available' and use a variable to contain the latest - 4.11 in this case

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes have been implemented!

Comment on lines +464 to +468
# TODO: Remove this once LSO is published to the 4.12 catalog.
local version="$(openshift_version ${OCP_DIR})"
if [[ ( -n "${AGENT_DEPLOY_MCE}" ) && ( ${version} == "4.12" || ${version} == "4.13" ) ]]; then
local OPENSHIFT_RELEASE_STREAM="4.11"
fi
Copy link
Contributor

@lranjbar lranjbar Nov 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stops us from installing OCP 4.12 and OCP 4.13 doesn't it? Not sure if this is the right approach to take here.

Can't reach out to ART and DPTP to get LSO included in earlier catalogs to fix this?

@lranjbar
Copy link
Contributor

lranjbar commented Nov 9, 2022

Update: After talking about this with the team we will first take this approach and move this job to a weekly with a follow up approach to try to solving the underlying problem.

@lranjbar
Copy link
Contributor

lranjbar commented Nov 9, 2022

/approve

@openshift-ci
Copy link

openshift-ci bot commented Nov 9, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lranjbar

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2022
@andfasano
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 10, 2022
Copy link
Member

@andfasano andfasano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mhanss for your contribution. In general, I think it would be simpler to directly hard-code the "working" configuration in the existing manifests - so that we'll have the minimum impact possible on the existing code.
Also, it would be simpler in future to throw away such temporary change once the catalog will be working.

registryPoll:
interval: 10m0s
EOF
apply_manifest "$mceManifests/catalog_source_lso_operator.yaml"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason for not having it as a manifest asset directly under /agent/asset/mce folder? Otherwise, also for consistency with the other manifests, I'd prefer to have it there.
I guess it could also be added directly as an extra manifest.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think putting it in /agent/asset/mce makes more sense

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andfasano @celebdor As per the current implementation, we only need to remove the code from the current file but when we will move the files to the mce directory then we need to remove code/files from multiple places when the operator would be available to the 4.12 catalog. Please let me know your thoughts, I am okay with both approaches.

Copy link
Member

@andfasano andfasano Dec 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bfournie already started an activity to move the templating via Ansible, so it'd be better if we could stay on that side for the new developments (and keep away from bash). Wouldn't be sufficient just to define the source conditionally in this case? Note: any other change could be conditionally added in the same template as well, if required

spec:
installPlanApproval: Automatic
name: local-storage-operator
source: ${catalog_source_name}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this could be added directly in the existing manifest, in this way it seems it could be possible to simplify the code

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 21, 2022
@openshift-merge-robot
Copy link

@mhanss: PR needs rebase.

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/test-infra repository.

@openshift-ci
Copy link

openshift-ci bot commented Jul 31, 2023

@mhanss: 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/e2e-agent-compact-ipv4 0bdf0a2 link true /test e2e-agent-compact-ipv4

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants