https://pulp.plan.io/https://pulp.plan.io/favicon.ico2020-11-23T17:07:57ZPulpPulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=650702020-11-23T17:07:57Zttereshcttereshc@redhat.com
<ul></ul><p>Hi Adam,</p>
<p>Do you have a large pulp2 setup? Many repositories?
I think this issue depends on pulp2 data and it would be helpful to know some details, so we can reproduce the problem.</p>
<p>How do you get content in pulp2?
Is it usually sync? On_demand?
Do you upload your own content into pulp2? Do you copy content between repositories? Is it possible that there are repositories without any feed in the importer?</p> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=650712020-11-23T17:09:51Zttereshcttereshc@redhat.com
<ul></ul><p>FWIW, I haven't tracked it down yet.
I think it might be an issue in pulpcore for the case when the same content is migrated with the remote and without.</p> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=650752020-11-23T17:35:45Zadam.winberg@smhi.se
<ul></ul><p>We have about 80 repos, where 50 of them have a feed-url, and 38 of those are synced on a regular basis. The other 12 are synced manually when needed. And the repos without a feed-url are used as frozen repo images, which we copy rpm/erratas to from the synced repos in a more controlled manner. For example we have the RHEL8 baseos repo which we sync every day, and once a week we copy important erratas from that repo to our 'frozen-baseos' repo which is then used to serve our clients.</p>
<p>We very seldom upload our own content, it is almost all synced from external repos.</p>
<p>Some outputs from migration:</p>
<pre><code> {
"code": "migrating.rpm.content",
"done": 153807,
"message": "Migrating rpm content to Pulp 3 rpm",
"state": "completed",
"suffix": null,
"total": 153807
},
{
"code": "migrating.rpm.content",
"done": 90653,
"message": "Migrating rpm content to Pulp 3 erratum",
"state": "completed",
"suffix": null,
"total": 90653
},
</code></pre> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=651642020-12-01T11:35:49Zttereshcttereshc@redhat.com
<ul><li><strong>Project</strong> changed from <i>Migration Plugin</i> to <i>Pulp</i></li></ul><p>Agreed on the pulpcore meeting last week that this shouldbe fixed in pulpcore by adding a check if a remote for an artifact exists <a href="https://github.com/pulp/pulpcore/blob/50c6705941c5f249fdacda6a52f0bd0c0efa453c/pulpcore/plugin/stages/artifact_stages.py#L297" class="external">https://github.com/pulp/pulpcore/blob/50c6705941c5f249fdacda6a52f0bd0c0efa453c/pulpcore/plugin/stages/artifact_stages.py#L297</a>.</p>
<p>Likely will need a backport for katello.</p>
<p>Moving to the pulpcore tracker.</p> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=651672020-12-01T12:32:45Zadam.winberg@smhi.se
<ul></ul><p>So I tested this a bit more.
Redid my whole migration, worked without errors.
Reran migration, worked.
Reran again the next day, when pulp2 repos had been updated and published, and content had been copied to our frozen repos (repos without feed), but the frozen repos had NOT been published - worked.
Reran again the next day after that, when the frozen repos had been published - did NOT work, got the "object has no attribute 'pk'" error.</p> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=651942020-12-01T16:01:37Zfao89
<ul><li><strong>Triaged</strong> changed from <i>No</i> to <i>Yes</i></li><li><strong>Sprint</strong> set to <i>Sprint 86</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=653262020-12-04T17:40:42Zrchan
<ul><li><strong>Sprint</strong> changed from <i>Sprint 86</i> to <i>Sprint 87</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=658552020-12-18T18:35:55Zrchan
<ul><li><strong>Sprint</strong> changed from <i>Sprint 87</i> to <i>Sprint 88</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=663272021-01-14T15:43:14Zdkliban@redhat.com
<ul><li><strong>Project</strong> changed from <i>Pulp</i> to <i>Migration Plugin</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=665302021-01-19T14:42:47Zdalleydalley@redhat.com
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=665612021-01-19T19:16:29Zttereshcttereshc@redhat.com
<ul><li><strong>Sprint/Milestone</strong> set to <i>0.9.0</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=667172021-01-22T20:32:01Zrchan
<ul><li><strong>Sprint</strong> changed from <i>Sprint 88</i> to <i>Sprint 89</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=670262021-02-02T16:53:43Zjsherril@redhat.comjsherril@redhat.com
<ul><li><strong>Tags</strong> <i>Katello</i> added</li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=672182021-02-04T22:09:53Zrchan
<ul><li><strong>Sprint</strong> changed from <i>Sprint 89</i> to <i>Sprint 90</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=675392021-02-12T12:33:30Zbmbouterbmbouter@redhat.com
<ul></ul><p>ttereshc wrote:</p>
<blockquote>
<p>Agreed on the pulpcore meeting last week that this shouldbe fixed in pulpcore by adding a check if a remote for an artifact exists <a href="https://github.com/pulp/pulpcore/blob/50c6705941c5f249fdacda6a52f0bd0c0efa453c/pulpcore/plugin/stages/artifact_stages.py#L297" class="external">https://github.com/pulp/pulpcore/blob/50c6705941c5f249fdacda6a52f0bd0c0efa453c/pulpcore/plugin/stages/artifact_stages.py#L297</a>.</p>
</blockquote>
<p>+1 to moving this back to pulpcore.</p>
<p>Can you remind me of the situation where <code>d_artifact.remote</code> is None. Does the migration plugin just not have a Remote for some d_artifact types? Which types are those?</p> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=675402021-02-12T12:46:46Zttereshcttereshc@redhat.com
<ul></ul><p>Currently it's purely the migration case:<br>
It can be an uploaded content unit (RPM or File), or a content for which pulp2 importer has been removed, or user is not interested in migrating some importer/remote, so it's not available on pulp3 side.</p>
<p>Another reason was inconsistency in pulpcore code.<br>
There are parts which already check of remote is available or not but this one place just works under assumption that a remote is always there.</p>
<p>I don't recall any other use cases. I think someone came up with potential future use cases when a remote will be null there but I don't remember them.</p> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=675512021-02-12T17:10:40Zttereshcttereshc@redhat.com
<ul><li><strong>Project</strong> changed from <i>Migration Plugin</i> to <i>Pulp</i></li><li><strong>Sprint/Milestone</strong> deleted (<del><i>0.9.0</i></del>)</li><li><strong>Quarter</strong> set to <i>Q1-2021</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=676172021-02-12T19:55:52Zbmbouterbmbouter@redhat.com
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>ASSIGNED</i></li><li><strong>Assignee</strong> set to <i>bmbouter</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=676222021-02-12T22:23:15Zpulpbot
<ul><li><strong>Status</strong> changed from <i>ASSIGNED</i> to <i>POST</i></li></ul><p>PR: <a href="https://github.com/pulp/pulpcore/pull/1125" class="external">https://github.com/pulp/pulpcore/pull/1125</a></p> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=676862021-02-16T14:23:53Zbmbouterbmbouter@redhat.com
<ul><li><strong>Status</strong> changed from <i>POST</i> to <i>MODIFIED</i></li></ul><p>Applied in changeset <a class="changeset" title="Adds additional d_artifact.remote check Not all d_artifact objects have remotes, e.g. the migrat..." href="https://pulp.plan.io/projects/pulp/repository/pulpcore/revisions/25745275c0f3a7bd832946749ed27381694d612f">pulpcore|25745275c0f3a7bd832946749ed27381694d612f</a>.</p> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=686052021-03-15T12:39:58Zipanova@redhat.comipanova@redhat.com
<ul><li><strong>Sprint/Milestone</strong> set to <i>3.11.0</i></li></ul> Pulp - Issue #7876: NoneType' object has no attribute 'pk'https://pulp.plan.io/issues/7876?journal_id=687162021-03-16T18:55:46Zipanova@redhat.comipanova@redhat.com
<ul><li><strong>Status</strong> changed from <i>MODIFIED</i> to <i>CLOSED - CURRENTRELEASE</i></li></ul>