SeattleTestbed / softwareupdater

Software updater daemon
MIT License
1 stars 6 forks source link

Software updater crash on several nodes #41

Closed choksi81 closed 10 years ago

choksi81 commented 10 years ago

Several of our nodes (117 at time of writing) are stuck on 0.1.1b and 0.1.1c. Inspection of some of these nodes revealed that the software updater was actually not running.

We found this error message in cronlog.txt on the nodes that we inspected:

Full debugging traceback:
  "/home/uw_seattle/seattle/seattle_repy/emulcomm.py", line 694, in run
  "softwareupdater.repyhelpercache/ntp_time_repy.py", line 164, in _time_decode_NTP_packet
  "softwareupdater.repyhelpercache/ntp_time_repy.py", line 157, in _time_convert_timestamp_to_float

-------------------------------

### Do the conversion / decoding for NTP.   More details about the
### format of NTP are at RFC 2030 (http://www.ietf.org/rfc/rfc2030.txt)

# this unpacks the data from the packet and changes it to a float
def _time_convert_timestamp_to_float(timestamp):
  integerpart = (ord(timestamp[+ (ord(timestamp[1](0])<<24)))<<16) + (ord(timestamp[+ (ord(timestamp[3](2])<<8))))
  floatpart = (ord(timestamp[+ (ord(timestamp[5](4])<<24)))<<16) + (ord(timestamp[+ (ord(timestamp[7](6])<<8))))
  return integerpart + floatpart / float(2**32)

def _time_decode_NTP_packet(ip, port, mess, ch):
  # I got a time response packet.   Remember it and notify that I got it.
  mycontext[ mycontext['ntp_time_got_time']('ntp_time_received_times'].append(_time_convert_timestamp_to_float(mess[40:48]))
) = True