<div dir="ltr">Hi Adam,<div><br></div><div></div><div>My understanding is that you did the following:<br></div><div> * stop pulp services</div><div> * pulpcore-manager (or django-admin) reset_db<br></div><div> * pulpcore-manager migrate</div><div> * pulpcore-manager reset-admin-password --password password</div><div> * start services</div><div> * http POST :/pulp/api/v3/migration-plans/ < your_migraiton_plan.json</div><div> * http POST :/pulp/api/v3/migration-plans/48d03a72-96a1-4d36-9f8b-9a57e97846ef/run/</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 14, 2020 at 8:02 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_1549989501993885658divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hello,</p>
<p><br>
</p>
<p>so I updated my pulp3 installation from 3.4 to 3.7 and tried to rerun my pulp2 migration - but it errors out with "<span>AccessPolicy matching query does not exist". Anyone know why?</span></p>
<p><span><br>
</span></p>
<p><span>I flushed my db, reran the 'migrate' job, created a pulp2migration plan (which worked fine) and then tried to run it. Here's the complete error:</span></p>
<p><span><br>
</span></p>
<p><span></span></p>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]: pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/migration-plans/48d03a72-96a1-4d36-9f8b-9a57e97846ef/run/</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]: Traceback (most recent call last):</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner </span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     response = get_response(request)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     response = self.process_exception_by_middleware(e, request)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     return view_func(*args, **kwargs)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/rest_framework/viewsets.py", line 114, in view</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     return self.dispatch(request, *args, **kwargs)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 505, in dispatch</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     response = self.handle_exception(exc)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 465, in handle_exception</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     self.raise_uncaught_exception(exc)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     raise exc</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 502, in dispatch </span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     response = handler(request, *args, **kwargs)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/viewsets.py", line 85, in run</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     'dry_run': dry_run</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/pulpcore/tasking/tasks.py", line 236, in enqueue_with_reservation</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     **parent_kwarg, </span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     return getattr(self.get_queryset(), name)(*args, **kwargs)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 422, in create</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     obj.save(force_insert=True, using=self.db)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django_lifecycle/mixins.py", line 132, in save</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     self._run_hooked_methods(AFTER_CREATE)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django_lifecycle/mixins.py", line 207, in _run_hooked_methods</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     method()</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django_lifecycle/decorators.py", line 69, in func</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     hooked_method(*args, **kwargs)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/pulpcore/app/models/access_policy.py", line 60, in add_perms </span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     access_policy = AccessPolicy.objects.get(viewset_name=self.ACCESS_POLICY_VIEWSET_NAME)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     return getattr(self.get_queryset(), name)(*args, **kwargs)</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:   File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 408, in get</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]:     self.model._meta.object_name</span></div>
<div><span style="font-family:Consolas,Courier,monospace;font-size:9pt">Oct 14 05:43:26  gunicorn[2150852]: pulpcore.app.models.access_policy.AccessPolicy.DoesNotExist: AccessPolicy matching query does not exist</span>.</div>
<br>

<p></p>
<p><span><br>
</span></p>
<p>Regards </p>
<p>//Adam</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>