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

OCPBUGS-31570: Bump to latest preinstall utils for disk cleanup fixes #618

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

Conversation

paul-maidment
Copy link

@paul-maidment paul-maidment commented Jul 25, 2024

The purpose of this PR is to pick up a change to disk cleanup made in rh-ecosystem-edge/preinstall-utils@cf01558

This change is to ensure that in the case of thin provisioning we clean up all necessary disks in the correct order.

This has been tested in assisted-test infra with a 5 node cluster and an artificially created thin provisioning, the cluster installs correctly where it would not have done so before this change.

Background / Context

It was discovered that disk cleanup does not clean disks in every scenario.

When thin provisioned disk mappings are present, the existing installer is not able to clean them up. this is because the _tdata and _tmeta mappings are the only mappings that will be returned when filtering by associated disk.

The changed library code ensures that we search for a base DM and then order the DMs correctly so that deletion will be performed in the correct order.

Issue / Requirement / Reason for change

Certain customers were running into the scenario above when they have thin volume provisioning.

Solution / Feature Overview

For more context, please see the commit here

Implementation Details

We derive a name for the base DM using the function getBaseDMDevicesForThinProvisioning and we ensure proper delete order is adhered to using sortDMDevicesForDeletion

Other Information

This has been tested as part of an assisted-service deployment using assisted-test-infra to create a 5 node cluster. Some thin volumes were created and linked to the installation disk.

These were cleaned correctly when they would not have been cleaned before.

@openshift-ci-robot
Copy link

@paul-maidment: This pull request references Jira Issue OCPBUGS-31570, which is invalid:

  • expected the bug to target the "4.17.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

The purpose of this PR is to pick up a change to disk cleanup made in rh-ecosystem-edge/preinstall-utils@cf01558

This change is to ensure that in the case of thin provisioning we clean up all necessary disks in the correct order.

This has been tested in assisted-test infra with a 5 node cluster and an artificially created thin provisioning, the cluster installs correctly where it would not have done so before this change.

Background / Context

It was discovered that disk cleanup does not clean disks in every scenario.

When thin provisioned disk mappings are present, the existing installer is not able to clean them up. this is because the _tdata and _tmeta mappings are the only mappings that will be returned when filtering by associated disk.

The changed library code ensures that we search for a base DM and then order the DMs correctly so that deletion will be performed in the correct order.

Issue / Requirement / Reason for change

Certain customers were running into the scenario above when they have thin volume provisioning.

Solution / Feature Overview

For more context, please see the commit here

Implementation Details

Other Information

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.

@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 Jul 25, 2024
Copy link
Contributor

openshift-ci bot commented Jul 25, 2024

Hi @paul-maidment. Thanks for your PR.

I'm waiting for a openshift-kni 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.

@openshift-ci-robot
Copy link

@paul-maidment: This pull request references Jira Issue OCPBUGS-31570, which is invalid:

  • expected the bug to target the "4.17.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

The purpose of this PR is to pick up a change to disk cleanup made in rh-ecosystem-edge/preinstall-utils@cf01558

This change is to ensure that in the case of thin provisioning we clean up all necessary disks in the correct order.

This has been tested in assisted-test infra with a 5 node cluster and an artificially created thin provisioning, the cluster installs correctly where it would not have done so before this change.

Background / Context

It was discovered that disk cleanup does not clean disks in every scenario.

When thin provisioned disk mappings are present, the existing installer is not able to clean them up. this is because the _tdata and _tmeta mappings are the only mappings that will be returned when filtering by associated disk.

The changed library code ensures that we search for a base DM and then order the DMs correctly so that deletion will be performed in the correct order.

Issue / Requirement / Reason for change

Certain customers were running into the scenario above when they have thin volume provisioning.

Solution / Feature Overview

For more context, please see the commit here

Implementation Details

We derive a name for the base DM using the function getBaseDMDevicesForThinProvisioning and we ensure proper delete order is adhered to using sortDMDevicesForDeletion

Other Information

This has been tested as part of an assisted-service deployment using assisted-test-infra to create a 5 node cluster. Some thin volumes were created and linked to the installation disk.

These were cleaned correctly when they would not have been cleaned before.

@eifrach
Copy link

eifrach commented Jul 25, 2024

/lgtm

Copy link
Contributor

openshift-ci bot commented Jul 25, 2024

@eifrach: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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
Copy link

eifrach commented Jul 28, 2024

/ok-to-test

Copy link
Contributor

openshift-ci bot commented Jul 28, 2024

@eifrach: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-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
Copy link

eifrach commented Jul 28, 2024

/approve

@leo8a
Copy link
Collaborator

leo8a commented Jul 29, 2024

/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 Jul 29, 2024
@tsorya
Copy link
Contributor

tsorya commented Aug 14, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 14, 2024
@tsorya
Copy link
Contributor

tsorya commented Aug 14, 2024

/retest

Copy link
Contributor

openshift-ci bot commented Sep 8, 2024

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2024
Copy link
Contributor

openshift-ci bot commented Sep 8, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: eifrach
Once this PR has been reviewed and has the lgtm label, please ask for approval from tsorya. 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

@paul-maidment
Copy link
Author

/retest

…h-ecosystem-edge/preinstall-utils@cf01558

This change is to ensure that in the case of thin provisioning we clean up all necessary disks in the correct order.

This has been tested in assisted-test infra with a 5 node cluster and an artificially created thin provisioning, the cluster installs correctly where it would not have done so before this change.

It was discovered that disk cleanup does not clean disks in every scenario.

When thin provisioned disk mappings are present, the existing installer is not able to clean them up. this is because the `_tdata` and `_tmeta` mappings are the only mappings that will be returned when filtering by associated disk.

The changed library code ensures that we search for a base DM and then order the DMs correctly so that deletion will be performed in the correct order.

Certain customers were running into the scenario above when they have thin volume provisioning.

For more context, please see the commit here

We derive a name for the base DM using the function `getBaseDMDevicesForThinProvisioning` and we ensure proper delete order is adhered to using `sortDMDevicesForDeletion`

This has been tested as part of an assisted-service deployment using assisted-test-infra to create a 5 node cluster. Some thin volumes were created and linked to the installation disk.

These were cleaned correctly when they would not have been cleaned before.

<!---

This is a personal checklist that should be applicable to most PRs. It's good
to go over it in order to make sure you haven't missed anything. If you feel
like some of these points are not relevant to your PR, feel free to keep them
unchecked and if you want also explain why you think they're inapplicable.

- [x] I performed a rough self-review of my changes
- [x] I explained non-trivial motivation for my code using code-comments
- [x] I made sure my code passes linting, tests, and builds correctly
- [x] I have ran the code and made sure it works as intended, and doesn't introduce any obvious regressions
- [x] I have not committed any irrelevant changes (if you did, please point them out and why, ideally separate them into a different PR)
- [x] I added tests (or decided that tests aren't really necessary)
Tests present in the updated library and also test have been performed on assisted-test-infra to ensure that this is working correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants