Hi,

I tried to enable retention through memcache or redis and I got an error for both.

With memcache on schedulerd.log
2011-10-16 17:38:18,743 [1318779498] I correctly loaded the modules : [MemcacheRetention]

2011-10-16 17:38:18,753 [1318779498] [MemcacheRetention] asking me to load the retention objects

2011-10-16 17:38:18,753 [1318779498] The instance MemcacheRetention raise an exception Keys must be str()'s, not unicode. Convert your unicode strings using mystring.encode(charset)!. I disable it and set it to restart it later

2011-10-16 17:38:18,754 [1318779498] Back trace of this remove : Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/shinken/scheduler.py", line 265, in hook_point
f(self)
File "/usr/local/lib/python2.6/dist-packages/shinken/modules/memcache_retention_scheduler.py", line 104, in hook_load_retention
val = self.mc.get(key)
File "/usr/lib/pymodules/python2.6/memcache.py", line 779, in get
return self._get('get', key)
File "/usr/lib/pymodules/python2.6/memcache.py", line 747, in _get
self.check_key(key)
File "/usr/lib/pymodules/python2.6/memcache.py", line 931, in check_key
"Keys must be str()'s, not unicode. Convert your unicode "
MemcachedStringEncodingError: Keys must be str()'s, not unicode. Convert your unicode strings using mystring.encode(charset)!
With redis on schedulerd.log
2011-10-16 17:43:17,545 [1318779797] I correctly loaded the modules : [RedisRetention]

2011-10-16 17:43:17,551 [1318779797] [RedisRetention] asking me to load the retention objects

2011-10-16 17:43:17,579 [1318779797] The instance RedisRetention raise an exception 'ascii' codec can't decode byte 0xe9 in position 1675: ordinal not in range(128). I disable it and set it to restart it later

2011-10-16 17:43:17,580 [1318779797] Back trace of this remove : Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/shinken/scheduler.py", line 265, in hook_point
f(self)
File "/usr/local/lib/python2.6/dist-packages/shinken/modules/redis_retention_scheduler.py", line 116, in hook_load_retention
val = str(unicode(val))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 1675: ordinal not in range(128)
My config for memcache is:
Code:
#Memcache definition
define module{
 module_name   MemcacheRetention
 module_type   memcache_retention
 server      127.0.0.1
 port       11211
}
Config for redis:
Code:
#Now the redisretention module
define module{
 module_name   RedisRetention
 module_type   redis_retention
 server      127.0.0.1
}
My config on my schedulers (here with redis module)
Code:
define scheduler{
 scheduler_name scheduler-master
 address     isp-inf-03-vm
 port      7768
 spare      0   ;is not a spare
 realm      All
 weight     1    ;optionnal : 1
 modules     RedisRetention
}

#The second scheduler, the slave one
define scheduler{
 scheduler_name scheduler-slave
 address     isp-inf-05-vm
 port      7768
 spare      1    ;is a spare
 realm      All
 weight     1 ;optionnal : 1
 modules     RedisRetention
}
Is there a bug or did I something wrong?

Thank you,
Gauthier