Unable to sync with Oracle ULN

Problem:
Following this doc to create a UL remote,
https://docs.pulpproject.org/pulp_rpm/workflows/create_sync_publish.html#creating-a-uln-remote

I am able to create a ULN remote with HTTPIE, but looks like the CLI still has no support for it.
creation of the remote works…

{
“ca_cert”: null,
“client_cert”: null,
“connect_timeout”: null,
“download_concurrency”: null,
“headers”: null,
“max_retries”: null,
“name”: “ol-6-x86_64-oracle_server_els-live”,
“password”: “xxxxxxxxxx”,
“policy”: “immediate”,
“proxy_url”: “http://xxxxxxxx:80”,
“pulp_created”: “2022-02-04T01:45:45.277827Z”,
“pulp_href”: “/pulp/api/v3/remotes/rpm/uln/1e9f3d64-a974-4954-a72e-c0254d5375f9/”,
“pulp_labels”: {},
“pulp_last_updated”: “2022-02-04T01:45:45.277847Z”,
“rate_limit”: null,
“sock_connect_timeout”: null,
“sock_read_timeout”: null,
“tls_validation”: false,
“total_timeout”: null,
“uln_server_base_url”: null,
“url”: “uln://ol6_x86_64_ELS”,
“username”: “xxxx@xxxxx.com.au”
}

when trying to associate with repo, i get this error…
pulp rpm repository update --name ol-6-x86_64-oracle_server_els --remote /pulp/api/v3/remotes/rpm/uln/1e9f3d64-a974-4954-a72e-c0254d5375f9/
Error: The type ‘rpm:uln’ is not valid for the remote option.

This command does not work…
pulp rpm remote show --name hip-hui-ol-6-x86_64-oracle_server_els-live
Error: Could not find rpm remote with {‘name’: ‘ol-6-x86_64-oracle_server_els-live’}.

anyways, how do I create and sync a ULN repo? is there any doco for it?

Expected outcome:
must be able to sync a ULN repo
Pulpcore version:
3.16
Pulp plugins installed and their versions:
pulp_rpm
Operating system - distribution and version:
RHEL7

Other relevant data:

Ah - we don’t have the ULN support baked into the CLI yet. I don’t have ULN access - I’ll work with our contributors who added ULN support.

@bkwfanena - could you open an RFE for us, so we make sure this stays on our to-do list? The link is here:

Thanks!

2 Likes

(and in the meantime, you can talk to the REST API directly to sync your repo using the ULN remote you created. See Create, Sync and Publish a Repository — Pulp RPM Support 3.17.3 documentation , there’s a “using httpie” section that should work for you!)

1 Like

ggainey,
Thanks, but the CLI is unable to find the remote repo… For example…

pulp rpm repository update --name ol-6-x86_64-oracle_server_els-live --remote ol-6-x86_64-oracle_server_els-live
Error: Could not find rpm remote with {‘name’: ‘ol-6-x86_64-oracle_server_els-live’}.

but the remote has been created using httpie… (this output is from API browser)

“results”: [
{
“pulp_href”: “/pulp/api/v3/remotes/rpm/uln/1e9f3d64-a974-4954-a72e-c0254d5375f9/”,
“pulp_created”: “2022-02-04T01:45:45.277827Z”,
“name”: “ol-6-x86_64-oracle_server_els-live”,
“url”: “uln://ol6_x86_64_ELS”,
“ca_cert”: null,
“client_cert”: null,
“tls_validation”: false,
“proxy_url”: “http://xxxxxxxxxx”,
“username”: “xxxxxxxxxxx”,
“password”: “xxxxxxxxxxx”,
“pulp_labels”: {},
“pulp_last_updated”: “2022-02-04T01:45:45.277847Z”,
“download_concurrency”: null,
“max_retries”: null,
“policy”: “immediate”,
“total_timeout”: null,
“connect_timeout”: null,
“sock_connect_timeout”: null,
“sock_read_timeout”: null,
“headers”: null,
“rate_limit”: null,
“uln_server_base_url”: null
}
]

Trying to hook up the repo with remote href, gives me this error…

pulp rpm repository update --name ol-6-x86_64-oracle_server_els-live --remote /pulp/api/v3/remotes/rpm/uln/1e9f3d64-a974-4954-a72e-c0254d5375f9/
Error: The type ‘rpm:uln’ is not valid for the remote option.

Thanks,

As @ggainey stated, the CLI currently simply does not support anything related ULN remotes.
However, it should be fairly simple to implement this feature. It basically requires teaching the CLI how to use the ULN API endpoint (and possibly also to accept the ULN type).

I created a feature request here: https://github.com/pulp/pulp-cli/issues/470
Since it should be quite straightforward, I am hoping we can work on it soon. (A good side project while one is waiting on pipelines for larger changes!)

2 Likes

While waiting for CLI to be updated/upgraded, tried to sync the ULN repo via httpie, but I get a different error now…

{
“pulp_href”: “/pulp/api/v3/tasks/1af31c03-f6ad-4116-9f8d-f889ffc63795/”,
“pulp_created”: “2022-02-07T22:18:37.533786Z”,
“state”: “failed”,
“name”: “pulp_rpm.app.tasks.synchronizing.synchronize”,
“logging_cid”: “67370b57508c4147a53bfdb26ccfe034”,
“started_at”: “2022-02-07T22:18:37.578038Z”,
“finished_at”: “2022-02-07T22:18:37.616182Z”,
“error”: {
“traceback”: " File “/usr/local/lib/pulp/lib64/python3.8/site-packages/pulpcore/tasking/pulpcore_worker.py”, line 370, in _perform_task\n result = func(*args, **kwargs)\n File “/usr/local/lib/pulp/lib64/python3.8/site-packages/pulp_rpm/app/tasks/synchronizing.py”, line 453, in synchronize\n remote_url = fetch_remote_url(remote)\n File “/usr/local/lib/pulp/lib64/python3.8/site-packages/pulp_rpm/app/tasks/synchronizing.py”, line 282, in fetch_remote_url\n get_repomd_file(remote, normalized_remote_url)\n File “/usr/local/lib/pulp/lib64/python3.8/site-packages/pulp_rpm/app/tasks/synchronizing.py”, line 240, in get_repomd_file\n return downloader.fetch()\n File “/usr/local/lib/pulp/lib64/python3.8/site-packages/pulpcore/download/base.py”, line 176, in fetch\n return done.pop().result()\n File “/usr/local/lib/pulp/lib64/python3.8/site-packages/pulpcore/download/http.py”, line 247, in run\n return await download_wrapper()\n File “/usr/local/lib/pulp/lib64/python3.8/site-packages/backoff/_async.py”, line 133, in retry\n ret = await target(*args, **kwargs)\n File “/usr/local/lib/pulp/lib64/python3.8/site-packages/pulpcore/download/http.py”, line 245, in download_wrapper\n return await self._run(extra_data=extra_data)\n File “/usr/local/lib/pulp/lib64/python3.8/site-packages/pulp_rpm/app/downloaders.py”, line 175, in _run\n self.session_key = await client[“auth.login”](self.username, self.password)\n",
"description": "‘AllowProxyServerProxy’ object is not subscriptable"
},
“worker”: “/pulp/api/v3/workers/e0b2a361-f2ec-471e-b1c7-eb6583948259/”,
“parent_task”: null,
“child_tasks”: [],
“task_group”: null,
“progress_reports”: [],
“created_resources”: [],
“reserved_resources_record”: [
“/pulp/api/v3/repositories/rpm/rpm/a2a1ad4d-c78e-4e6a-ab26-23ed35c55d61/”,
“shared:/pulp/api/v3/remotes/rpm/uln/58a6ef8d-32cf-4c8b-b549-25f00b628b14/”
]
}

any idea what could be wrong… ?
The creds are correct and the ULN URI also seems to be correct.

Thanks

From your remote it looks like you are using a HTTP proxy to access the internet (proxy_url is set on your remote). I know that HTTP proxy on the ULN remote was broken at some point. I am not sure when exactly it was fixed (I believe it was fixed). I will pass this along to the colleagues who worked on that.

The fix is included in pulp_rpm-3.16.2:
https://pulp.plan.io/issues/9653

Thanks,
That worked… upgraded to 3.17.2
Waiting on the CLI to be updated now…

Thanks,