<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Forgot my versions:</p>
<p><br>
</p>
<p></p>
<div>python3-pulp-rpm-3.7.0-1.el8.noarch</div>
<div>python3-pulpcore-3.7.3-1.el8.noarch</div>
<div><br>
</div>
So I'm not on latest, will update and test again
<p></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Winberg Adam<br>
<b>Sent:</b> 10 February 2021 16:15<br>
<b>To:</b> Tanya Tereshchenko<br>
<b>Cc:</b> pulp-list@redhat.com<br>
<b>Subject:</b> Re: [Pulp-list] how do I remove migration plugin and data</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">> Could you share your steps to reproduce the problem? </span><br>
</p>
<p>Nothing special really, just a repo migrated from pulp2 which I now tried to remove. First I just tried to remove the repoversions containing packages, only keeping version 0, since I wanted to make a fresh sync:</p>
<p><span><span style="font-family:Consolas,Courier,monospace; font-size:8pt">http DELETE https://<pulpserver></span><span style="font-family:Consolas,Courier,monospace; font-size:8pt">/pulp/api/v3/repositories/rpm/rpm/3bf87b61-8211-45ce-8a0f-377358d2e32c/versions/1/</span></span><br>
</p>
<p><br>
</p>
<p></p>
When that didn't work I tried to remove the repository altogether:
<div><span style="font-family:Consolas,Courier,monospace; font-size:8pt">http DELETE https://<pulpserver>/pulp/api/v3/repositories/rpm/rpm/3bf87b61-8211-45ce-8a0f-377358d2e32c/</span><br>
<br>
Both actions results in the same error. </div>
<div><br>
</div>
<div>I worked around this by modifying the repo using version 0 as base_version, rather than removing all existing repoversions, in order to make a fresh sync. And that worked. So it's not a pressing need, and I'm pretty sure I have removed repoversions from
 pulp2-migrated repos before. So i don't know whats different in this case. </div>
<div><br>
</div>
<div>//Adam<br>
<br>
<br>
<div style="color:rgb(0,0,0)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Tanya Tereshchenko <ttereshc@redhat.com><br>
<b>Sent:</b> 10 February 2021 14:15<br>
<b>To:</b> Winberg Adam<br>
<b>Cc:</b> pulp-list@redhat.com<br>
<b>Subject:</b> Re: [Pulp-list] how do I remove migration plugin and data</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Adam,
<div><br>
</div>
<div>There is a story filed to add an ability to remove a plugin and its data.</div>
<div>Please follow it here <a href="https://pulp.plan.io/issues/7822" id="LPlnk269497" previewremoved="true">
https://pulp.plan.io/issues/7822</a> and feel free to leave a comment to express your interest or reasons to remove.</div>
<div>We plan to work on it relatively soon, but it was not on a high priority list for us. There are 2 primary goals covered by this story and both don't seem extremely urgent:</div>
<div> - space, there is a lot of pulp2 data in pulp3 database that can be removed</div>
<div> - compatibility with other plugins, migration plugin won't be compatible with all new pulp3 releases forever, it would be good to be able to remove it; at the moment it's compatible with pulpcore 3.7+.</div>
<div><br>
</div>
<div>However if you think you are running into some problems because of having the plugin installed, it becomes important to address it sooner rather than later.</div>
<div>I tried to reproduce your issue by removing the migrated File or RPM repository/publication/distribution and all worked for me.</div>
<div>Could you share your steps to reproduce the problem? Here or feel free to file an issue in redmine <a href="https://pulp.plan.io/projects/migration/issues/new" id="LPlnk648954" previewremoved="true">https://pulp.plan.io/projects/migration/issues/new</a></div>
<div>The versions of pulpcore and plugins would be good to know (since I'm testing on the latest), as well as which resources and how you delete them. Seeing a specific cli command, API call or your script might be helpful.</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Tanya</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Feb 9, 2021 at 8:44 AM Winberg Adam <<a href="mailto:Adam.Winberg@smhi.se">Adam.Winberg@smhi.se</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_-5510328678702278499divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif">
<p>Hi,</p>
<p><br>
</p>
<p>I've finished my 2to3 migration and now I want to get rid of <span>pulp_2to3_migration related db entries. I cant find any documentation regarding this, what is the recommended procedure to do this?</span></p>
<p><span><br>
</span></p>
<p><span>Right now I get errors when trying to remove certain repos:</span></p>
<p><span><br>
</span></p>
<p><span><span style="font-family:Consolas,Courier,monospace; font-size:8pt">django.db.utils.IntegrityError: update or delete on table "core_publication" violates foreign key constraint "pulp_2to3_migration__pulp3_publication_id_221e8b1c_fk_core_publ" on table
 "pulp_2to3_migration_pulp2distributor"</span><br>
</span></p>
<p><span><br>
</span></p>
<p><span>//Adam</span></p>
<p><span><br>
</span></p>
</div>
</div>
_______________________________________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com" target="_blank">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a></blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>