Re: [Spacewalk-devel] [PATCH] Avoid a possible concurrency issue on RhnSet update

2013-09-05 Thread Silvio Moioli
On 09/05/2013 02:26 AM, Jan Pazdziora wrote:
 Please note that this will not work -- the fact that you check content
 of some table in your session and your transaction and based on that
 run the insert operation does not mean that the other session cannot
 do exactly the same, both will find the record not there, and you will
 get the ORA-1 anyway.

Good point: actually I was thinking about that statement being the only
one in its transaction, but that's actually not the case.

I think I will do as Thomas suggested, handling exceptions better in
order to be as safe as possible when ignoring them, yet accepting
failures in this specific case. I will be back with a patch as soon as I
have tested it.

Thanks for the discussion by the way, as problems in this topic are
traditionally difficult to handle!

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

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


Re: [Spacewalk-devel] patch for rhn-entitlement-report

2013-09-05 Thread Jan Dobes
Hi Shannon,
I reviewed and commited your patch as:
18d5b2f5ecaed6598a5ccb13d38abaf88a16442a

Thanks!

-- 
Jan Dobes
Satellite Engineering, Red Hat

- Original Message -
 From: Shannon Hughes shug...@redhat.com
 To: spacewalk-devel spacewalk-devel@redhat.com
 Sent: Wednesday, September 4, 2013 10:45:41 PM
 Subject: [Spacewalk-devel] patch for rhn-entitlement-report
 
 rhn-entitlement-report crashes with stack trace when you unentitle
 software channels from systems and leave unentitled:
 
 [root@litmus ~]# rhn-entitlement-report
 Software Channel Entitlements Across RHN Satellite :
Channel LabelTotal   Regular Used Available
 Total Flex Flex Used Available Flex
- --  -
 -- - --
 Traceback (most recent call last):
File /usr/bin/rhn-entitlement-report, line 100, in module
  main()
File /usr/bin/rhn-entitlement-report, line 21, in main
  printAcrossSatelliteUsage();
File /usr/bin/rhn-entitlement-report, line 38, in
 printAcrossSatelliteUsage
  for item in list:
 TypeError: 'NoneType' object is not iterable
 
 
 duplicated by setting up a few flex guests systems and then entitlement
 them.
 
 attaching patch that checks if the list is empty, print  and then return.
 
 will attach to bz 883242
 
 Regards,
 
 Shannon Hughes
 Senior SEG/GSS
 
 ___
 Spacewalk-devel mailing list
 Spacewalk-devel@redhat.com
 https://www.redhat.com/mailman/listinfo/spacewalk-devel

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