Project

Profile

Help

Issue #1910

Errata update fails when id of the repo is added to the existing collection

Added by ttereshc over 4 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.8.5
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 2
Quarter:

Description

It can happen if the erratum (which was synced before this fix) is updated and its pkglist has not changed since then.

May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192) Could not save document (Cannot update 'pkglist.0._pulp_repo_id' and 'pkglist' at the same time)
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192) Traceback (most recent call last):
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192)   File "/home/user1/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/sync.py", line 233, in run
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192)     self.get_errata(metadata_files)
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192)   File "/home/user1/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/sync.py", line 765, in get_errata
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192)     updateinfo.process_package_element, additive_type=True)
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192)   File "/home/user1/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/sync.py", line 857, in save_fileless_units
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192)     model.save()
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 398, in save
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192)     raise OperationError(message %% unicode(err))
May 11 20:06:39 dev pulp[7116]: pulp_rpm.plugins.importers.yum.sync:ERROR: (7116-76192) OperationError: Could not save document (Cannot update 'pkglist.0._pulp_repo_id' and 'pkglist' at the same time)

Associated revisions

Revision cab29d0e View on GitHub
Added by ttereshc over 4 years ago

Save modifications to the erratum pkglist before adding new collections.

It is needed because mongoengine does not allow to modify items in the list and to add a new ones to the list at the same time. And sometimes we are in this situation during the update of the erratum.

closes #1910 https://pulp.plan.io/issues/1910

History

#1 Updated by ttereshc over 4 years ago

The problem is here.
It is not allowed to do modifications (like on the line 580 or 589) and add new collections (line 594) at the same time.

#2 Updated by ttereshc over 4 years ago

  • Status changed from ASSIGNED to POST

#3 Updated by dkliban@redhat.com over 4 years ago

  • Triaged changed from No to Yes

#4 Updated by ttereshc over 4 years ago

  • Sprint/Milestone set to 20

#5 Updated by ttereshc over 4 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#6 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#7 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.4 to 2.8.5

#8 Updated by semyers over 4 years ago

  • Status changed from 5 to MODIFIED

#9 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#10 Updated by pthomas@redhat.com over 4 years ago

  • Status changed from 5 to 6

verified

[root@hp-ml350pgen8-01 ~]# pulp-admin rpm repo remove  rpm  --repo-id rhel7-2 --str-eq "name=zsh"
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Units Removed:
  zsh-5.0.2-14.el7-x86_64
  zsh-5.0.2-7.el7-x86_64
  zsh-5.0.2-7.el7_1.1-x86_64
  zsh-5.0.2-7.el7_1.2-x86_64

[root@hp-ml350pgen8-01 ~]# pulp-admin rpm repo sync run --repo-id rhel7-2
+----------------------------------------------------------------------+
                   Synchronizing Repository [rhel7-2]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.

Downloading metadata...
[\]
... completed

Downloading repository content...
[|]
[==================================================] 100%
RPMs:       178/178 items
Delta RPMs: 0/0 items

... completed

Individual package errors encountered during sync:

Package:
http://cdn.rcm-internal.redhat.com/content/dist/rhel/rhui/server/7/7.2/x86_64/os
/Packages/libgudev1-devel-219-19.el7_2.11.i686.rpm
Error:   

Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items
... completed

Importing errata...
[\]
... completed

Importing package groups/categories...
[-]
... completed

Cleaning duplicate packages...
[\]
... completed

Task Succeeded

Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[==================================================] 100%
11041 of 11041 items
... completed

Publishing Delta RPMs
... skipped

Publishing Errata
[==================================================] 100%
1229 of 1229 items
... completed

Publishing Comps file
[==================================================] 100%
86 of 86 items
... completed

Publishing Metadata.
[-]
... completed

Closing repo metadata
[-]
... completed

Generating sqlite files
... skipped

Publishing files to web
[\]
... completed

Writing Listings File
[-]
... completed

Task Succeeded

[root@hp-ml350pgen8-01 ~]# pulp-admin rpm repo content  rpm  --repo-id rhel7-2 --str-eq "name=zsh"
Arch:         x86_64
Buildhost:    x86-035.build.eng.bos.redhat.com
Checksum:     d1a92ff6328ceb6eede38877b1208b6da95b6f46
Checksumtype: sha1
Description:  The zsh shell is a command interpreter usable as an interactive
              login shell and as a shell script command processor.  Zsh
              resembles the ksh shell (the Korn shell), but includes many
              enhancements.  Zsh supports command line editing, built-in
              spelling correction, programmable command completion, shell
              functions (with autoloading), a history mechanism, and more.
Epoch:        0
Filename:     zsh-5.0.2-14.el7.x86_64.rpm
License:      MIT
Name:         zsh
Provides:     config(zsh) = 5.0.2-14.el7-0, zsh = 5.0.2-14.el7-0, zsh(x86-64) =
              5.0.2-14.el7-0
Release:      14.el7
Requires:     /bin/sh, /bin/sh, /sbin/install-info, /sbin/install-info,
              coreutils, grep, grep, libc.so.6()(64bit),
              libc.so.6(GLIBC_2.11)(64bit), libc.so.6(GLIBC_2.14)(64bit),
              libc.so.6(GLIBC_2.15)(64bit), libc.so.6(GLIBC_2.2.5)(64bit),
              libc.so.6(GLIBC_2.3)(64bit), libc.so.6(GLIBC_2.3.4)(64bit),
              libc.so.6(GLIBC_2.4)(64bit), libc.so.6(GLIBC_2.7)(64bit),
              libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit),
              libm.so.6()(64bit), libm.so.6(GLIBC_2.2.5)(64bit),
              libncursesw.so.5()(64bit), librt.so.1()(64bit),
              librt.so.1(GLIBC_2.2.5)(64bit), libtinfo.so.5()(64bit),
              rtld(GNU_HASH)
Version:      5.0.2

Arch:         x86_64
Buildhost:    x86-020.build.eng.bos.redhat.com
Checksum:     322b2e83df4109dc6ffa98fd93aab6ef4f1a5e09
Checksumtype: sha1
Description:  The zsh shell is a command interpreter usable as an interactive
              login shell and as a shell script command processor.  Zsh
              resembles the ksh shell (the Korn shell), but includes many
              enhancements.  Zsh supports command line editing, built-in
              spelling correction, programmable command completion, shell
              functions (with autoloading), a history mechanism, and more.
Epoch:        0
Filename:     zsh-5.0.2-7.el7_1.1.x86_64.rpm
License:      MIT
Name:         zsh
Provides:     config(zsh) = 5.0.2-7.el7_1.1-0, zsh = 5.0.2-7.el7_1.1-0,
              zsh(x86-64) = 5.0.2-7.el7_1.1-0
Release:      7.el7_1.1
Requires:     /bin/sh, /bin/sh, /sbin/install-info, /sbin/install-info,
              coreutils, grep, grep, libc.so.6()(64bit),
              libc.so.6(GLIBC_2.11)(64bit), libc.so.6(GLIBC_2.14)(64bit),
              libc.so.6(GLIBC_2.15)(64bit), libc.so.6(GLIBC_2.2.5)(64bit),
              libc.so.6(GLIBC_2.3)(64bit), libc.so.6(GLIBC_2.3.4)(64bit),
              libc.so.6(GLIBC_2.4)(64bit), libc.so.6(GLIBC_2.7)(64bit),
              libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit),
              libgcc_s.so.1()(64bit), libgcc_s.so.1(GCC_3.0)(64bit),
              libgcc_s.so.1(GCC_3.3.1)(64bit), libm.so.6()(64bit),
              libm.so.6(GLIBC_2.2.5)(64bit), libncursesw.so.5()(64bit),
              librt.so.1()(64bit), librt.so.1(GLIBC_2.2.5)(64bit),
              libtinfo.so.5()(64bit), rtld(GNU_HASH)
Version:      5.0.2

Arch:         x86_64
Buildhost:    x86-024.build.eng.bos.redhat.com
Checksum:     7f754c90587fe202be78eec63c19a264c05ef0db
Checksumtype: sha1
Description:  The zsh shell is a command interpreter usable as an interactive
              login shell and as a shell script command processor.  Zsh
              resembles the ksh shell (the Korn shell), but includes many
              enhancements.  Zsh supports command line editing, built-in
              spelling correction, programmable command completion, shell
              functions (with autoloading), a history mechanism, and more.
Epoch:        0
Filename:     zsh-5.0.2-7.el7.x86_64.rpm
License:      MIT
Name:         zsh
Provides:     config(zsh) = 5.0.2-7.el7-0, zsh = 5.0.2-7.el7-0, zsh(x86-64) =
              5.0.2-7.el7-0
Release:      7.el7
Requires:     /bin/sh, /bin/sh, /sbin/install-info, /sbin/install-info,
              coreutils, grep, grep, libc.so.6()(64bit),
              libc.so.6(GLIBC_2.11)(64bit), libc.so.6(GLIBC_2.14)(64bit),
              libc.so.6(GLIBC_2.15)(64bit), libc.so.6(GLIBC_2.2.5)(64bit),
              libc.so.6(GLIBC_2.3)(64bit), libc.so.6(GLIBC_2.3.4)(64bit),
              libc.so.6(GLIBC_2.4)(64bit), libc.so.6(GLIBC_2.7)(64bit),
              libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit),
              libgcc_s.so.1()(64bit), libgcc_s.so.1(GCC_3.0)(64bit),
              libgcc_s.so.1(GCC_3.3.1)(64bit), libm.so.6()(64bit),
              libm.so.6(GLIBC_2.2.5)(64bit), libncursesw.so.5()(64bit),
              librt.so.1()(64bit), librt.so.1(GLIBC_2.2.5)(64bit),
              libtinfo.so.5()(64bit), rtld(GNU_HASH)
Version:      5.0.2

Arch:         x86_64
Buildhost:    x86-019.build.eng.bos.redhat.com
Checksum:     b7e99cbca143d647f78c60986685c4eceb85a8bf
Checksumtype: sha1
Description:  The zsh shell is a command interpreter usable as an interactive
              login shell and as a shell script command processor.  Zsh
              resembles the ksh shell (the Korn shell), but includes many
              enhancements.  Zsh supports command line editing, built-in
              spelling correction, programmable command completion, shell
              functions (with autoloading), a history mechanism, and more.
Epoch:        0
Filename:     zsh-5.0.2-14.el7_2.2.x86_64.rpm
License:      MIT
Name:         zsh
Provides:     config(zsh) = 5.0.2-14.el7_2.2-0, zsh = 5.0.2-14.el7_2.2-0,
              zsh(x86-64) = 5.0.2-14.el7_2.2-0
Release:      14.el7_2.2
Requires:     /bin/sh, /bin/sh, /sbin/install-info, /sbin/install-info,
              coreutils, grep, grep, libc.so.6()(64bit),
              libc.so.6(GLIBC_2.11)(64bit), libc.so.6(GLIBC_2.14)(64bit),
              libc.so.6(GLIBC_2.15)(64bit), libc.so.6(GLIBC_2.2.5)(64bit),
              libc.so.6(GLIBC_2.3)(64bit), libc.so.6(GLIBC_2.3.4)(64bit),
              libc.so.6(GLIBC_2.4)(64bit), libc.so.6(GLIBC_2.7)(64bit),
              libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit),
              libm.so.6()(64bit), libm.so.6(GLIBC_2.2.5)(64bit),
              libncursesw.so.5()(64bit), librt.so.1()(64bit),
              librt.so.1(GLIBC_2.2.5)(64bit), libtinfo.so.5()(64bit),
              rtld(GNU_HASH)
Version:      5.0.2

Arch:         x86_64
Buildhost:    x86-030.build.eng.bos.redhat.com
Checksum:     459ea5cad05fbc7dfac7c75f59893236c11b7697
Checksumtype: sha1
Description:  The zsh shell is a command interpreter usable as an interactive
              login shell and as a shell script command processor.  Zsh
              resembles the ksh shell (the Korn shell), but includes many
              enhancements.  Zsh supports command line editing, built-in
              spelling correction, programmable command completion, shell
              functions (with autoloading), a history mechanism, and more.
Epoch:        0
Filename:     zsh-5.0.2-7.el7_1.2.x86_64.rpm
License:      MIT
Name:         zsh
Provides:     config(zsh) = 5.0.2-7.el7_1.2-0, zsh = 5.0.2-7.el7_1.2-0,
              zsh(x86-64) = 5.0.2-7.el7_1.2-0
Release:      7.el7_1.2
Requires:     /bin/sh, /bin/sh, /sbin/install-info, /sbin/install-info,
              coreutils, grep, grep, libc.so.6()(64bit),
              libc.so.6(GLIBC_2.11)(64bit), libc.so.6(GLIBC_2.14)(64bit),
              libc.so.6(GLIBC_2.15)(64bit), libc.so.6(GLIBC_2.2.5)(64bit),
              libc.so.6(GLIBC_2.3)(64bit), libc.so.6(GLIBC_2.3.4)(64bit),
              libc.so.6(GLIBC_2.4)(64bit), libc.so.6(GLIBC_2.7)(64bit),
              libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit),
              libgcc_s.so.1()(64bit), libgcc_s.so.1(GCC_3.0)(64bit),
              libgcc_s.so.1(GCC_3.3.1)(64bit), libm.so.6()(64bit),
              libm.so.6(GLIBC_2.2.5)(64bit), libncursesw.so.5()(64bit),
              librt.so.1()(64bit), librt.so.1(GLIBC_2.2.5)(64bit),
              libtinfo.so.5()(64bit), rtld(GNU_HASH)
Version:      5.0.2

#11 Updated by semyers over 4 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#13 Updated by bmbouter over 2 years ago

  • Sprint set to Sprint 2

#14 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (20)

#15 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF