Skip to content

[release-4.22] OCPBUGS-92829: Clean up old temp directories in downloads pod#1177

Open
openshift-cherrypick-robot wants to merge 1 commit into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-1176-to-release-4.22
Open

[release-4.22] OCPBUGS-92829: Clean up old temp directories in downloads pod#1177
openshift-cherrypick-robot wants to merge 1 commit into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-1176-to-release-4.22

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #1176

/assign hongkailiu

Add cleanup logic to remove old download-* temp directories before
creating a new one. This prevents accumulation of stale temp directories
from previous pod instances.

Changes:
- Define TEMP_DIR_PREFIX constant for 'download-' prefix
- Add cleanup logic to remove existing download-* directories on startup
- Use prefix parameter in tempfile.mkdtemp() for easier identification

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a7ad652b-2b10-4ba1-9f84-a5943c45f7c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot requested review from jhadvig and spadgett June 26, 2026 10:20
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: Jira Issue OCPBUGS-91663 has been cloned as Jira Issue OCPBUGS-92829. Will retitle bug to link to clone.
/retitle [release-4.22] OCPBUGS-92829: Clean up old temp directories in downloads pod

Details

In response to this:

This is an automated cherry-pick of #1176

/assign hongkailiu

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 changed the title [release-4.22] OCPBUGS-91663: Clean up old temp directories in downloads pod [release-4.22] OCPBUGS-92829: Clean up old temp directories in downloads pod Jun 26, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 26, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-92829, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.

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.

Details

In response to this:

This is an automated cherry-pick of #1176

/assign hongkailiu

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.

@hongkailiu

Copy link
Copy Markdown
Member

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 26, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@hongkailiu: This pull request references Jira Issue OCPBUGS-92829, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-91663 is in the state ON_QA, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-91663 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0
  • bug has dependents
Details

In response to this:

/jira refresh

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.

@hongkailiu

Copy link
Copy Markdown
Member

cluster-bot (logs):

launch 4.22.0-0.nightly,openshift/console-operator#1177 aws
$ mv ~/Downloads/cluster-bot-2026-06-26-105001.kubeconfig ~/.kube/config

$ oc get clusterversion
NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.22.0-0-2026-06-26-111527-test-ci-ln-s239dtk-latest   True        False         10m     Cluster version is 4.22.0-0-2026-06-26-111527-test-ci-ln-s239dtk-latest
$ downloads_pod="$(oc get pod -n openshift-console -l app=console,component=downloads -o wide -o jsonpath='{.items[0].metadata.name}')"
$ oc -n openshift-console exec $downloads_pod -- kill 1
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
3.1G	/tmp/download-66x_ejkb
3.1G	/tmp
$ oc -n openshift-console exec $downloads_pod -- kill 1
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
error: Internal error occurred: unable to upgrade connection: container not found ("download-server")
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
error: Internal error occurred: unable to upgrade connection: container not found ("download-server")
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
3.1G	/tmp/download-cn9j7947
3.1G	/tmp
$ oc -n openshift-console exec $downloads_pod -- kill 1
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
error: Internal error occurred: unable to upgrade connection: container not found ("download-server")
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
256M	/tmp/download-a32yszuh
256M	/tmp
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
3.1G	/tmp/download-a32yszuh
3.1G	/tmp

/lgtm
/verified by @hongkailiu

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 26, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@hongkailiu: This PR has been marked as verified by @hongkailiu.

Details

In response to this:

cluster-bot (logs):

launch 4.22.0-0.nightly,openshift/console-operator#1177 aws
$ mv ~/Downloads/cluster-bot-2026-06-26-105001.kubeconfig ~/.kube/config

$ oc get clusterversion
NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.22.0-0-2026-06-26-111527-test-ci-ln-s239dtk-latest   True        False         10m     Cluster version is 4.22.0-0-2026-06-26-111527-test-ci-ln-s239dtk-latest
$ downloads_pod="$(oc get pod -n openshift-console -l app=console,component=downloads -o wide -o jsonpath='{.items[0].metadata.name}')"
$ oc -n openshift-console exec $downloads_pod -- kill 1
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
3.1G	/tmp/download-66x_ejkb
3.1G	/tmp
$ oc -n openshift-console exec $downloads_pod -- kill 1
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
error: Internal error occurred: unable to upgrade connection: container not found ("download-server")
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
error: Internal error occurred: unable to upgrade connection: container not found ("download-server")
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
3.1G	/tmp/download-cn9j7947
3.1G	/tmp
$ oc -n openshift-console exec $downloads_pod -- kill 1
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
error: Internal error occurred: unable to upgrade connection: container not found ("download-server")
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
256M	/tmp/download-a32yszuh
256M	/tmp
$ oc -n openshift-console exec $downloads_pod -- du -h -d 1 /tmp
3.1G	/tmp/download-a32yszuh
3.1G	/tmp

/lgtm
/verified by @hongkailiu

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 lgtm Indicates that a PR is ready to be merged. label Jun 26, 2026
@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hongkailiu, openshift-cherrypick-robot
Once this PR has been reviewed and has the lgtm label, please assign jhadvig for approval. For more information see the Code Review Process.

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

Details 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 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants