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

expose option to force remove the OSD in osd removal template #1501

Merged

Conversation

subhamkrai
Copy link
Contributor

adding option to expose --force-osd-removal <true/false>.
It will help when Ceph indicates the OSD is not safe-to-destroy.

Signed-off-by: subhamkrai srai@redhat.com

controllers/storagecluster/job_templates.go Outdated Show resolved Hide resolved
{
Name: "FORCE_OSD_REMOVAL",
DisplayName: "FORCE_OSD_REMOVAL",
Required: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we also need to specify the default value as:

Value: "false",

Without that I assume the default is just empty, which will likely cause an error in Rook. But we need to test these template changes in an openshift cluster to confirm the default behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe we also need to specify the default value as:

Value: "false",

added

Without that I assume the default is just empty, which will likely cause an error in Rook. But we need to test these template changes in an openshift cluster to confirm the default behavior.

I ran oc process FAILED_OSD_IDS=0 ocs-osd-removal | oc create -f - and in job pod the log I see

lag values: --force-osd-removal=false, --help=false, --log-level=DEBUG, --operator-image=, --osd-ids=0, --preserve-pvc=false, --service-account=

so it is adding false by default to force-osd-removal.

controllers/storagecluster/job_templates.go Outdated Show resolved Hide resolved
@agarwal-mudit
Copy link
Member

/cherry-pick release-4.10

@openshift-cherrypick-robot

@agarwal-mudit: once the present PR merges, I will cherry-pick it on top of release-4.10 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.10

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.

adding option to expose `--force-osd-removal` `<true/false>`.
It will help when Ceph indicates the OSD is not safe-to-destroy.

Signed-off-by: subhamkrai <srai@redhat.com>
Copy link
Contributor

@travisn travisn left a comment

Choose a reason for hiding this comment

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

The changes look good. Can you comment on the testing you've been able to run? From an offline conversation I think it's good to go, but would be good to summarize it here.

@subhamkrai
Copy link
Contributor Author

The changes look good. Can you comment on the testing you've been able to run? From an offline conversation I think it's good to go, but would be good to summarize it here.

So, when running the template without flag force-osd-removal, I was able to verify the default value was false. And when I ran the template with the flag, in the logs I was able to see force-osd-removal=true but osd was not purged because it was healthy(which is expected).

@travisn
Copy link
Contributor

travisn commented Feb 14, 2022

/lgtm
@agarwal-mudit @jarrpa Can we get an approve on this?

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2022
@agarwal-mudit
Copy link
Member

/retest

@agarwal-mudit
Copy link
Member

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 15, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agarwal-mudit, subhamkrai, travisn

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 Feb 15, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 15, 2022

@subhamkrai: 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/red-hat-storage-ocs-ci-e2e-aws 9d1e544 link false /test red-hat-storage-ocs-ci-e2e-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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit f06c3e5 into red-hat-storage:main Feb 15, 2022
@openshift-cherrypick-robot

@agarwal-mudit: new pull request created: #1518

In response to this:

/cherry-pick release-4.10

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.

@subhamkrai
Copy link
Contributor Author

/cherry-pick release-4.9

@openshift-cherrypick-robot

@subhamkrai: new pull request created: #1778

In response to this:

/cherry-pick release-4.9

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.

@subhamkrai
Copy link
Contributor Author

/cherry-pick release-4.8

@openshift-cherrypick-robot

@subhamkrai: #1501 failed to apply on top of branch "release-4.8":

Applying: expose option to force remove the OSD in osd removal template
Using index info to reconstruct a base tree...
A	controllers/storagecluster/job_templates.go
A	controllers/storagecluster/job_templates_test.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): controllers/storagecluster/job_templates_test.go deleted in HEAD and modified in expose option to force remove the OSD in osd removal template. Version expose option to force remove the OSD in osd removal template of controllers/storagecluster/job_templates_test.go left in tree.
CONFLICT (modify/delete): controllers/storagecluster/job_templates.go deleted in HEAD and modified in expose option to force remove the OSD in osd removal template. Version expose option to force remove the OSD in osd removal template of controllers/storagecluster/job_templates.go left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 expose option to force remove the OSD in osd removal template
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.8

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.

@subhamkrai
Copy link
Contributor Author

@subhamkrai: #1501 failed to apply on top of branch "release-4.8":

Applying: expose option to force remove the OSD in osd removal template
Using index info to reconstruct a base tree...
A	controllers/storagecluster/job_templates.go
A	controllers/storagecluster/job_templates_test.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): controllers/storagecluster/job_templates_test.go deleted in HEAD and modified in expose option to force remove the OSD in osd removal template. Version expose option to force remove the OSD in osd removal template of controllers/storagecluster/job_templates_test.go left in tree.
CONFLICT (modify/delete): controllers/storagecluster/job_templates.go deleted in HEAD and modified in expose option to force remove the OSD in osd removal template. Version expose option to force remove the OSD in osd removal template of controllers/storagecluster/job_templates.go left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 expose option to force remove the OSD in osd removal template
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

I'll create manual BP for 4.8, 4.7, 4.6

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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants