Skip to content

ondemand repo: tmpfiles does not get cleaned up on aborted download #6975

@philfry

Description

@philfry

Version
pulpcore 3.90.0
pulp_rpm 3.32.2

Describe the bug
When aborting the download of a file from an on_demand repository the tmpfiles is not removed.

To Reproduce

  1. install latest pulpcore, pulp_rpm
  2. add an on_demand repository:
pulp rpm remote create --name remote_test --url http://somewhere.example/ --policy on_demand
pulp rpm repository create --name mirror_test --remote remote_test --retain-package-versions 0 --retain-repo-versions 1
pulp rpm distribution create --name dist_test --repository mirror_test --base-path mirror/test
pulp rpm repository sync --name mirror_test --sync-policy mirror_complete
  1. start and abort a download from this repository before it gets finished
  2. see warning Could not download remote artifact at 'http://...': Cannot write to closing transport
  3. find the leftover tmp_XXXXXXX-file tempfile in tmp

Expected behavior

  1. tmpfile gets removed
  2. ideally, the download continues and completes in the background, even though the client has disconnected, so that the artifact gets saved eventually

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions