On Wed, Oct 14, 2020 at 2:12 PM Tatiana Tereshchenko <[email protected]>
wrote:

> Hi Adam,
>
> My understanding is that you did the following:
>  * stop pulp services
>  * pulpcore-manager (or django-admin) reset_db
>  * pulpcore-manager migrate
>  * pulpcore-manager reset-admin-password --password password
>  * start services
>  * http POST :/pulp/api/v3/migration-plans/ < your_migraiton_plan.json
>  * http POST
> :/pulp/api/v3/migration-plans/48d03a72-96a1-4d36-9f8b-9a57e97846ef/run/
>

Sent too early :)
I can't reproduce it so far, so any hints about what can be special about
your environment or installation would be appreciated.
Make sure that you have at least one user which has admin privileges and
that the guardian migrations ran indeed.
  Applying guardian.0001_initial... OK
  Applying guardian.0002_generic_permissions_index... OK

Tanya





>
> On Wed, Oct 14, 2020 at 8:02 AM Winberg Adam <[email protected]> wrote:
>
>> Hello,
>>
>>
>> so I updated my pulp3 installation from 3.4 to 3.7 and tried to rerun my
>> pulp2 migration - but it errors out with "AccessPolicy matching query
>> does not exist". Anyone know why?
>>
>>
>> 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:
>>
>>
>> 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/
>> Oct 14 05:43:26  gunicorn[2150852]: Traceback (most recent call last):
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django/core/handlers/exception.py", line
>> 34, in inner
>> Oct 14 05:43:26  gunicorn[2150852]:     response = get_response(request)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 115,
>> in _get_response
>> Oct 14 05:43:26  gunicorn[2150852]:     response =
>> self.process_exception_by_middleware(e, request)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 113,
>> in _get_response
>> Oct 14 05:43:26  gunicorn[2150852]:     response =
>> wrapped_callback(request, *callback_args, **callback_kwargs)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django/views/decorators/csrf.py", line
>> 54, in wrapped_view
>> Oct 14 05:43:26  gunicorn[2150852]:     return view_func(*args, **kwargs)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/rest_framework/viewsets.py", line 114, in
>> view
>> Oct 14 05:43:26  gunicorn[2150852]:     return self.dispatch(request,
>> *args, **kwargs)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 505, in
>> dispatch
>> Oct 14 05:43:26  gunicorn[2150852]:     response =
>> self.handle_exception(exc)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 465, in
>> handle_exception
>> Oct 14 05:43:26  gunicorn[2150852]:     self.raise_uncaught_exception(exc)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 476, in
>> raise_uncaught_exception
>> Oct 14 05:43:26  gunicorn[2150852]:     raise exc
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 502, in
>> dispatch
>> Oct 14 05:43:26  gunicorn[2150852]:     response = handler(request,
>> *args, **kwargs)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/viewsets.py",
>> line 85, in run
>> Oct 14 05:43:26  gunicorn[2150852]:     'dry_run': dry_run
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/pulpcore/tasking/tasks.py", line 236, in
>> enqueue_with_reservation
>> Oct 14 05:43:26  gunicorn[2150852]:     **parent_kwarg,
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in
>> manager_method
>> Oct 14 05:43:26  gunicorn[2150852]:     return
>> getattr(self.get_queryset(), name)(*args, **kwargs)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 422, in
>> create
>> Oct 14 05:43:26  gunicorn[2150852]:     obj.save(force_insert=True,
>> using=self.db)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django_lifecycle/mixins.py", line 132, in
>> save
>> Oct 14 05:43:26  gunicorn[2150852]:
>>  self._run_hooked_methods(AFTER_CREATE)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django_lifecycle/mixins.py", line 207, in
>> _run_hooked_methods
>> Oct 14 05:43:26  gunicorn[2150852]:     method()
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django_lifecycle/decorators.py", line 69,
>> in func
>> Oct 14 05:43:26  gunicorn[2150852]:     hooked_method(*args, **kwargs)
>> 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
>> Oct 14 05:43:26  gunicorn[2150852]:     access_policy =
>> AccessPolicy.objects.get(viewset_name=self.ACCESS_POLICY_VIEWSET_NAME)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in
>> manager_method
>> Oct 14 05:43:26  gunicorn[2150852]:     return
>> getattr(self.get_queryset(), name)(*args, **kwargs)
>> Oct 14 05:43:26  gunicorn[2150852]:   File
>> "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 408, in
>> get
>> Oct 14 05:43:26  gunicorn[2150852]:     self.model._meta.object_name
>> Oct 14 05:43:26  gunicorn[2150852]:
>> pulpcore.app.models.access_policy.AccessPolicy.DoesNotExist: AccessPolicy
>> matching query does not exist.
>>
>>
>> Regards
>>
>> //Adam
>> _______________________________________________
>> Pulp-list mailing list
>> [email protected]
>> https://www.redhat.com/mailman/listinfo/pulp-list
>
>
_______________________________________________
Pulp-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-list

Reply via email to