Bug in carbonio-con...
 
Notifications
Clear all

Bug in carbonio-configd

1 Posts
1 Users
0 Reactions
194 Views
(@cvidal)
Active Member
Joined: 15 years ago
Posts: 23
Topic starter  

The service "carbonio-configd" starts but "systemctl status carbonio-configd" gives the error: UnboundLocalError: local variable 'rc' referenced before assignment

The bug is in the file /opt/zextras/common/lib/jylibs/state.py in 2 places, here is the patch:

--- old/state.py	2026-09-30 18:19:24.755097970 +0200
+++ new/state.py	2026-09-30 18:43:46.817291049 +0200
@@ -619,7 +619,8 @@
 				try:
 					rc = c.execute("%s='%s'" % (postconf, val))
 				except Exception, e:
-					return rc
+					Log.logMsg(1, "Postconf error (%s) on command %s='%s'" % (e,postconf, val))
+					return 1
 			self.clearPostconf()
 			return rc
 		return 0
@@ -631,7 +632,8 @@
 				try:
 					rc = c.execute("%s" % postconfd)
 				except Exception, e:
-					return rc
+					Log.logMsg(1, "Postconfd error (%s) on command '%s'" % (e, postconfd))
+					return 1
 			self.clearPostconfd()
 			return rc
 		return 0

But after you fix this, the next error is: Postconf error ('ascii' codec can't decode byte 0xc2 in position 16: ordinal not in range(128))

This is caused by the execution of postconf in a UTF-8 environment. The fix is to add the following lines to the file /etc/systemd/system/carbonio-appserver.target.wants/carbonio-configd.service:

[Service]
...
Environment="LC_ALL=C"
Environment="LANG=C"
...

   
Quote