Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2051713 - Syncing RHEL 5 KS repo fails with: "ModelBase object argument after ** must be a mapping, not str"
Summary: Syncing RHEL 5 KS repo fails with: "ModelBase object argument after ** must b...
Keywords:
Status: CLOSED DUPLICATE of bug 2069822
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.10.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-07 20:45 UTC by Lai
Modified: 2022-10-19 19:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-19 19:49:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lai 2022-02-07 20:45:05 UTC
Description of problem:
Syncing RHEL 5 KS repo fails with: "ModelBase object argument after ** must be a mapping, not str" so you can't sync a RHEL 5 KS repo.

Version-Release number of selected component (if applicable):
6.10.3 snap 1

How reproducible:
100%

Steps to Reproduce:
1. Enable "Red Hat Enterprise Linux 5 Server Kickstarter x86_64 5.10' repo
2. Start the sync

Actual results:
Sync failed with "ModelBase object argument after ** must be a mapping, not str"

Expected results:
sync should pass successfully

Additional info:

Comment 1 Lai 2022-02-07 20:46:52 UTC
Here's the conversation on the issue:

Comment #3
here's the log and vm:

Feb  4 13:00:16 dhcp-3-188 systemd: Created slice User Slice of root.
Feb  4 13:00:16 dhcp-3-188 systemd-logind: New session 331 of user root.
Feb  4 13:00:16 dhcp-3-188 systemd: Started Session 331 of user root.
Feb  4 13:00:19 dhcp-3-188 pulpcore-api: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]:  - - [04/Feb/2022:18:00:19 +0000] "GET
 /pulp/api/v3/tasks/5435b4b7-ba82-4a6e-a538-f73fb7b6d279/ HTTP/1.1" 200 3464 "-" "OpenAPI-Generator/3.14.1/ruby"
Feb  4 13:00:19 dhcp-3-188 pulpcore-api: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]:  - - [04/Feb/2022:18:00:19 +0000] "GET
 /pulp/api/v3/tasks/5c976130-d1a2-4284-9e89-80fc78f87fbf/ HTTP/1.1" 200 3463 "-" "OpenAPI-Generator/3.14.1/ruby"
Feb  4 13:00:27 dhcp-3-188 pulpcore-api: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]:  - - [04/Feb/2022:18:00:27 +0000] "GET
 /pulp/api/v3/tasks/5435b4b7-ba82-4a6e-a538-f73fb7b6d279/ HTTP/1.1" 200 3464 "-" "OpenAPI-Generator/3.14.1/ruby"
Feb  4 13:00:27 dhcp-3-188 pulpcore-api: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]:  - - [04/Feb/2022:18:00:27 +0000] "GET
 /pulp/api/v3/tasks/5c976130-d1a2-4284-9e89-80fc78f87fbf/ HTTP/1.1" 200 3464 "-" "OpenAPI-Generator/3.14.1/ruby"
Feb  4 13:00:35 dhcp-3-188 pulpcore-api: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]:  - - [04/Feb/2022:18:00:35 +0000] "GET
 /pulp/api/v3/tasks/5435b4b7-ba82-4a6e-a538-f73fb7b6d279/ HTTP/1.1" 200 3464 "-" "OpenAPI-Generator/3.14.1/ruby"
Feb  4 13:00:36 dhcp-3-188 pulpcore-api: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]:  - - [04/Feb/2022:18:00:36 +0000] "GET
 /pulp/api/v3/tasks/5c976130-d1a2-4284-9e89-80fc78f87fbf/ HTTP/1.1" 200 3464 "-" "OpenAPI-Generator/3.14.1/ruby"
Feb  4 13:00:40 dhcp-3-188 systemd: Removed slice User Slice of foreman.
Feb  4 13:00:52 dhcp-3-188 pulpcore-api: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]:  - - [04/Feb/2022:18:00:52 +0000] "GET
 /pulp/api/v3/tasks/5435b4b7-ba82-4a6e-a538-f73fb7b6d279/ HTTP/1.1" 200 3969 "-" "OpenAPI-Generator/3.14.1/ruby"
Feb  4 13:00:52 dhcp-3-188 pulpcore-api: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]:  - - [04/Feb/2022:18:00:52 +0000] "GET
 /pulp/api/v3/tasks/5c976130-d1a2-4284-9e89-80fc78f87fbf/ HTTP/1.1" 200 3466 "-" "OpenAPI-Generator/3.14.1/ruby"
Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]: pulpcore.tasking.pulpcore_worker:
INFO: Task 5435b4b7-ba82-4a6e-a538-f73fb7b6d279 failed (ModelBase object argument after ** must be a mapping, not str)

Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: pulp [e7a1b461-f227-4976-8c29-1eacad1c5dc9]: pulpcore.tasking.pulpcore_worker:
INFO:   File "/usr/lib/python3.6/site-packages/pulpcore/tasking/pulpcore_worker.py", line 332, in _perform_task
Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: result = func(*args, **kwargs)
Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", l
ine 491, in synchronize
Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: version = dv.create()
Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/declarative_vers
ion.py", line 151, in create
Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: loop.run_until_complete(pipeline)
Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_com
plete
Feb  4 13:00:56 dhcp-3-188 pulpcore-worker-3: return future.result()

vm: dhcp-3-188.vms.sat.rdu2.redhat.com

comment #4
Reproduced against pulp_rpm/main using the following script:

=====
#!/bin/bash
REPO_NAME="rhel5-ks"
REMOTE_URL=https://cdn.redhat.com/content/dist/rhel/server/5/5.11/x86_64/kickstart
pulp rpm remote create --name ${REPO_NAME} --url ${REMOTE_URL} --policy 'immediate' \
  --ca-cert @/home/vagrant/devel/pulp_startup/CDN_cert/redhat-uep.pem \
  --client-key @/home/vagrant/devel/pulp_startup/CDN_cert/cdn.key \
  --client-cert @/home/vagrant/devel/pulp_startup/CDN_cert/cdn.pem \
  --tls-validation false
pulp rpm repository create --name ${REPO_NAME} --remote ${REPO_NAME} | jq -r .pulp_href
pulp rpm repository sync --name ${REPO_NAME}
=====

Output:

=====
(pulp) []$ ./rhel5_ks_sync.sh 
{
  "pulp_href": "/pulp/api/v3/remotes/rpm/rpm/63dd2429-f64e-4acd-87d1-0161171ba481/",
  "pulp_created": "2022-02-04T21:48:48.359792Z",
  "name": "rhel5-ks",
  "url": "https://cdn.redhat.com/content/dist/rhel/server/5/5.11/x86_64/kickstart",
  "ca_cert": "...",
  "client_cert": "...",
  "tls_validation": false,
  "proxy_url": null,
  "pulp_labels": {},
  "pulp_last_updated": "2022-02-04T21:48:48.359809Z",
  "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,
  "sles_auth_token": null
}

/pulp/api/v3/repositories/rpm/rpm/b913b8de-6f9e-4ce0-9f83-396f497d1fe5/
Started background task /pulp/api/v3/tasks/4422a9c5-9d9f-4818-ae4a-097a979f78dc/
......Error: Task /pulp/api/v3/tasks/4422a9c5-9d9f-4818-ae4a-097a979f78dc/ failed: 'pulpcore.app.models.content.Artifact() argument after ** must be a mapping, not str'
(pulp) []$
=====

This fails not because sha==sha1 - it fails because the RHEL5-KS treeinfo does not include a "checksums" stanza. See https://cdn.redhat.com/content/dist/rhel/server/5/5.11/x86_64/kickstart/treeinfo

Comment #5
Correcting the problem being encountered:

At #839 in this code-block:

https://github.com/pulp/pulp_rpm/blob/main/pulp_rpm/app/tasks/synchronizing.py#L838-L845

(path, checksum) == ('images/pxeboot/initrd.img', 'x86_64')

We need to figure out where that happens - expected behavior would be ('images/pxeboot/initrd.img', {})

Comment 2 Daniel Alley 2022-07-05 16:36:26 UTC
I believe this is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2069822

Comment 3 Daniel Alley 2022-08-23 01:57:30 UTC
Documenting for the future: This was fixed with https://github.com/pulp/pulp_rpm/pull/2491 and shipped in 6.11 but not backported to 6.10 given lack of demand (only impacts RHEL 5 repos)

Comment 5 Daniel Alley 2022-10-19 19:49:21 UTC
Closing as a duplicate

*** This bug has been marked as a duplicate of bug 2069822 ***


Note You need to log in before you can comment on or make changes to this bug.