View | Details | Raw Unified | Return to bug 32818
Collapse All | Expand All

(-)a/branches/ucs-3.2/ucs-3.2-0/doc/changelog/changelog-3.2.xml (+4 lines)
 Lines 710-715    Link Here 
710
		<listitem><simpara>
710
		<listitem><simpara>
711
			The command <command>dh-umc-module-build</command> no longer prints a warning message for a failed import and aborts on errors when building UMC module packages (<ulink url="&ucsbug;31123">Bug 31123</ulink>, <ulink url="&ucsbug;32814">Bug 32814</ulink>).
711
			The command <command>dh-umc-module-build</command> no longer prints a warning message for a failed import and aborts on errors when building UMC module packages (<ulink url="&ucsbug;31123">Bug 31123</ulink>, <ulink url="&ucsbug;32814">Bug 32814</ulink>).
712
		</simpara></listitem>
712
		</simpara></listitem>
713
714
		<listitem><simpara>
715
			UMC modules now handle the server restart more gracefully (<ulink url="&ucsbug;32814">Bug #32814</ulink>).
716
		</simpara></listitem>
713
	  </itemizedlist>
717
	  </itemizedlist>
714
  </section>
718
  </section>
715
719
(-)a/branches/ucs-3.2/ucs-3.2-0/management/univention-management-console/debian/changelog (+1 lines)
 Lines 2-7   univention-management-console (6.0.16-1) unstable; urgency=low Link Here 
2
2
3
  * Remove warning (Bug #31123)
3
  * Remove warning (Bug #31123)
4
  * Abort on error (Bug #32814)
4
  * Abort on error (Bug #32814)
5
  * Handle connection close (Bug #32818)
5
6
6
 -- Philipp Hahn <hahn@univention.de>  Tue, 08 Oct 2013 10:25:50 +0200
7
 -- Philipp Hahn <hahn@univention.de>  Tue, 08 Oct 2013 10:25:50 +0200
7
8
(-)a/branches/ucs-3.2/ucs-3.2-0/management/univention-management-console/src/univention/management/console/protocol/modserver.py (-8 / +14 lines)
 Lines 51-56   _ = NullTranslation( 'univention.management.console' ).translate Link Here 
51
import locale
51
import locale
52
import notifier
52
import notifier
53
import notifier.threads as threads
53
import notifier.threads as threads
54
from socket import error as SocketError
55
import errno
56
54
57
55
class ModuleServer( Server ):
58
class ModuleServer( Server ):
56
	"""Implements an UMC module server
59
	"""Implements an UMC module server
 Lines 98-104   class ModuleServer( Server ): Link Here 
98
			self.__handler = self.__module.Instance()
101
			self.__handler = self.__module.Instance()
99
			self.__handler.signal_connect( 'success', notifier.Callback( self._reply, True ) )
102
			self.__handler.signal_connect( 'success', notifier.Callback( self._reply, True ) )
100
			self.__handler.signal_connect( 'failure', notifier.Callback( self._reply, True ) )
103
			self.__handler.signal_connect( 'failure', notifier.Callback( self._reply, True ) )
101
		except Exception, e:
104
		except Exception:
102
			import traceback
105
			import traceback
103
			traceback.print_exc()
106
			traceback.print_exc()
104
			sys.exit( 5 )
107
			sys.exit( 5 )
 Lines 126-135   class ModuleServer( Server ): Link Here 
126
			notifier.timer_remove( self.__timer )
129
			notifier.timer_remove( self.__timer )
127
			self.__timer == None
130
			self.__timer == None
128
131
129
		data = socket.recv( RECV_BUFFER_SIZE )
132
		try:
133
			data = socket.recv( RECV_BUFFER_SIZE )
134
		except SocketError, ex:
135
			MODULE.error('Failed connection: %s' % (errno.errorcode.get(ex.errno, ex.errno),))
136
			data = None
130
137
131
		# connection closed?
138
		# connection closed?
132
		if not len( data ):
139
		if not data:
133
			socket.close()
140
			socket.close()
134
			# remove socket from notifier
141
			# remove socket from notifier
135
			return False
142
			return False
 Lines 143-149   class ModuleServer( Server ): Link Here 
143
				self.__buffer = msg.parse( self.__buffer )
150
				self.__buffer = msg.parse( self.__buffer )
144
				MODULE.info( "Received request %s" % msg.id )
151
				MODULE.info( "Received request %s" % msg.id )
145
				self.handle( msg )
152
				self.handle( msg )
146
		except IncompleteMessageError, e:
153
		except IncompleteMessageError:
147
			MODULE.info( 'Failed to parse incomplete message' )
154
			MODULE.info( 'Failed to parse incomplete message' )
148
		except ( ParseError, UnknownCommandError ), e:
155
		except ( ParseError, UnknownCommandError ), e:
149
			MODULE.error( 'Failed to parse message: %s' % str( e ) )
156
			MODULE.error( 'Failed to parse message: %s' % str( e ) )
 Lines 220-226   class ModuleServer( Server ): Link Here 
220
			if 'acls' in msg.options and 'commands' in msg.options and 'credentials' in msg.options:
227
			if 'acls' in msg.options and 'commands' in msg.options and 'credentials' in msg.options:
221
				try:
228
				try:
222
					self.__handler.init()
229
					self.__handler.init()
223
				except BaseException, e:
230
				except BaseException:
224
					import traceback, sys
231
					import traceback, sys
225
					resp.status = MODULE_ERR
232
					resp.status = MODULE_ERR
226
					exc_info = sys.exc_info()
233
					exc_info = sys.exc_info()
 Lines 272-279   class ModuleServer( Server ): Link Here 
272
			length = len( self.__queue )
279
			length = len( self.__queue )
273
			try:
280
			try:
274
				ret = self.__comm.send( self.__queue )
281
				ret = self.__comm.send( self.__queue )
275
			except socket.error, e:
282
			except SocketError, ex:
276
				if e[0] == 11:
283
				if ex.errno == errno.EWOULDBLOCK:
277
					return True
284
					return True
278
				raise
285
				raise
279
286
280
- 

Return to bug 32818