My problem with this continues.

It appears that in going from 2.3.3 the UUID generation has changes from 
something apparently "homegrown" to using the module:
__author__ = 'Ka-Ping Yee <[email protected]>'
__date__ = '$Date: 2006/06/12 23:15:40 $'.split()[1].replace('/', '-')
__version__ = '$Revision: 1.30 $'.split()[1]

This module's random uuid creation appears to call the OS's 
uuid_generate_random function. According to the man page on CentOS, this 
function reads from /dev/urandom.

Interesting "fact" about /dev/random, 
http://www.linuxfromscratch.org/hints/downloads/files/entropy.txt 

The /dev/urandom device is referred to as a pseudo-random device 
(like-random),
although /dev/random is also pseudo-random but to a lesser extent. 
/dev/urandom
uses small amounts of data from /dev/random to seed a secondary entropy 
pool.
This has the effect of inflating the real entropy so it can be conserved. 
Using
/dev/urandom can cause /dev/random's pool to become empty, but if this 
happens
/dev/urandom will not block, and it will continue using the last available
seed. This makes /dev/urandom theoretically vulnerable to outputting 
repeating
data, depending on the limitations of the algorithm used, but this is 
extremely
rare and to my knowledge has never actually happened. /dev/urandom is 
widely
considered safe for all cryptographic purposes, except by the most 
paranoid
people.


So, If you're using lots of random data (for random uuids), the random
entropy pool might get exhausted and start returning identical numbers, 
causing sequential uuid's generated by uuid_generate_random to be the 
same.
Not such a good thing.

Right now, I'm trying the advice at:
http://www.vglug.info/how-increase-entropy-pool-2-6-kernel-rhel-fedora-system-without-keyboard-mouse
 



--
Gene Carter
Team Lead, UNIX Technical Programming
Acting Team Lead, UNIX Technical Services
Ricoh Americas Corporation
Printing email makes the baby trees cry.




[email protected] 
Sent by: [email protected]
06/01/2009 04:42 PM
Please respond to
General discussion of using Zenoss <[email protected]>


To
General discussion of using Zenoss <[email protected]>
cc

Subject
Re: [zenoss-users] 2.4.x events not clearing and Integrity errors?







There were two evids duplicated in my status table (two records per evid). 
I deleted these one-by-one, first from the status table, then the history. 
Once I did that, a large number of the non-clearing events cleared and 
zenaction started running again. 

--
Gene Carter
Team Lead, UNIX Technical Programming
Acting Team Lead, UNIX Technical Services
Ricoh Americas Corporation
W: 973-882-2212
Printing email makes the baby trees cry.


[email protected] wrote on 06/01/2009 02:58:28 PM:

> 
> I upgraded to 2.4.2 this weekend and noticed that while events 
> haven't been clearing. 
> 
> In short it appears that there's a problem with: 'delete from status
> where clearid is not null ;' 
> 
> Any suggestions on how to address this would be welcome. 
> 
> Details... 
> 
> Interestingly, if I look at the detail log for one of the non-
> clearing events, I see: 
> 
> 2009/06/01 14:46:39.000 admin auto cleared 
> 2009/06/01 14:46:21.000 admin auto cleared 
> ... 
> 
> Also, I've noticed that in my zenactions.log, I am throwing database
> integrity errors... When I run zenaction run -v 10, the process 
> appears to die with: 
> 
> ########## 
> ERROR:zen.Events:(1062, "Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1") 
> Traceback (most recent call last): 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 46, in execute 
>     result = cursor.execute(statement) 
>   File "/usr/local/zenoss/python/lib/python2.4/site-
> packages/MySQLdb/cursors.py", line 137, in execute 
>     self.errorhandler(self, exc, value) 
>   File "/usr/local/zenoss/python/lib/python2.4/site-
> packages/MySQLdb/connections.py", line 33, in defaulterrorhandler 
>     raise errorclass, errorvalue 
> IntegrityError: (1062, "Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1") 
> DEBUG:zen.DbConnectionPool:Returned a connection; Pool size: 1 
> Traceback (most recent call last): 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/zenactions.py", 
> line 672, in ? 
>     za.run() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/zenactions.py", 
> line 513, in run 
>     self.schedule.run() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/Schedule.py", 
> line 94, in run 
>     self.runEvents() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/Schedule.py", 
> line 150, in runEvents 
>     prodState=prodState, 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 132, in sendEvent 
>     evid = self.doSendEvent(event) 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 173, in doSendEvent 
>     execute(curs, delete) 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 51, in execute 
>     raise ex 
> _mysql_exceptions.IntegrityError: (1062, "Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1") 
> ERROR:zen.Events:(1062, "Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1") 
> Traceback (most recent call last): 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 46, in execute 
>     result = cursor.execute(statement) 
>   File "/usr/local/zenoss/python/lib/python2.4/site-
> packages/MySQLdb/cursors.py", line 137, in execute 
>     self.errorhandler(self, exc, value) 
>   File "/usr/local/zenoss/python/lib/python2.4/site-
> packages/MySQLdb/connections.py", line 33, in defaulterrorhandler 
>     raise errorclass, errorvalue 
> IntegrityError: (1062, "Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1") 
> DEBUG:zen.DbConnectionPool:Returned a connection; Pool size: 1 
> Traceback (most recent call last): 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/zenactions.py", 
> line 672, in ? 
>     za.run() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/zenactions.py", 
> line 513, in run 
>     self.schedule.run() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/Schedule.py", 
> line 94, in run 
>     self.runEvents() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/Schedule.py", 
> line 150, in runEvents 
>     prodState=prodState, 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 132, in sendEvent 
>     evid = self.doSendEvent(event) 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 173, in doSendEvent 
>     execute(curs, delete) 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 51, in execute 
>     raise ex 
> _mysql_exceptions.IntegrityError: (1062, "Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1")ERROR:zen.Events:(1062, 
> "Duplicate entry '89cf9d82-d283-4732-92a4-082bc7a4e031' for key 1") 
> Traceback (most recent call last): 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 46, in execute 
>     result = cursor.execute(statement) 
>   File "/usr/local/zenoss/python/lib/python2.4/site-
> packages/MySQLdb/cursors.py", line 137, in execute 
>     self.errorhandler(self, exc, value) 
>   File "/usr/local/zenoss/python/lib/python2.4/site-
> packages/MySQLdb/connections.py", line 33, in defaulterrorhandler 
>     raise errorclass, errorvalue 
> IntegrityError: (1062, "Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1") 
> DEBUG:zen.DbConnectionPool:Returned a connection; Pool size: 1 
> Traceback (most recent call last): 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/zenactions.py", 
> line 672, in ? 
>     za.run() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/zenactions.py", 
> line 513, in run 
>     self.schedule.run() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/Schedule.py", 
> line 94, in run 
>     self.runEvents() 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/Schedule.py", 
> line 150, in runEvents 
>     prodState=prodState, 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 132, in sendEvent 
>     evid = self.doSendEvent(event) 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 173, in doSendEvent 
>     execute(curs, delete) 
>   File "/usr/local/zenoss/zenoss/Products/ZenEvents/MySqlSendEvent.
> py", line 51, in execute 
>     raise ex 
> _mysql_exceptions.IntegrityError: (1062, "Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1") 
> ######## 
> 
> This appears to corespond to this sql: delete from status where 
> clearid is not null 
> 
> When I run this SQL directly: 
> ######### 
> mysql> use events; 
> Reading table information for completion of table and column names 
> You can turn off this feature to get a quicker startup with -A 
> 
> Database changed 
> mysql> delete from status where clearid is not null ; 
> ERROR 1062 (23000): Duplicate entry '89cf9d82-
> d283-4732-92a4-082bc7a4e031' for key 1 
> mysql> 
> ######## 
> 
> --
> Gene Carter
> Team Lead, UNIX Technical Programming
> Acting Team Lead, UNIX Technical Services
> Ricoh Americas Corporation
> W: 973-882-2212
> Printing email makes the baby trees cry.
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to