Pulp RPM Sync - Photon 5.0 fails due to Unable to parse updateinfo record date: None

Problem:
In our Pulp 3 instance, we are trying to sync in Photon 5 rpm repositories, and have had many issues with the advisories. One the issues being:

Unable to parse updateinfo record date: None

Expected outcome:
Successful sync of Photon 5 repositories.

Pulpcore version:
{
“component”: “core”,
“version”: “3.58.0”,
“package”: “pulpcore”,
“module”: “pulpcore.app”,
“domain_compatible”: true
}

Pulp plugins installed and their versions:
{
“component”: “ansible”,
“version”: “0.22.1”,
“package”: “pulp-ansible”,
“module”: “pulp_ansible.app”,
“domain_compatible”: false
},
{
“component”: “container”,
“version”: “2.21.0”,
“package”: “pulp-container”,
“module”: “pulp_container.app”,
“domain_compatible”: false
},
{
“component”: “maven”,
“version”: “0.8.1”,
“package”: “pulp-maven”,
“module”: “pulp_maven.app”,
“domain_compatible”: false
},
{
“component”: “python”,
“version”: “3.12.3”,
“package”: “pulp-python”,
“module”: “pulp_python.app”,
“domain_compatible”: true
},
{
"component": “rpm”,
“version”: “3.27.1”,
“package”: “pulp-rpm”,
“module”: “pulp_rpm.app”,
“domain_compatible”: true
},
{
“component”: “deb”,
“version”: “3.3.1”,
“package”: “pulp_deb”,
“module”: “pulp_deb.app”,
“domain_compatible”: false
},
{
“component”: “certguard”,
“version”: “3.58.0”,
“package”: “pulpcore”,
“module”: “pulp_certguard.app”,
“domain_compatible”: true
},
{
“component”: “file”,
“version”: “3.58.0”,
“package”: “pulpcore”,
“module”: “pulp_file.app”,
“domain_compatible”: true
},
{
“component”: “ostree”,
“version”: “2.4.3”,
“package”: “pulp-ostree”,
“module”: “pulp_ostree.app”,
“domain_compatible”: true
}

Operating system - distribution and version:
NAME=“Alma Linux”
VERSION=“8.9”
Pulp with docker compose is used for deployment.

Other relevant data:
pulp rpm remote show --name photon_updates
{
“pulp_href”: “/pulp/api/v3/remotes/rpm/rpm/0191b966-fd3e-702a-a59b-35bf8b7b93d8/”,
“pulp_created”: “2024-09-03T19:40:20.159610Z”,
“pulp_last_updated”: “2024-09-03T19:40:20.159631Z”,
“name”: “photon_updates”,
“url”: “https://packages.vmware.com/photon/5.0/photon_updates_5.0_x86_64”,
“ca_cert”: null,
“client_cert”: null,
“tls_validation”: false,
proxy_url”: “http://x.x.x.x:80/”,
“pulp_labels”: {},
“download_concurrency”: 10,
“max_retries”: null,
“policy”: “on_demand”,
“total_timeout”: null,
“connect_timeout”: null,
“sock_connect_timeout”: null,
“sock_read_timeout”: null,
“headers”: null,
“rate_limit”: null,
“hidden_fields”: [
{
“name”: “client_key”,
“is_set”: false
},
{
“name”: “proxy_username”,
“is_set”: false
},
{
“name”: “proxy_password”,
“is_set”: false
},
{
“name”: “username”,
“is_set”: false
},
{
“name”: “password”,
“is_set”: false
}
],
“sles_auth_token”: null
}

Sync failure error trace:
“traceback”: " File “/usr/local/lib/python3.9/site-packages/pulpcore/tasking/tasks.py”, line 75, in _execute_task\n result = func(*args, **kwargs)\n File “/usr/local/lib/python3.9/site-packages/pulp_rpm/app/tasks/synchronizing.py”, line 568, in synchronize\n repo_version = dv.create() or repo.latest_version()\n File “/usr/local/lib/python3.9/site-packages/pulpcore/plugin/stages/declarative_version.py”, line 161, in create\n loop.run_until_complete(pipeline)\n File “/usr/lib64/python3.9/asyncio/base_events.py”, line 647, in run_until_complete\n return future.result()\n File “/usr/local/lib/python3.9/site-packages/pulpcore/plugin/stages/api.py”, line 220, in create_pipeline\n await asyncio.gather(*futures)\n File “/usr/local/lib/python3.9/site-packages/pulpcore/plugin/stages/api.py”, line 41, in call\n await self.run()\n File “/usr/local/lib/python3.9/site-packages/pulp_rpm/app/tasks/synchronizing.py”, line 873, in run\n await self.parse_repository_metadata(repomd, repomd_files)\n File “/usr/local/lib/python3.9/site-packages/pulp_rpm/app/tasks/synchronizing.py”, line 946, in parse_repository_metadata\n await self.parse_advisories(updateinfo_result)\n File “/usr/local/lib/python3.9/site-packages/pulp_rpm/app/tasks/synchronizing.py”, line 1368, in parse_advisories\n update_record = UpdateRecord(**UpdateRecord.createrepo_to_dict(update))\n File “/usr/local/lib/python3.9/site-packages/pulp_rpm/app/models/advisory.py”, line 120, in createrepo_to_dict\n issued_date = getattr(update, CR_UPDATE_RECORD_ATTRS.ISSUED_DATE)\n",
"description": "Unable to parse updateinfo record date: None 23:13:49"

settings.py
ALLOW_AUTOMATIC_UNSAFE_ADVISORY_CONFLICT_RESOLUTION = True

The definition for updatinfo.xml requires that the “issued” attribute contain a valid date or unix timestamp (seconds-since-epoch". In that repository, the updatingo.xml contains this advisory:

  <update from="photonpublish@vmware.com" status="stable" type="security" version="5.0">     
    <id>PHSA-None 11:47:57-5.0-00GA</id>
    <title>gstreamer-plugins-base</title>
    <release>PHOTON 5.0</release>
    <severity>7.8</severity>
    <issued date="None 11:47:57"/>
    <description>Security fixes for {'CVE-2024-4453'}</description>
   ...

The string “None 11:47:57” isn’t a valid date string - the repository-owner needs to fix their repo.

2 Likes

Thanks. I guess we’ll have to exclude Photon from our Pulp sync pipeline.

1 Like