Project

Profile

Help

Issue #8709

SuspiciousFileOperation: File name '/var/lib/pulp/tmp/..@.../tmpqe08qjln' includes path elements

Added by knzivid 7 months ago. Updated 6 months ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version - Debian:
Platform Release:
Target Release - Debian:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

This is using the latest docker image at pulp/pulp:latest

Traceback

pulp_1 | pulp [317c2f69df90431cb1cbeb92949deee3]: rq.worker:ERROR: Traceback (most recent call last): pulp_1 | File "/usr/local/lib/python3.6/site-packages/rq/worker.py", line 1008, in perform_job pulp_1 | rv = job.perform() pulp_1 | File "/usr/local/lib/python3.6/site-packages/rq/job.py", line 706, in perform pulp_1 | self._result = self._execute() pulp_1 | File "/usr/local/lib/python3.6/site-packages/rq/job.py", line 729, in _execute pulp_1 | result = self.func(*self.args, **self.kwargs) pulp_1 | File "/usr/local/lib/python3.6/site-packages/pulp_deb/app/tasks/synchronizing.py", line 122, in synchronize pulp_1 | DebDeclarativeVersion(first_stage, repository, mirror=mirror).create() pulp_1 | File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py", line 149, in create pulp_1 | loop.run_until_complete(pipeline) pulp_1 | File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete pulp_1 | return future.result() pulp_1 | File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline pulp_1 | await asyncio.gather(*futures) pulp_1 | File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in call pulp_1 | await self.run() pulp_1 | File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py", line 241, in run pulp_1 | d_artifact.artifact for d_artifact in da_to_save pulp_1 | File "/usr/local/lib/python3.6/site-packages/pulpcore/app/models/content.py", line 82, in bulk_get_or_create pulp_1 | return super().bulk_create(objs, batch_size=batch_size) pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method pulp_1 | return getattr(self.get_queryset(), name)(*args, **kwargs) pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 468, in bulk_create pulp_1 | self._batched_insert(objs_with_pk, fields, batch_size, ignore_conflicts=ignore_conflicts) pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1204, in _batched_insert pulp_1 | ignore_conflicts=ignore_conflicts, pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1186, in _insert pulp_1 | return query.get_compiler(using=using).execute_sql(return_id) pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1376, in execute_sql pulp_1 | for sql, params in self.as_sql(): pulp_1 | File "/usr/local/lib/python3.6/site-packages/django_readonly_field/compiler.py", line 31, in as_sql pulp_1 | return super(ReadonlySQLCompilerMixin, self).as_sql() pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1320, in as_sql pulp_1 | for obj in self.query.objs pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1320, in pulp_1 | for obj in self.query.objs pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1319, in pulp_1 | [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields] pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1270, in pre_save_val pulp_1 | return field.pre_save(obj, add=True) pulp_1 | File "/usr/local/lib/python3.6/site-packages/pulpcore/app/models/fields.py", line 68, in pre_save pulp_1 | return super().pre_save(model_instance, add) pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/fields/files.py", line 289, in pre_save pulp_1 | file.save(file.name, file.file, save=False) pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/fields/files.py", line 87, in save pulp_1 | name = self.field.generate_filename(self.instance, name) pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/fields/files.py", line 303, in generate_filename pulp_1 | filename = validate_file_name(filename) pulp_1 | File "/usr/local/lib/python3.6/site-packages/django/core/files/utils.py", line 8, in validate_file_name pulp_1 | raise SuspiciousFileOperation("File name '%s' includes path elements" % name)


Related issues

Related to Pulp - Issue #8691: Pulp fails against django 2.2.21CLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by knzivid 7 months ago

Better formatted traceback

pulp_1  | pulp [317c2f69df90431cb1cbeb92949deee3]: rq.worker:ERROR: Traceback (most recent call last):
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/rq/worker.py", line 1008, in perform_job
pulp_1  |     rv = job.perform()
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/rq/job.py", line 706, in perform
pulp_1  |     self._result = self._execute()
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/rq/job.py", line 729, in _execute
pulp_1  |     result = self.func(*self.args, **self.kwargs)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/pulp_deb/app/tasks/synchronizing.py", line 122, in synchronize
pulp_1  |     DebDeclarativeVersion(first_stage, repository, mirror=mirror).create()
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py", line 149, in create
pulp_1  |     loop.run_until_complete(pipeline)
pulp_1  |   File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
pulp_1  |     return future.result()
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
pulp_1  |     await asyncio.gather(*futures)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
pulp_1  |     await self.run()
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py", line 241, in run
pulp_1  |     d_artifact.artifact for d_artifact in da_to_save
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/pulpcore/app/models/content.py", line 82, in bulk_get_or_create
pulp_1  |     return super().bulk_create(objs, batch_size=batch_size)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
pulp_1  |     return getattr(self.get_queryset(), name)(*args, **kwargs)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 468, in bulk_create
pulp_1  |     self._batched_insert(objs_with_pk, fields, batch_size, ignore_conflicts=ignore_conflicts)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1204, in _batched_insert
pulp_1  |     ignore_conflicts=ignore_conflicts,
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1186, in _insert
pulp_1  |     return query.get_compiler(using=using).execute_sql(return_id)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1376, in execute_sql
pulp_1  |     for sql, params in self.as_sql():
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django_readonly_field/compiler.py", line 31, in as_sql
pulp_1  |     return super(ReadonlySQLCompilerMixin, self).as_sql()
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1320, in as_sql
pulp_1  |     for obj in self.query.objs
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1320, in <listcomp>
pulp_1  |     for obj in self.query.objs
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1319, in <listcomp>
pulp_1  |     [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1270, in pre_save_val
pulp_1  |     return field.pre_save(obj, add=True)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/pulpcore/app/models/fields.py", line 68, in pre_save
pulp_1  |     return super().pre_save(model_instance, add)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/fields/files.py", line 289, in pre_save
pulp_1  |     file.save(file.name, file.file, save=False)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/fields/files.py", line 87, in save
pulp_1  |     name = self.field.generate_filename(self.instance, name)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/db/models/fields/files.py", line 303, in generate_filename
pulp_1  |     filename = validate_file_name(filename)
pulp_1  |   File "/usr/local/lib/python3.6/site-packages/django/core/files/utils.py", line 8, in validate_file_name
pulp_1  |     raise SuspiciousFileOperation("File name '%s' includes path elements" % name)

#3 Updated by quba42 7 months ago

Can you provide some more information what it is that you are synchronizing?

The values and fields you used to create the remote should be enough.

#4 Updated by knzivid 7 months ago

This is my remote. I removed the null fields

{
    "pulp_href": "/pulp/api/v3/remotes/deb/apt/9fb88a4f-9f0f-4858-a3ba-23998bc2f2cd/",
    "pulp_created": "2021-05-04T14:59:56.733557Z",
    "name": "apt.kitware.com",
    "url": "https://apt.kitware.com/ubuntu",
    "tls_validation": true,
    "pulp_last_updated": "2021-05-04T14:59:56.733572Z",
    "download_concurrency": 10,
    "policy": "immediate",
    "distributions": "xenial focal bionic",
    "architectures": "amd64",
    "sync_sources": false,
    "sync_udebs": false,
    "sync_installer": false,
    "gpgkey": null,
    "ignore_missing_package_indices": false
}

#5 Updated by ggainey 7 months ago

This is being caused by a recent update to django - see https://pulp.plan.io/issues/8691 , bmbouter is working with the Django project and on a fix for us!

#6 Updated by ggainey 7 months ago

  • Related to Issue #8691: Pulp fails against django 2.2.21 added

#7 Updated by knzivid 7 months ago

Thank you for the quick investigation :)

#8 Updated by quba42 6 months ago

  • Status changed from NEW to CLOSED - WONTFIX

I am closing this ticket since I understand it is being fixed in pulpcore and no action is required on the pulp_deb side.

If you are still experiencing issues with specific versions of pulpcore + pulp_deb, feel free to open a new ticket.

#10 Updated by quba42 6 months ago

knzivid wrote:

Sure. The fix for https://pulp.plan.io/issues/8691 made it to https://github.com/pulp/pulpcore/releases/tag/3.13.0 right?

I believe so. It was also backported to 3.11.2. There was not yet a release announcement for 3.13.0, but the release pipeline appears to have fully run.

Please register to edit this issue

Also available in: Atom PDF