bibi21000 / janitoo

Janitoo commons tools
0 stars 1 forks source link

Secure mqtt clients creation / removes in dhcp/network with Locks #6

Open bibi21000 opened 8 years ago

bibi21000 commented 8 years ago

A cool case study is the janitoo_tkinter application ( secondary node ).

bibi21000 commented 8 years ago
DEBUG [janitoo.mqtt] [MQTTClient] - Stop the mqtt client
ERROR [janitoo.dhcp] Catched exception
Traceback (most recent call last):
  File "/home/sebastien/devel/janitoo/janitoo/src/janitoo/dhcp.py", line 1075, in stop_resolv_heartbeat
    self.resolv_heartbeat_mqttc.stop()
AttributeError: 'NoneType' object has no attribute 'stop'
ERROR [janitoo.dhcp] Catched exception
Traceback (most recent call last):
  File "/home/sebastien/devel/janitoo/janitoo/src/janitoo/dhcp.py", line 1075, in stop_resolv_heartbeat
    self.resolv_heartbeat_mqttc.stop()
AttributeError: 'NoneType' object has no attribute 'stop'
bibi21000 commented 8 years ago

Done but do not the job.

Add lock for timers too

bibi21000 commented 8 years ago
sebastien@SATELLITE-C70D-A:~/devel/janitoo/janitoo_tkinter$ jnt_tkui 
Exception in thread Thread-41:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 1082, in run
    self.function(*self.args, **self.kwargs)
  File "/home/sebastien/devel/janitoo/janitoo/src/janitoo/dhcp.py", line 764, in finish_broadcast_users_discover
    self.fsm_network_next()
  File "build/bdist.linux-x86_64/egg/transitions/core.py", line 222, in trigger
    return self.machine.process(f)
  File "build/bdist.linux-x86_64/egg/transitions/core.py", line 526, in process
    return trigger()
  File "build/bdist.linux-x86_64/egg/transitions/core.py", line 242, in _trigger
    raise MachineError(msg)
MachineError: "Can't trigger event fsm_network_next from state STARTED!"