Guest User

Untitled

a guest
Aug 20th, 2012
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.46 KB | None | 0 0
  1. 2012-08-20 12:53:27,493 UNHANDLED EXCEPTION (2012-08-20 12:53:27.483460)
  2. Working directory: /opt/noc
  3. <type 'exceptions.TypeError'>
  4. int() argument must be a string or a number, not 'NoneType'
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/lib/validators.py (Line: 41)
  8. Function: is_int
  9. 34 True
  10. 35 >>> is_int("10")
  11. 36 True
  12. 37 >>> is_int("Ten")
  13. 38 False
  14. 39 """
  15. 40 try:
  16. 41 ==> v = int(v)
  17. 42 except ValueError:
  18. 43 return False
  19. 44 return True
  20. 45
  21. 46
  22. 47 def is_asn(v):
  23. Variables:
  24. v = None
  25. ------------------------------------------------------------------------
  26. File: /opt/noc/dns/models/dnszone.py (Line: 358)
  27. Function: f
  28. 351 def f(name, type, content, ttl, prio):
  29. 352 """
  30. 353 Process MX record priority
  31. 354 """
  32. 355 if type == "MX":
  33. 356 if " " in content:
  34. 357 p, rest = content.split(" ", 1)
  35. 358 ==> if is_int(prio):
  36. 359 return name, type, rest, ttl, p
  37. 360 return name, type, content, ttl, prio
  38. 361
  39. 362 ttl = self.profile.zone_ttl
  40. 363 return [f(r.left, r.type.type, r.right, ttl, None)
  41. 364 for r in self.dnszonerecord_set.exclude(left__contains="/")
  42. Variables:
  43. name = u'@'
  44. prio = None
  45. rest = u'ns2.alfalumen.am.'
  46. content = u'10 ns2.alfalumen.am.'
  47. p = u'10'
  48. ttl = 3600
  49. type = u'MX'
  50. ------------------------------------------------------------------------
  51. File: /opt/noc/dns/models/dnszone.py (Line: 364)
  52. Function: get_rr
  53. 357 p, rest = content.split(" ", 1)
  54. 358 if is_int(prio):
  55. 359 return name, type, rest, ttl, p
  56. 360 return name, type, content, ttl, prio
  57. 361
  58. 362 ttl = self.profile.zone_ttl
  59. 363 return [f(r.left, r.type.type, r.right, ttl, None)
  60. 364 ==> for r in self.dnszonerecord_set.exclude(left__contains="/")
  61. 365 ]
  62. 366
  63. 367 def get_classless_delegation(self):
  64. 368 """
  65. 369 Classless reverse zone delegation
  66. 370 :return:
  67. Variables:
  68. self = <DNSZone: alfalumen.am>
  69. r = <DNSZoneRecord: alfalumen.am @ MX 10 ns2.alfalumen.am.>
  70. f = <function f at 0x7fc26c1d7938>
  71. ttl = 3600
  72. ------------------------------------------------------------------------
  73. File: /opt/noc/dns/models/dnszone.py (Line: 427)
  74. Function: get_records
  75. 420 try:
  76. 421 return cmp(int(x1), int(y1))
  77. 422 except ValueError:
  78. 423 pass
  79. 424 return cmp(x, y)
  80. 425
  81. 426 records = []
  82. 427 ==> records += self.get_rr()
  83. 428 records += self.get_ns()
  84. 429 if self.type == "F":
  85. 430 records += self.get_ipam_a()
  86. 431 records += self.get_missed_ns_a(records)
  87. 432 order_by = cmp
  88. 433 elif self.type == "R4":
  89. Variables:
  90. cmp_ptr = <function cmp_ptr at 0x7fc27033eed8>
  91. records = []
  92. self = <DNSZone: alfalumen.am>
  93. ------------------------------------------------------------------------
  94. File: /opt/noc/dns/models/dnszone.py (Line: 174)
  95. Function: records
  96. 167 All zone records. Zone records returned as list of tuples
  97. 168 (left, type, right), where type is RR type.
  98. 169
  99. 170 :return: Zone records
  100. 171 :trype: List of tuples
  101. 172 """
  102. 173 # @todo: deprecated
  103. 174 ==> return [(a, b, c) for a, b, c, _, _ in self.get_records()]
  104. 175
  105. 176 def zonedata(self, ns):
  106. 177 """
  107. 178 Return zone data formatted for given nameserver.
  108. 179
  109. 180 :param ns: DNS Server
  110. Variables:
  111. self = <DNSZone: alfalumen.am>
  112. ------------------------------------------------------------------------
  113. File: /opt/noc/dns/generators/bindv9.py (Line: 49)
  114. Function: get_records
  115. 42 "expire" : self.zone.profile.zone_expire,
  116. 43 "pretty_expire" : self.pretty_time(self.zone.profile.zone_expire),
  117. 44 "nses" : nses
  118. 45 }
  119. 46
  120. 47 def get_records(self):
  121. 48 s="$ORIGIN %s\n"%self.zone.name
  122. 49 ==> s+=self.format_3_columns(self.zone.records)
  123. 50 return s
  124. 51
  125. 52 def get_include(self,ns):
  126. 53 def ns_list(ds):
  127. 54 s=[ns.ip for ns in ds.order_by("name") if ns.ip]
  128. 55 if s:
  129. Variables:
  130. s = u'$ORIGIN alfalumen.am\n'
  131. self = <noc.dns.generators.bindv9.Generator object at 0x7fc2704c6610>
  132. ------------------------------------------------------------------------
  133. File: /opt/noc/dns/generators/__init__.py (Line: 58)
  134. Function: get_zone
  135. 51 raise Exception,"Records Not implemented"
  136. 52
  137. 53 def get_zone(self,zone):
  138. 54 self.zone=zone
  139. 55 s=""
  140. 56 s+=self.get_header()
  141. 57 s+=self.get_soa()
  142. 58 ==> s+=self.get_records()
  143. 59 s+=self.get_footer()
  144. 60 return s
  145. 61
  146. 62 def get_include(self,ns):
  147. 63 raise Exception,"Include file is not implemented"
  148. 64
  149. Variables:
  150. s = u';;\n;; WARNING: Auto-generated zone file\n;; Do not edit manually\n;;\n$ORIGIN .\n$TTL 3600\nalfalumen.am IN SOA ns1.gnc.am. m.khachatryan.gnc.am. (\n 2012011100 ; serial\n 3600 ; refresh (1 hour)\n 900 ; retry (15 mins)\n 1436400 ; expire (4 weeks 15 hours)\n 3600 ; minimum (1 hour)\n )\n\tNS\tns1.gnc.am.\n\tNS\tns2.gnc.am.\n\n'
  151. self = <noc.dns.generators.bindv9.Generator object at 0x7fc2704c6610>
  152. zone = <DNSZone: alfalumen.am>
  153. ------------------------------------------------------------------------
  154. File: /opt/noc/dns/models/dnszone.py (Line: 186)
  155. Function: zonedata
  156. 179
  157. 180 :param ns: DNS Server
  158. 181 :type ns: DNSServer instance
  159. 182 :return: Zone data
  160. 183 :rtype: String
  161. 184 """
  162. 185 # @todo: deprecated
  163. 186 ==> return ns.generator_class().get_zone(self)
  164. 187
  165. 188 @property
  166. 189 def distribution_list(self):
  167. 190 """List of DNSServers to distribute zone
  168. 191
  169. 192 :return: List of DNSServers
  170. Variables:
  171. self = <DNSZone: alfalumen.am>
  172. ns = <DNSServer: ns1.gnc.am (Abovyan)>
  173. ------------------------------------------------------------------------
  174. File: /opt/noc/cm/models.py (Line: 538)
  175. Function: global_pull
  176. 531 o = objects[path]
  177. 532 del objects[path]
  178. 533 else:
  179. 534 logging.debug(
  180. 535 "DNSHandler.global_pull: Creating object %s" % path)
  181. 536 o = DNS(repo_path=path)
  182. 537 o.save()
  183. 538 ==> if is_differ(o.path, z.zonedata(ns)):
  184. 539 changed[z] = None
  185. 540 for o in objects.values():
  186. 541 logging.debug("DNS.global_pull: Deleting object: %s" % o.repo_path)
  187. 542 o.delete()
  188. 543 for z in changed:
  189. 544 logging.debug("DNS.global_pull: Zone %s changed" % z.name)
  190. Variables:
  191. z = <DNSZone: alfalumen.am>
  192. DNSServer = <class 'noc.dns.models.dnsserver.DNSServer'>
  193. DNSZone = <class 'noc.dns.models.dnszone.DNSZone'>
  194. changed = {<DNSZone: 127.193.130.in-addr.arpa>: None, <DNSZone: 194.47.31.in-addr.arpa>: None, <DNSZone: 100.19.46.in-addr.arpa>: None, <DNSZone: 98.19.46.in-addr.arpa>: None, <DNSZone: 6.0.10.in-addr.arpa>: None}
  195. o = <DNS: dns/ns1.gnc.am/alfalumen.am>
  196. objects = {u'ns2.gnc.am/management.gnc.am': <DNS: dns/ns2.gnc.am/management.gnc.am>, u'ns1.gnc.am/southtech.am': <DNS: dns/ns1.gnc.am/southtech.am>, u'ns1.gnc.am/sef.am': <DNS: dns/ns1.gnc.am/sef.am>, u'ns2.gnc.am/gnc.am': <DNS: dns/ns2.gnc.am/gnc.am>, u'ns2.gnc.am/alfalumen.am': <DNS: dns/ns2.gnc.am/alfalumen.am>, u'ns1.gnc.am/goriscity.am': <DNS: dns/ns1.gnc.am/goriscity.am>, u'ns2.gnc.am/goriscity.am': <DNS: dns/ns2.gnc.am/goriscity.am>, u'ns1.gnc.am/smsme.am': <DNS: dns/ns1.gnc.am/smsme.am>, u'ns1.gnc.am/gnc.am': <DNS: dns/ns1.gnc.am/gnc.am>, u'ns2.gnc.am/sef.am': <DNS: dns/ns2.gnc.am/sef.am>, u'ns2.gnc.am/southtech.am': <DNS: dns/ns2.gnc.am/southtech.am>, u'ns1.gnc.am/management.gnc.am': <DNS: dns/ns1.gnc.am/management.gnc.am>, u'ns2.gnc.am/smsme.am': <DNS: dns/ns2.gnc.am/smsme.am>}
  197. path = u'ns1.gnc.am/alfalumen.am'
  198. ns = <DNSServer: ns1.gnc.am (Abovyan)>
  199. cls = <class 'noc.cm.models.DNS'>
  200. ------------------------------------------------------------------------
  201. File: /opt/noc/cm/periodics/dns_pull.py (Line: 16)
  202. Function: execute
  203. 9
  204. 10 class Task(noc.lib.periodic.Task):
  205. 11 name="cm.dns_pull"
  206. 12 description=""
  207. 13 wait_for=["cm.dns_push"]
  208. 14 def execute(self):
  209. 15 from noc.cm.models import DNS
  210. 16 ==> DNS.global_pull()
  211. 17 return True
  212. 18
  213. Variables:
  214. self = <noc.cm.periodics.dns_pull.Task object at 0x7fc27092e650>
  215. DNS = <class 'noc.cm.models.DNS'>
  216. ------------------------------------------------------------------------
  217. File: /opt/noc/main/scheduler.py (Line: 72)
  218. Function: task_wrapper
  219. 65 t = datetime.datetime.now()
  220. 66 cwd = os.getcwd()
  221. 67 try:
  222. 68 if task.periodic_name.startswith("pyrule:"):
  223. 69 status = PyRule.call(task.periodic_name[7:],
  224. 70 timeout=task.timeout)
  225. 71 else:
  226. 72 ==> status = task.periodic(task.timeout).execute()
  227. 73 except:
  228. 74 error_report()
  229. 75 status = False
  230. 76 logging.info(u"Periodic task=%s status=%s" % (unicode(task),
  231. 77 "completed" if status else "failed"))
  232. 78 # Current path may be implicitly changed by periodic. Restore old value
  233. Variables:
  234. self = <noc.main.scheduler.Scheduler object at 0x1b94410>
  235. task = <Schedule: cm.dns_pull:Any>
  236. cwd = '/opt/noc'
  237. t = datetime.datetime(2012, 8, 20, 12, 53, 25, 843173)
  238. ------------------------------------------------------------------------
  239. END OF TRACEBACK
  240. 2012-08-20 12:53:27,494 Periodic task=cm.dns_pull:Any status=failed
Advertisement
Add Comment
Please, Sign In to add comment