4 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
Michael Mraka
mmraka at fedoraproject.org
Fri Jun 22 07:30:33 UTC 2012
backend/server/rhnVirtualization.py | 13 +++++++------
backend/spacewalk-backend.spec | 7 ++++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 14 insertions(+), 8 deletions(-)
New commits:
commit cde28b7d4207899d24e238ec27f76e4a91dc63f0
Author: Michael Mraka <michael.mraka at redhat.com>
Date: Fri Jun 22 09:30:20 2012 +0200
Automatic commit of package [spacewalk-backend] release [1.8.37-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 5aa2985..c88d366 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 1.8.36
+Version: 1.8.37
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -663,6 +663,11 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri Jun 22 2012 Michael Mraka <michael.mraka at redhat.com> 1.8.37-1
+- 811646 - handle locally exception in entitle_server()
+- don't pass the same parameter twice
+- 811646 - made error message more detailed
+
* Mon Jun 18 2012 Michael Mraka <michael.mraka at redhat.com> 1.8.36-1
- removed API for v1 clients
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 55b2a23..a3a4b74 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.8.36-1 backend/
+1.8.37-1 backend/
commit 51b390eb435f11f6d9d84c7f1f0ba719eeff1aed
Author: Michael Mraka <michael.mraka at redhat.com>
Date: Thu Jun 21 14:01:08 2012 +0200
811646 - handle locally exception in entitle_server()
raise exception in postgresql also aborts current transaction
fixing
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py", line 122, in call_function
response = apply(func, params)
File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 502, in new_system
architecture, data)
File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 429, in create_system
newserv.save(1, channel)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnServer/server_class.py", line 574, in save
self.__save(channel)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnServer/server_class.py", line 542, in __save
user_id=user_id)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnChannel.py", line 1754, in subscribe_server_channels
raise_exceptions=1)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnChannel.py", line 1709, in guess_channels_for_server
server.org_id, user_id=user_id)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnChannel.py", line 913, in channels_for_release_arch
org_id=org_id, user_id=user_id)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnChannel.py", line 732, in base_channel_for_rel_arch
org_id=org_id, user_id=user_id)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 163, in execute
return apply(self._execute_wrapper, (self._execute, ) + p, kw)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 282, in _execute_wrapper
retval = apply(function, p, kw)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 217, in _execute
return self._execute_(args, kwargs)
File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 301, in _execute_
self._real_cursor.execute(self.sql, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block
diff --git a/backend/server/rhnVirtualization.py b/backend/server/rhnVirtualization.py
index f03d31d..a7da8d8 100644
--- a/backend/server/rhnVirtualization.py
+++ b/backend/server/rhnVirtualization.py
@@ -1022,9 +1022,11 @@ class EntitlementVirtualizationListener(VirtualizationListener):
for entitlement in host_system_slots:
if entitlement not in guest_system_slots:
try:
+ rhnSQL.transaction(entitlement)
procedure.rhn_entitlements.entitle_server(guest_sid,
entitlement)
except rhnSQL.SQLError, e:
+ rhnSQL.rollback(entitlement)
log_error("Error adding entitlement %s to host ID-%s: %s"
% (entitlement, guest_sid, str(e)))
# rhnSQL.rollback()
commit 71241d7a0d84acfcca4cbd325796cb6226f192f7
Author: Michael Mraka <michael.mraka at redhat.com>
Date: Tue Jun 19 15:44:35 2012 +0200
don't pass the same parameter twice
diff --git a/backend/server/rhnVirtualization.py b/backend/server/rhnVirtualization.py
index 43c876e..f03d31d 100644
--- a/backend/server/rhnVirtualization.py
+++ b/backend/server/rhnVirtualization.py
@@ -311,13 +311,13 @@ class VirtualizationEventHandler:
if identity == IdentityType.HOST:
condition = """
vi.uuid is null
- and vi.host_system_id=:sysid
+ and vi.host_system_id=:system_id
"""
elif identity == IdentityType.GUEST:
condition = """
vi.uuid=:uuid
AND (vi.virtual_system_id is null or
- vi.virtual_system_id = :sysid)
+ vi.virtual_system_id = :system_id)
and exists (
select 1
from
@@ -346,8 +346,7 @@ class VirtualizationEventHandler:
%s
""" % (condition)
query = rhnSQL.prepare(select_sql)
- query.execute(sysid = system_id, uuid = uuid,
- system_id = system_id)
+ query.execute(system_id = system_id, uuid = uuid)
row = query.fetchone_dict() or {}
commit 7788bfdf59264e6f4aaf5490a42c80be7de690d6
Author: Michael Mraka <michael.mraka at redhat.com>
Date: Tue Jun 19 13:28:40 2012 +0200
811646 - made error message more detailed
diff --git a/backend/server/rhnVirtualization.py b/backend/server/rhnVirtualization.py
index 974a2f2..43c876e 100644
--- a/backend/server/rhnVirtualization.py
+++ b/backend/server/rhnVirtualization.py
@@ -1026,8 +1026,8 @@ class EntitlementVirtualizationListener(VirtualizationListener):
procedure.rhn_entitlements.entitle_server(guest_sid,
entitlement)
except rhnSQL.SQLError, e:
- log_error("Error adding entitlement %s: %s"
- % (entitlement, str(e)))
+ log_error("Error adding entitlement %s to host ID-%s: %s"
+ % (entitlement, guest_sid, str(e)))
# rhnSQL.rollback()
return
More information about the spacewalk-commits
mailing list