Summary
I'm trying to create content for a pulp file repository directly via file_url.
As the artifacts I want to sync are pretty large (up to 9GB) the default timeout is too low and kills the download process (or rather the worker) in some cases from the server side while its still running.
Details in this issue: #7641
So I got pointed to the "downloader_config" key for file content creation which is described like this on my servers integrated docs page:
object
Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
The public api docs don't seem to include that part yet.
Steps to reproduce
Try creating pulp file content like this via pulp-glue:
pulp_ctx = PulpContext(
api_root="/pulp/",
api_kwargs={
"base_url": pulp_url,
"username": pulp_user_name,
"password": pulp_password,
},
verify_ssl=False,
timeout=timedelta(1800),
)
pulp_file_ctx = PulpFileContentContext(pulp_ctx=self.pulp_context, repository_ctx=self.pulp_repo_ctx)
pulp_file_ctx.create(
body={
"file_url": artifact_url,
"relative_path": relative_path,
"repository": self.pulp_repo_ctx.entity["name"],
"downloader_config": {
"total_timeout": 1800.0
},
}
)
Expected behavior
A download from the provided artifact url should start on the pulp server and respect the set "total_timeout" so it can finish even for large artifacts.
Stacktrace/Error log
pulp_glue.common.exceptions.PulpException: Task /pulp/api/v3/tasks/019dd4cf-158e-7f11-aadb-b0921030fa0c/ failed: '{'downloader_config': {'non_field_errors': [ErrorDetail(string='Invalid data. Expected a dictionary, but got str.', code='invalid')]}}'
And when I send it like this "downloader_config": json.dumps({"total_timeout": 1800.0}
I get a different error:
pulp_glue.common.exceptions.ValidationError: Validation failed for 'content_file_files_create':
application/x-www-form-urlencoded: 'body[downloader_config]' is expected to be a object.
multipart/form-data: 'body[downloader_config]' is expected to be a object.
At this point I assume an issue on the client side.
Pulp and pulp-cli version info
pulp --version
Pulp3 Command Line Interface, Version 0.39.0
Plugin Versions:
common: 0.39.0
Left out the other plugins and worker results as they are all up-to-date
pulp status
Notice: Cached api is outdated. Refreshing...
{
"versions": [
{
"component": "core",
"version": "3.110.0",
"package": "pulpcore",
"module": "pulpcore.app",
"domain_compatible": true
},
{
"component": "file",
"version": "3.110.0",
"package": "pulpcore",
"module": "pulp_file.app",
"domain_compatible": true
}
"database_connection": {
"connected": true
},
"redis_connection": {
"connected": false
},
"storage": {
"total": 261292556288,
"used": 79406088192,
"free": 181886468096
},
"content_settings": {
"content_origin": "http://containervm:8080",
"content_path_prefix": "/registry/"
},
"domain_enabled": false
}
Additional context
I can't use a file remote as the provider doesn't offer a repository server.
Summary
I'm trying to create content for a pulp file repository directly via file_url.
As the artifacts I want to sync are pretty large (up to 9GB) the default timeout is too low and kills the download process (or rather the worker) in some cases from the server side while its still running.
Details in this issue: #7641
So I got pointed to the "downloader_config" key for file content creation which is described like this on my servers integrated docs page:
The public api docs don't seem to include that part yet.
Steps to reproduce
Try creating pulp file content like this via pulp-glue:
Expected behavior
A download from the provided artifact url should start on the pulp server and respect the set "total_timeout" so it can finish even for large artifacts.
Stacktrace/Error log
And when I send it like this "downloader_config": json.dumps({"total_timeout": 1800.0}
I get a different error:
At this point I assume an issue on the client side.
Pulp and pulp-cli version info
Left out the other plugins and worker results as they are all up-to-date
Additional context
I can't use a file remote as the provider doesn't offer a repository server.