[Pulp-list] pulp3 migration directory

Dennis Kliban dkliban at redhat.com
Wed Sep 22 00:24:35 UTC 2021


All the migrations are shipped with pulpcore[0] and will be installed when
you install pulpcore 3.15 in the new virtual env. The database has a table
that keeps track of which migrations have already been applied to it. The
installer will apply only the new migrations. Did I understand your
question correctly?

[0] https://github.com/pulp/pulpcore/tree/master/pulpcore/app/migrations


On Mon, Sep 20, 2021 at 4:01 PM Bin Li (BLOOMBERG/ 120 PARK) <
bli111 at bloomberg.net> wrote:

> Thanks Mike. What you described is what we plan to do. I do see the
> migration historical files. They are under ../venv/pulp/3.7 in our case. It
> is a virtual environment used by the pulp_installer. We set the
> pulp_install_dir to this directory. Since we are upgrading python to 3.8
> for pulp 3.15. We set the pulp_install_dir to a new ../venv/pulp/3.8.
> Because this is a new python install dir, I am not sure how pulp_installer
> know where to find the historical file under the old ../venv/pulp/3.7.
> Could this be an issue for the migration?
>
> From: mikedep333 at redhat.com At: 09/20/21 12:21:22 UTC-4:00
> To: Bin Li (BLOOMBERG/ 120 PARK ) <bli111 at bloomberg.net>
> Cc: pulp-list at redhat.com
> Subject: Re: [Pulp-list] pulp3 migration directory
>
> Hi Bin,
>
> We are trying to understand what you are asking exactly.
>
> It sounds like:
> 1. you have a test environment with a copy of the production database.
> 2. You upgraded pulp on the test environment. During this, the migrations
> were ran by pulp_installer against the test database copy.
> 3. You will run the upgrade pulp on the production environment, which will
> upgrade the production database.
>
> So we have all the possibly needed migration files on disk. They are
> static, and are part of the pypi packages (and RPM packages too.) This is a
> change from the pulpcore 3.0 alpha/beta/rc behavior, when we generated the
> migrations.
>
> If you run `find /usr/local/lib/pulp | grep migrations` , you will see all
> of them. You'll see both compiled .pyc files and the original .py files.
>
> When the installer runs, it runs all the needed migrations. This is part
> of the pulp_database_config role, the task is named "Run database
> migrations".
>
> roles/pulp_database_config/README.md still refers to the pulpcore 3.0
> alpha/beta/rc behavior when it says that it "Create and run migrations." It
> only runs them now. I will fix this doc.
>
> Does this answer your questions?
>
> -Mike
>
> On Thu, Sep 16, 2021 at 4:52 PM Bin Li (BLOOMBERG/ 120 PARK) <
> bli111 at bloomberg.net> wrote:
>
>> The 3.15 release requires python 3.8. We are currently running pulpcore
>> 3.7 with python 3.7 and an external db. When we use the pulp_installer to
>> migrate the older release to 3.15 with new python 3.8 venv,it run
>> successfully in a test environment. I am wondering how the new version
>> knows the the historical migration file. Should I copy the historical
>> migration files from older python 3.7 venv to the new 3.8 venv first?
>> _______________________________________________
>> Pulp-list mailing list
>> Pulp-list at redhat.com
>> https://listman.redhat.com/mailman/listinfo/pulp-list
>
>
>
> --
>
> Mike DePaulo
>
> He / Him / His
>
> Service Reliability Engineer, Pulp
>
> Red Hat <https://www.redhat.com/>
>
> IM: mikedep333
>
> GPG: 51745404
> <https://www.redhat.com/>
>
>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://listman.redhat.com/mailman/listinfo/pulp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20210921/2dfa1f95/attachment.htm>


More information about the Pulp-list mailing list