[Pulp-list] 3.3.1 migration error

Bin Li (BLOOMBERG/ 120 PARK) bli111 at bloomberg.net
Fri May 8 22:46:47 UTC 2020


Got a different error when try upgrade from another host. I am sure it will be fine if I remove entire pulp install directory. It is interesting to see that I got different error by following the same process on different host. For this host, I install last version 3.3 from scratch instead the manual workaround.

TASK [pulp : Run pip-compile to check pulpcore/plugin compatibility] ******************************************************************
[WARNING]: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ failed_condition |
default("compatibility.rc != 0") }}
fatal: [pulp3-1]: FAILED! => {"changed": false, "cmd": ["/opt/utils/venv/pulp/3.7.3/bin/pip-compile"], "delta": "0:00:00.500886", "end": "2020-05-08 18:32:04.309943", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2020-05-08 18:32:03.809057", "stderr": "Traceback (most recent call last):\n  File \"/opt/utils/venv/pulp/3.7.3/bin/pip-compile\", line 8, in <module>\n    sys.exit(cli())\n  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/core.py\", line 764, in __call__\n    return self.main(*args, **kwargs)\n  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/core.py\", line 717, in main\n    rv = self.invoke(ctx)\n  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/core.py\", line 956, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/core.py\", line 555, in invoke\n    return callback(*args, **kwargs)\n  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/decorators.py\", line 17, in new_func\n    return f(get_current_context(), *args, **kwargs)\n  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/piptools/scripts/compile.py\", line 304, in cli\n    for ireq in filter(is_pinned_requirement, ireqs):\n  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/piptools/utils.py\", line 122, in is_pinned_requirement\n    if ireq.editable:\nAttributeError: 'ParsedRequirement' object has no attribute 'editable'", "stderr_lines": ["Traceback (most recent call last):", "  File \"/opt/utils/venv/pulp/3.7.3/bin/pip-compile\", line 8, in <module>", "    sys.exit(cli())", "  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/core.py\", line 764, in __call__", "    return self.main(*args, **kwargs)", "  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/core.py\", line 717, in main", "    rv = self.invoke(ctx)", "  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/core.py\", line 956, in invoke", "    return ctx.invoke(self.callback, **ctx.params)", "  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/core.py\", line 555, in invoke", "    return callback(*args, **kwargs)", "  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/click/decorators.py\", line 17, in new_func", "    return f(get_current_context(), *args, **kwargs)", "  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/piptools/scripts/compile.py\", line 304, in cli", "    for ireq in filter(is_pinned_requirement, ireqs):", "  File \"/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/piptools/utils.py\", line 122, in is_pinned_requirement", "    if ireq.editable:", "AttributeError: 'ParsedRequirement' object has no attribute 'editable'"], "stdout": "", "stdout_lines": []}


From: dkliban at redhat.com At: 05/08/20 17:56:41To:  Bin Li (BLOOMBERG/ 120 PARK ) 
Cc:  ggainey at redhat.com,  pulp-list at redhat.com
Subject: Re: [Pulp-list] 3.3.1 migration error

I filed the issue about the requirements.in file[0]. In the meantime you could manually install pulp_rpm using pip. Then run 'pulpcore-manager migrate'. 


[0] https://pulp.plan.io/issues/6697
On Fri, May 8, 2020 at 5:48 PM Dennis Kliban <dkliban at redhat.com> wrote:

This looks like a bug in pulp_installer. There is supposed to be a newline between pulp-rpm-client and pulp-file-client. I'll file the issue and we'll try to get a fix out on Monday.

On Fri, May 8, 2020 at 5:35 PM Bin Li (BLOOMBERG/ 120 PARK) <bli111 at bloomberg.net> wrote:

After remove entire pulp installation directory. Now I am getting an error

fatal: [pulp3-2]: FAILED! => {"changed": false, "cmd": ["/opt/utils/venv/pulp/3.7.3/bin/pip-compile"], "delta": "0:00:00.778728", "end": "2020-05-08 17:26:32.680701", "failed_when_result": true, "msg": "non-zero return code", "rc": 2, "start": "2020-05-08 17:26:31.901973", "stderr": "Could not find a version that matches pulp-rpm-clientpulp-file-client (from -r requirements.in (line 6))\nNo versions found\nWas https://artifactory.inf.bloomberg.com/artifactory/api/pypi/bloomberg-pypi-ose/simple reachable?", "stderr_lines": ["Could not find a version that matches pulp-rpm-clientpulp-file-client (from -r requirements.in (line 6))", "No versions found", "Was https://artifactory.inf.bloomberg.com/artifactory/api/pypi/bloomberg-pypi-ose/simple reachable?"], "stdout": "", "stdout_lines": []}

It looks like this file is wrong
# more /opt/utils/venv/pulp/3.7.3/requirements.in
pulpcore==3.3.1
pulp-file==0.3.0
pulp-rpm==3.3.1
# Any plugins listed below were already installed but not specified in
# pulp_install_plugins
pulp-rpm-clientpulp-file-client


From: Bin Li (BLOOMBERG/ 120 PARK) At: 05/08/20 17:15:02To:  ggainey at redhat.com
Cc:  pulp-list at redhat.com
Subject: Re: [Pulp-list] 3.3.1 migration error
No idea where it came from. The timestamp is from 4/25. I run pip uninstall pulp-rpm and it didn't remove it.

# ls -ld /opt/utils/venv/pulp/3.7.3/lib/python3.7/site-packages/pulp_rpm/app/migrations/0009_auto_20200425_1932.py
-rw-rw-r-- 1 pulp mse-python 492 Apr 25 15:32 /opt/utils/venv/pulp/3.7.3/lib/python3.7/site-packages/pulp_rpm/app/migrations/0009_auto_20200425_1932.py

# more /opt/utils/venv/pulp/3.7.3/lib/python3.7/site-packages/pulp_rpm/app/migrations/0009_auto_20200425_1932.py
# Generated by Django 2.2.12 on 2020-04-25 19:32

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('rpm', '0008_advisory_pkg_sumtype_as_int'),
    ]

    operations = [
        migrations.AlterField(
            model_name='updatecollectionpackage',
            name='sum_type',
            field=models.PositiveIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7)], null=True),
        ),


From: ggainey at redhat.com At: 05/08/20 16:21:45To:  Bin Li (BLOOMBERG/ 120 PARK ) 
Cc:  pulp-list at redhat.com
Subject: Re: [Pulp-list] 3.3.1 migration error

Hey there!
On Fri, May 8, 2020 at 3:53 PM Bin Li (BLOOMBERG/ 120 PARK) <bli111 at bloomberg.net> wrote:

Hi All,
Getting an error to upgrade from 3.3.  run 'python manage.py makemigrations --merge' gave more errors. Anyidea how this can be fixed?

TASK [pulp-database : Run database auth migrations] **********************************************************************************************************
fatal: [pulp3-2]: FAILED! => {"changed": true, "cmd": ["/opt/utils/venv/pulp/3.7.3/bin/django-admin", "migrate", "auth", "--no-input"], "delta": "0:00:03.534845", "end": "2020-05-08 15:44:20.362670", "msg": "non-zero return code", "rc": 1, "start": "2020-05-08 15:44:16.827825", "stderr": "CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0009_revision_null, 0009_auto_20200425_1932 in rpm).\nTo fix them run 'python manage.py makemigrations --merge'", "stderr_lines": ["CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0009_revision_null, 0009_auto_20200425_1932 in rpm).", "To fix them run 'python manage.py makemigrations --merge'"], "stdout": "", "stdout_lines": []}

Where did migration "0009_auto_20200425_1932" come from? Looks like it's conflicting with the delivered 0009_revision_null and causing your problem.

G-- 
Grant Gainey
Principal Software Engineer, Red Hat System Management Engineering

_______________________________________________
Pulp-list mailing list
Pulp-list at redhat.com
https://www.redhat.com/mailman/listinfo/pulp-list


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20200508/42d99353/attachment.htm>


More information about the Pulp-list mailing list