Re: [Spacewalk-list] Import of errata broken after upgrade from 2.5 to 2.6

2016-12-29 Thread Ree, Jan-Albert van
I immediately tested your patch on my test server and it works perfectly. 
Errata are parsed correctly again.
I'll update the spacewalk bugzilla report with a confirmation of succes with 
your patch.
Thanks for the awesome work :)
--
Jan-Albert


Jan-Albert van Ree  | Linux System Administrator | MARIN Support Group
MARIN | T +31 317 49 35 48 | mailto:j.a.v@marin.nl | http://www.marin.nl

MARIN news: 
http://www.marin.nl/web/News/News-items/Comparison-of-uRANS-and-BEMBEM-for-propeller-pressure-pulse-prediction.htm


From: spacewalk-list-boun...@redhat.com  on 
behalf of Patrick Hurrelmann 
Sent: Thursday, December 29, 2016 14:29
To: spacewalk-list@redhat.com
Subject: Re: [Spacewalk-list] Import of errata broken after upgrade from 2.5 to 
2.6

On 29.12.2016 10:02, Patrick Hurrelmann wrote:
> On 21.12.2016 10:24, Ree, Jan-Albert van wrote:
>> Since I haven't heard anybody else about this issue yet and haven't seen any 
>> activity on the bug I reported I thought I'd ask around here
>> Has anybody else noticed that errata no longer get imported after upgrading 
>> from Spacewalk 2.5 to 2.6 ?
>>
>> Since the upgrade at the end of every yum reposync I see the following error 
>> in the rhn_taskomatic_daemon.log file :
>>
>> ERROR com.redhat.rhn.taskomatic.task.RepoSyncTask - 04:04:07 ERROR: cannot 
>> concatenate 'str' and 'int' objects
>>
>> I've seen this behaviour on two separate machines, both running Scientific 
>> Linux 7 and both immediately after a fully working Spacewalk 2.5 instance 
>> was upgraded to 2.6
>> Both machines use a local postgresql-9.2.15 database
>>
>> My bug report : https://bugzilla.redhat.com/show_bug.cgi?id=1401488
>>
>> Regards,
>> --
>> Jan-Albert
> Hi Jan-Albert,
>
> I just updated to 2.6 and I'm facing the very same error. This is on an
> fully updated CentOS 7.3.
> Looks like an ugly regression.
>
> Regards
> Patrick
>

Hi everyone,

I digged deeper and probably found the culprit. Commit
5923c05266b8ecdc165c1e14f2b2e62a9acc1295 [1]
seems to have introduced this regression. I created small patch and it
works for me, but the fix may be wrong
though. Anyway, I created the PR#497 [2] to address this. If you are
willing to try it yourself, please get the
patch from the PR [3] or use the attached patch (if it makes it through
the list).

Best regards
Patrick

[1]
https://github.com/spacewalkproject/spacewalk/commit/5923c05266b8ecdc165c1e14f2b2e62a9acc1295
[2] https://github.com/spacewalkproject/spacewalk/pull/497
[3]
https://patch-diff.githubusercontent.com/raw/spacewalkproject/spacewalk/pull/497.patch

--
Lobster SCM GmbH, Hindenburgstraße 15, D-82343 Pöcking
HRB 178831, Amtsgericht München
Geschäftsführer: Dr. Martin Fischer, Rolf Henrich

___
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

[Spacewalk-list] new version of rhnlib problems with spacewalk proxy

2016-12-29 Thread GG

Hello,

just an FYI, not sure if it's because I still run spacewalk 2.0 and 
spacewalk-proxy with 2.0 but recently I installed 2 new spacewalk 
proxies and I noticed the first worked and the second did not ...

Platform centos 6.8 x64 with latest updates but still running spacewalk 2.0
After I compared both I figured out this was the difference ( left 
working, right not working):

rhnlib-2.5.65-1.el6.noarch  |rhnlib-2.5.72-1.el6.noarch

when I downgraded this on the newer host to this version all started to 
work again:


logs of the errors I saw with this newer rhnlib taken from spacewalkproxy:

==> /var/log/httpd/error_log <==
[Thu Dec 29 15:12:21 2016] [error] Exception reported from 
SPACEWALKPROXYHOSTNAME

[Thu Dec 29 15:12:21 2016] [error] Time: Thu Dec 29 15:12:21 2016
[Thu Dec 29 15:12:21 2016] [error] Exception type 'exceptions.KeyError'>

[Thu Dec 29 15:12:21 2016] [error] Exception while handling function handler
[Thu Dec 29 15:12:21 2016] [error] Request object information:
[Thu Dec 29 15:12:21 2016] [error] URI: /XMLRPC
[Thu Dec 29 15:12:21 2016] [error] Remote Host: CLIENTHOSTNAME
[Thu Dec 29 15:12:21 2016] [error] Server Name: SPACEWALKPROXYHOSTNAME:443
[Thu Dec 29 15:12:21 2016] [error] Headers passed in:
[Thu Dec 29 15:12:21 2016] [error] \tAccept-Encoding: identity
[Thu Dec 29 15:12:21 2016] [error] \tCONTENT_LENGTH: 2150
[Thu Dec 29 15:12:21 2016] [error] \tCONTENT_TYPE: text/xml
[Thu Dec 29 15:12:21 2016] [error] \tDOCUMENT_ROOT: /var/www/html
[Thu Dec 29 15:12:21 2016] [error] \tGATEWAY_INTERFACE: CGI/1.1
[Thu Dec 29 15:12:21 2016] [error] \tHTTPS: 1
[Thu Dec 29 15:12:21 2016] [error] \tHTTP_ACCEPT_ENCODING: identity
[Thu Dec 29 15:12:21 2016] [error] \tHTTP_HOST: SPACEWALKPROXYHOSTNAME
[Thu Dec 29 15:12:21 2016] [error] \tHTTP_USER_AGENT: 
rhn.rpclib.py/2.5.72-1.el6

[Thu Dec 29 15:12:21 2016] [error] \tHTTP_X_CLIENT_VERSION: 1
[Thu Dec 29 15:12:21 2016] [error] \tHTTP_X_INFO: RPC Processor (C) Red 
Hat, Inc (version 2.5.72-1.el6)
[Thu Dec 29 15:12:21 2016] [error] \tHTTP_X_RHN_CLIENT_CAPABILITY: 
packages.verify(1)=1,packages.extended_profile(2)=1,configfiles.base64_enc(1)=1,reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,packages.update(2)=2,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1,packages.verify(1)=1,packages.extended_profile(2)=1,configfiles.base64_enc(1)=1,reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,packages.update(2)=2,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1
[Thu Dec 29 15:12:21 2016] [error] \tHTTP_X_RHN_TRANSPORT_CAPABILITY: 
follow-redirects=3
[Thu Dec 29 15:12:21 2016] [error] \tHTTP_X_TRANSPORT_INFO: Extended 
Capabilities Transport (C) Red Hat, Inc (version 2.5.72-1.el6)

[Thu Dec 29 15:12:21 2016] [error] \tHTTP_X_UP2DATE_VERSION: 2.2.7-1.el6
[Thu Dec 29 15:12:21 2016] [error] \tHost: SPACEWALKPROXYHOSTNAME
[Thu Dec 29 15:12:21 2016] [error] \tPATH_INFO:
[Thu Dec 29 15:12:21 2016] [error] \tQUERY_STRING:
[Thu Dec 29 15:12:21 2016] [error] \tREMOTE_ADDR: IPOFCLIENT
[Thu Dec 29 15:12:21 2016] [error] \tREMOTE_PORT: 36878
[Thu Dec 29 15:12:21 2016] [error] \tREQUEST_METHOD: POST
[Thu Dec 29 15:12:21 2016] [error] \tREQUEST_URI: /XMLRPC
[Thu Dec 29 15:12:21 2016] [error] \tSCRIPT_FILENAME: 
/usr/share/rhn/wsgi/xmlrpc.py

[Thu Dec 29 15:12:21 2016] [error] \tSCRIPT_NAME: /XMLRPC
[Thu Dec 29 15:12:21 2016] [error] \tSCRIPT_URI: 
https://SPACEWALKPROXYHOSTNAME/XMLRPC

[Thu Dec 29 15:12:21 2016] [error] \tSCRIPT_URL: /XMLRPC
[Thu Dec 29 15:12:21 2016] [error] \tSERVER_ADDR: IPOFSPACEWALKPROXY
[Thu Dec 29 15:12:21 2016] [error] \tSERVER_ADMIN: root@localhost
[Thu Dec 29 15:12:21 2016] [error] \tSERVER_NAME: SPACEWALKPROXYHOSTNAME
[Thu Dec 29 15:12:21 2016] [error] \tSERVER_PORT: 443
[Thu Dec 29 15:12:21 2016] [error] \tSERVER_PROTOCOL: HTTP/1.1
[Thu Dec 29 15:12:21 2016] [error] \tSERVER_SIGNATURE: 
Apache/2.2.15 (CentOS) Server at SPACEWALKPROXYHOSTNAME Port 
443

[Thu Dec 29 15:12:21 2016] [error]
[Thu Dec 29 15:12:21 2016] [error] \tSERVER_SOFTWARE: Apache/2.2.15 (CentOS)
[Thu Dec 29 15:12:21 2016] [error] \tUser-Agent: rhn.rpclib.py/2.5.72-1.el6
[Thu Dec 29 15:12:21 2016] [error] \tX-Client-Version: 1
[Thu Dec 29 15:12:21 2016] [error] \tX-Info: RPC Processor (C) Red Hat, 
Inc (version 2.5.72-1.el6)
[Thu Dec 29 15:12:21 2016] [error] \tX-RHN-Client-Capability: 

Re: [Spacewalk-list] Import of errata broken after upgrade from 2.5 to 2.6

2016-12-29 Thread Patrick Hurrelmann
On 29.12.2016 10:02, Patrick Hurrelmann wrote:
> On 21.12.2016 10:24, Ree, Jan-Albert van wrote:
>> Since I haven't heard anybody else about this issue yet and haven't seen any 
>> activity on the bug I reported I thought I'd ask around here
>> Has anybody else noticed that errata no longer get imported after upgrading 
>> from Spacewalk 2.5 to 2.6 ?
>>
>> Since the upgrade at the end of every yum reposync I see the following error 
>> in the rhn_taskomatic_daemon.log file :
>>
>> ERROR com.redhat.rhn.taskomatic.task.RepoSyncTask - 04:04:07 ERROR: cannot 
>> concatenate 'str' and 'int' objects
>>
>> I've seen this behaviour on two separate machines, both running Scientific 
>> Linux 7 and both immediately after a fully working Spacewalk 2.5 instance 
>> was upgraded to 2.6
>> Both machines use a local postgresql-9.2.15 database
>>
>> My bug report : https://bugzilla.redhat.com/show_bug.cgi?id=1401488
>>
>> Regards,
>> --
>> Jan-Albert
> Hi Jan-Albert,
>
> I just updated to 2.6 and I'm facing the very same error. This is on an
> fully updated CentOS 7.3.
> Looks like an ugly regression.
>
> Regards
> Patrick
>

Hi everyone,

I digged deeper and probably found the culprit. Commit
5923c05266b8ecdc165c1e14f2b2e62a9acc1295 [1]
seems to have introduced this regression. I created small patch and it
works for me, but the fix may be wrong
though. Anyway, I created the PR#497 [2] to address this. If you are
willing to try it yourself, please get the
patch from the PR [3] or use the attached patch (if it makes it through
the list).

Best regards
Patrick

[1]
https://github.com/spacewalkproject/spacewalk/commit/5923c05266b8ecdc165c1e14f2b2e62a9acc1295
[2] https://github.com/spacewalkproject/spacewalk/pull/497
[3]
https://patch-diff.githubusercontent.com/raw/spacewalkproject/spacewalk/pull/497.patch

-- 
Lobster SCM GmbH, Hindenburgstraße 15, D-82343 Pöcking
HRB 178831, Amtsgericht München
Geschäftsführer: Dr. Martin Fischer, Rolf Henrich
--- /usr/lib/python2.7/site-packages/spacewalk/satellite_tools/reposync.py.orig	2016-12-29 14:20:21.437121552 +0100
+++ /usr/lib/python2.7/site-packages/spacewalk/satellite_tools/reposync.py	2016-12-29 13:49:35.401554416 +0100
@@ -400,7 +400,7 @@
 log(0, "in upload_updates")
 for notice in notices:
 notice = self.fix_notice(notice)
-advisory = notice['update_id'] + '-' + notice['version']
+advisory = notice['update_id'] + '-' + str(notice['version'])
 existing_errata = self.get_errata(notice['update_id'])
 
 e = Erratum()___
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

Re: [Spacewalk-list] Import of errata broken after upgrade from 2.5 to 2.6

2016-12-29 Thread Patrick Hurrelmann
On 21.12.2016 10:24, Ree, Jan-Albert van wrote:
> Since I haven't heard anybody else about this issue yet and haven't seen any 
> activity on the bug I reported I thought I'd ask around here
> Has anybody else noticed that errata no longer get imported after upgrading 
> from Spacewalk 2.5 to 2.6 ?
>
> Since the upgrade at the end of every yum reposync I see the following error 
> in the rhn_taskomatic_daemon.log file :
>
> ERROR com.redhat.rhn.taskomatic.task.RepoSyncTask - 04:04:07 ERROR: cannot 
> concatenate 'str' and 'int' objects
>
> I've seen this behaviour on two separate machines, both running Scientific 
> Linux 7 and both immediately after a fully working Spacewalk 2.5 instance was 
> upgraded to 2.6
> Both machines use a local postgresql-9.2.15 database
>
> My bug report : https://bugzilla.redhat.com/show_bug.cgi?id=1401488
>
> Regards,
> --
> Jan-Albert
Hi Jan-Albert,

I just updated to 2.6 and I'm facing the very same error. This is on an
fully updated CentOS 7.3.
Looks like an ugly regression.

Regards
Patrick

-- 
Lobster SCM GmbH, Hindenburgstraße 15, D-82343 Pöcking HRB 178831,
Amtsgericht München
Geschäftsführer: Dr. Martin Fischer, Rolf Henrich

___
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list


Re: [Spacewalk-list] Error when updating SSL certificates

2016-12-29 Thread Robert Paschedag

Hi Matthew,

 

SQLError: (2292, 'ORA-02292: integrity constraint (SWLKAP01.RHN_CSSSL_CACERTID_FK) violated - child record found\n', 'delete from rhnCryptoKey where id=:rhn_cryptokey_id')

 

Maybe this helps

 

https://www.techonthenet.com/oracle/errors/ora02292.php

 

Regards,

Robert

 

 

Gesendet: Mittwoch, 28. Dezember 2016 um 20:42 Uhr
Von: "Matthew Madey" 
An: "spacewalk-list@redhat.com" 
Betreff: [Spacewalk-list] Error when updating SSL certificates


I've recently converted my old SHA-1 certificate to SHA-2 using the directions outlined here: https://access.redhat.com/solutions/10809

 

However, during one of the steps, to import the new cert into the database, I'm getting the below error. Any ideas on how I can rectify this? 
 


# rhn-ssl-dbstore --ca-cert=/root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT

 

ERROR: Cannot insert certificate into DB!

 

Exception reported from spacewalk-qa.ourcompany.com

Time: Wed Dec 28 13:15:15 2016

Exception type 

 

Exception Handler Information

Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/rhn_ssl_dbstore.py", line 84, in main

    satCerts.store_rhnCryptoKey(values.label, values.ca_cert, verbosity=values.verbose)

  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satCerts.py", line 170, in store_rhnCryptoKey

    "...the traceback: %s" % fetchTraceback()), sys.exc_info()[2])

  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satCerts.py", line 157, in store_rhnCryptoKey

    verbosity=verbosity)

  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satCerts.py", line 97, in _checkCertMatch_rhnCryptoKey

    h.execute(rhn_cryptokey_id=rhn_cryptokey_id)

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 151, in execute

    return self._execute_wrapper(self._execute, *p, **kw)

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_cx_Oracle.py", line 133, in _execute_wrapper

    raise_with_tb(sql_base.SQLError(*ret), sys.exc_info()[2])

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_cx_Oracle.py", line 113, in _execute_wrapper

    retval = function(*p, **kw)

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 205, in _execute

    return self._execute_(args, kwargs)

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_cx_Oracle.py", line 167, in _execute_

    self._real_cursor.execute(*(None, ), **params)

CaCertInsertionError: ...the traceback: Exception reported from spacewalk-qa.ourcompany.com

Time: Wed Dec 28 13:15:15 2016

Exception type 

 

Exception Handler Information

Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satCerts.py", line 157, in store_rhnCryptoKey

    verbosity=verbosity)

  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satCerts.py", line 97, in _checkCertMatch_rhnCryptoKey

    h.execute(rhn_cryptokey_id=rhn_cryptokey_id)

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 151, in execute

    return self._execute_wrapper(self._execute, *p, **kw)

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_cx_Oracle.py", line 133, in _execute_wrapper

    raise_with_tb(sql_base.SQLError(*ret), sys.exc_info()[2])

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_cx_Oracle.py", line 113, in _execute_wrapper

    retval = function(*p, **kw)

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 205, in _execute

    return self._execute_(args, kwargs)

  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_cx_Oracle.py", line 167, in _execute_

    self._real_cursor.execute(*(None, ), **params)

SQLError: (2292, 'ORA-02292: integrity constraint (SWLKAP01.RHN_CSSSL_CACERTID_FK) violated - child record found\n', 'delete from rhnCryptoKey where id=:rhn_cryptokey_id')



___ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list




___
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list