Re: [uyuni-users] Fwd: openSUSE 15.1 tools repo sync errors?
El dt 27 de 08 de 2019 a les 06:43 +0000, en/na Julio Gonzalez va escriure: Hello Julio, That worked for me. Thank you ! regards, -- --- Jordi Bruguera i Cortada Freelancer Systems and Open Source Specialist SU SE Enterprise Architect / SUSE Certified Instructor
This is not the definitive fix, but...
Could you please backup /usr/lib/python3.6/site- packages/spacewalk/server/importlib/packageImport.py
And then apply the diff from: https://gist.github.com/juliogonzalez/fc0cc3c78fc6ba6b3a61dceb48b1c5f 1
i.e.: curl https://gist.githubusercontent.com/juliogonzalez/fc0cc3c78 fc6ba6b3a61dceb48b1c5f1/raw/87eb1764a3a8fab542f05751cc8dd699795d1ce0/ gistfile1.txt|patch -d/ -p0
Restart services: spacewalk-service restart
And finally retry the reposync.
This is part of https://github.com/uyuni-project/uyuni/pull/1315
NOTE: I was on holidays when this was develop, and the developer that did the fix is on holidays now, but he tested so it should work for you as well.
Worst case, you can just rollback /usr/lib/python3.6/site- packages/spacewalk/server/importlib/packageImport.py
On August 23, 2019 5:06:33 PM GMT+03:00, Boris Manojlovic <boris@st eki.net> wrote:
kernel-default but it is multiple packages that will trigger this (same update as in SLE SP1 in which i first noticed this issue with this specific changelog entry )
sw:~ # cat /etc/*rele* NAME="openSUSE Leap" VERSION="15.1 " ID="opensuse-leap" ID_LIKE="suse opensuse" VERSION_ID="15.1" PRETTY_NAME="openSUSE Leap 15.1" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:leap:15.1" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" Spacewalk release 4.0 (Smile) sw:~ # rpm -q --changelog kernel-default |grep -A 5 -B1 'reclaimed_journal_buckets' * Mon Jul 15 2019 colyli@suse.de - bcache: add reclaimed_journal_buckets to struct cache_set
(bsc#1140652).
- bcache: performance improvement for btree_flush_write()
(bsc#1140652).
- bcache: fix race in btree_flush_write() (bsc#1140652). - bcache: remove retry_flush_write from struct cache_set -- * Mon Jul 15 2019 colyli@suse.de - bcache: add reclaimed_journal_buckets to struct cache_set
(bsc#1140652).
- bcache: performance improvement for btree_flush_write()
(bsc#1140652).
- bcache: fix race in btree_flush_write() (bsc#1140652). - bcache: remove retry_flush_write from struct cache_set sw:~ #
On Fri, Aug 23, 2019 at 12:46 AM Strahil Nikolov
<hunter86_bg@yahoo.com> wrote:
On August 21, 2019 12:21:29 PM GMT+03:00, Boris Manojlovic
<boris@steki.net> wrote:
Hi list,
reason why all of you had issues with updates from opensuse 15.1 is kernel update that originated from suse sources (or someone made exactly SAME kind of mistake)
in source code (database code) you will find your mentioned unique index creation code
``` CREATE UNIQUE INDEX rhn_pkg_clr_pid_cld_uq
ON rhnPackageChangeLogRec (package_id, changelog_data_id) NOLOGGING TABLESPACE [[32m_tbs]];
```
so what happens in other part of code is next get changelog data from rpm, insert it into db line by line (all
text
as one row per changelog entry ) some other stuff in between try adding rpm package changelog info into table as bellow
(arbitrary
values 10 and 3 just to show point) ``` info into packagechangelogrec ( pkg_id=10 , chg_id=3 ,...); info into packagechangelogrec ( pkg_id=10 , chg_id=3 ,...); <-
second
one fails with unique index problerm ` insert will of course fail with given error (from log file
as
package has exactly same changelog entries.
hope this helps someone in future to debug this kind of error
P.S. sorry for not responding to thread as is, simply was not
subscribed
before :)
P.P.S.
Not sure list got it as i still did not confirm my subscription
before
sending...
Is it fixed, as I thought my Uyuni DB 'ended' and redeployed again : :) ? : I will need to create all repos again.
Best Regards, Strahil Nikolov
It's definitely not fixed:
01:39:50 01:39:50 Importing packages to DB: Importing packages: |--------------------------------------------------| 0.21% 01:41:24
0.21 % Importing packages: |--------------------------------------------------| 0.38% 01:42:40
duplicate key value violates unique constraint "rhn_pkg_clr_pid_cld_uq" DETAIL: Key (package_id, changelog_data_id)=(36047, 35803) already exists. 01:42:40 Unexpected error: 01:42:40 Traceback (most recent call last): File "/usr/lib/python3.6/site-
line 568, in sync ret = self.import_packages(plugin, data['id'], url, is_non_local_repo) File "/usr/lib/python3.6/site-
line 1086, in import_packages importer.run() File "/usr/lib/python3.6/site-
line 764, in run self.submit() File "/usr/lib/python3.6/site-
py", line 343, in submit transactional=self.transactional) File "/usr/lib/python3.6/site-
line 853, in
"/usr/lib/python3.6/site-
line 2158, in __processObjectCollection__ return self.__doDML(dml) File "/usr/lib/python3.6/site-
line 2263, in __doDML self.__doInsert(dml.insert, dml.tables) File "/usr/lib/python3.6/site-
line 2270, in __doInsert self.__doInsertTable(tname, dict) File "/usr/lib/python3.6/site-
line 2285, in __doInsertTable insertObj.query(hash) File "/usr/lib/python3.6/site-
, line 459, in query executeStatement(statement, values, chunksize) File "/usr/lib/python3.6/site-
, line 484, in executeStatement count += statement.executemany(**tempdict) File "/usr/lib/python3.6/site-
line 159, in executemany return self._execute_wrapper(self._executemany, *p, **kw) File "/usr/lib/python3.6/site-
.py", line 298, in _execute_wrapper retval = function(*p, **kw) File "/usr/lib/python3.6/site-
On viernes, 23 de agosto de 2019 18:53:42 (CEST) Strahil Nikolov wrote: pasted) packages/spacewalk/satellite_tools/reposync.py", packages/spacewalk/satellite_tools/reposync.py", packages/spacewalk/server/importlib/importLib.py", packages/spacewalk/server/importlib/packageImport. packages/spacewalk/server/importlib/backend.py", processPackages transactional=transactional) File packages/spacewalk/server/importlib/backend.py", packages/spacewalk/server/importlib/backend.py", packages/spacewalk/server/importlib/backend.py", packages/spacewalk/server/importlib/backend.py", packages/spacewalk/server/importlib/backendLib.py" packages/spacewalk/server/importlib/backendLib.py" packages/spacewalk/server/rhnSQL/sql_base.py", packages/spacewalk/server/rhnSQL/driver_postgresql packages/spacewalk/server/rhnSQL/driver_postgresq
l.py", line 348, in _executemany self._real_cursor.executemany(self.sql, all_kwargs) psycopg2.IntegrityError: duplicate key value violates unique constraint "rhn_pkg_clr_pid_cld_uq" DETAIL: Key (package_id, changelog_data_id)=(36047, 35803) already exists.
Does anyone know the names of the offending packages ?
Best Regards, Strahil Nikolov
-- To unsubscribe, e-mail: uyuni-users+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-users+owner@opensuse.org
Adding uyuni-devel list. I hope someone in the dev can assist us.
Best Regards, Strahil Nikolov
-- Julio González Gil Release Engineer, SUSE Manager and Uyuni jgonzalez@suse.com -- -- --
-- To unsubscribe, e-mail: uyuni-users+unsubscribe@opensuse.org To contact the owner, e-mail: uyuni-users+owner@opensuse.org
participants (1)
-
Jordi Bruguera i Cortada