Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2012-08-20 12:53:27,493 UNHANDLED EXCEPTION (2012-08-20 12:53:27.483460)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- int() argument must be a string or a number, not 'NoneType'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/validators.py (Line: 41)
- Function: is_int
- 34 True
- 35 >>> is_int("10")
- 36 True
- 37 >>> is_int("Ten")
- 38 False
- 39 """
- 40 try:
- 41 ==> v = int(v)
- 42 except ValueError:
- 43 return False
- 44 return True
- 45
- 46
- 47 def is_asn(v):
- Variables:
- v = None
- ------------------------------------------------------------------------
- File: /opt/noc/dns/models/dnszone.py (Line: 358)
- Function: f
- 351 def f(name, type, content, ttl, prio):
- 352 """
- 353 Process MX record priority
- 354 """
- 355 if type == "MX":
- 356 if " " in content:
- 357 p, rest = content.split(" ", 1)
- 358 ==> if is_int(prio):
- 359 return name, type, rest, ttl, p
- 360 return name, type, content, ttl, prio
- 361
- 362 ttl = self.profile.zone_ttl
- 363 return [f(r.left, r.type.type, r.right, ttl, None)
- 364 for r in self.dnszonerecord_set.exclude(left__contains="/")
- Variables:
- name = u'@'
- prio = None
- rest = u'ns2.alfalumen.am.'
- content = u'10 ns2.alfalumen.am.'
- p = u'10'
- ttl = 3600
- type = u'MX'
- ------------------------------------------------------------------------
- File: /opt/noc/dns/models/dnszone.py (Line: 364)
- Function: get_rr
- 357 p, rest = content.split(" ", 1)
- 358 if is_int(prio):
- 359 return name, type, rest, ttl, p
- 360 return name, type, content, ttl, prio
- 361
- 362 ttl = self.profile.zone_ttl
- 363 return [f(r.left, r.type.type, r.right, ttl, None)
- 364 ==> for r in self.dnszonerecord_set.exclude(left__contains="/")
- 365 ]
- 366
- 367 def get_classless_delegation(self):
- 368 """
- 369 Classless reverse zone delegation
- 370 :return:
- Variables:
- self = <DNSZone: alfalumen.am>
- r = <DNSZoneRecord: alfalumen.am @ MX 10 ns2.alfalumen.am.>
- f = <function f at 0x7fc26c1d7938>
- ttl = 3600
- ------------------------------------------------------------------------
- File: /opt/noc/dns/models/dnszone.py (Line: 427)
- Function: get_records
- 420 try:
- 421 return cmp(int(x1), int(y1))
- 422 except ValueError:
- 423 pass
- 424 return cmp(x, y)
- 425
- 426 records = []
- 427 ==> records += self.get_rr()
- 428 records += self.get_ns()
- 429 if self.type == "F":
- 430 records += self.get_ipam_a()
- 431 records += self.get_missed_ns_a(records)
- 432 order_by = cmp
- 433 elif self.type == "R4":
- Variables:
- cmp_ptr = <function cmp_ptr at 0x7fc27033eed8>
- records = []
- self = <DNSZone: alfalumen.am>
- ------------------------------------------------------------------------
- File: /opt/noc/dns/models/dnszone.py (Line: 174)
- Function: records
- 167 All zone records. Zone records returned as list of tuples
- 168 (left, type, right), where type is RR type.
- 169
- 170 :return: Zone records
- 171 :trype: List of tuples
- 172 """
- 173 # @todo: deprecated
- 174 ==> return [(a, b, c) for a, b, c, _, _ in self.get_records()]
- 175
- 176 def zonedata(self, ns):
- 177 """
- 178 Return zone data formatted for given nameserver.
- 179
- 180 :param ns: DNS Server
- Variables:
- self = <DNSZone: alfalumen.am>
- ------------------------------------------------------------------------
- File: /opt/noc/dns/generators/bindv9.py (Line: 49)
- Function: get_records
- 42 "expire" : self.zone.profile.zone_expire,
- 43 "pretty_expire" : self.pretty_time(self.zone.profile.zone_expire),
- 44 "nses" : nses
- 45 }
- 46
- 47 def get_records(self):
- 48 s="$ORIGIN %s\n"%self.zone.name
- 49 ==> s+=self.format_3_columns(self.zone.records)
- 50 return s
- 51
- 52 def get_include(self,ns):
- 53 def ns_list(ds):
- 54 s=[ns.ip for ns in ds.order_by("name") if ns.ip]
- 55 if s:
- Variables:
- s = u'$ORIGIN alfalumen.am\n'
- self = <noc.dns.generators.bindv9.Generator object at 0x7fc2704c6610>
- ------------------------------------------------------------------------
- File: /opt/noc/dns/generators/__init__.py (Line: 58)
- Function: get_zone
- 51 raise Exception,"Records Not implemented"
- 52
- 53 def get_zone(self,zone):
- 54 self.zone=zone
- 55 s=""
- 56 s+=self.get_header()
- 57 s+=self.get_soa()
- 58 ==> s+=self.get_records()
- 59 s+=self.get_footer()
- 60 return s
- 61
- 62 def get_include(self,ns):
- 63 raise Exception,"Include file is not implemented"
- 64
- Variables:
- 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'
- self = <noc.dns.generators.bindv9.Generator object at 0x7fc2704c6610>
- zone = <DNSZone: alfalumen.am>
- ------------------------------------------------------------------------
- File: /opt/noc/dns/models/dnszone.py (Line: 186)
- Function: zonedata
- 179
- 180 :param ns: DNS Server
- 181 :type ns: DNSServer instance
- 182 :return: Zone data
- 183 :rtype: String
- 184 """
- 185 # @todo: deprecated
- 186 ==> return ns.generator_class().get_zone(self)
- 187
- 188 @property
- 189 def distribution_list(self):
- 190 """List of DNSServers to distribute zone
- 191
- 192 :return: List of DNSServers
- Variables:
- self = <DNSZone: alfalumen.am>
- ns = <DNSServer: ns1.gnc.am (Abovyan)>
- ------------------------------------------------------------------------
- File: /opt/noc/cm/models.py (Line: 538)
- Function: global_pull
- 531 o = objects[path]
- 532 del objects[path]
- 533 else:
- 534 logging.debug(
- 535 "DNSHandler.global_pull: Creating object %s" % path)
- 536 o = DNS(repo_path=path)
- 537 o.save()
- 538 ==> if is_differ(o.path, z.zonedata(ns)):
- 539 changed[z] = None
- 540 for o in objects.values():
- 541 logging.debug("DNS.global_pull: Deleting object: %s" % o.repo_path)
- 542 o.delete()
- 543 for z in changed:
- 544 logging.debug("DNS.global_pull: Zone %s changed" % z.name)
- Variables:
- z = <DNSZone: alfalumen.am>
- DNSServer = <class 'noc.dns.models.dnsserver.DNSServer'>
- DNSZone = <class 'noc.dns.models.dnszone.DNSZone'>
- 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}
- o = <DNS: dns/ns1.gnc.am/alfalumen.am>
- 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>}
- path = u'ns1.gnc.am/alfalumen.am'
- ns = <DNSServer: ns1.gnc.am (Abovyan)>
- cls = <class 'noc.cm.models.DNS'>
- ------------------------------------------------------------------------
- File: /opt/noc/cm/periodics/dns_pull.py (Line: 16)
- Function: execute
- 9
- 10 class Task(noc.lib.periodic.Task):
- 11 name="cm.dns_pull"
- 12 description=""
- 13 wait_for=["cm.dns_push"]
- 14 def execute(self):
- 15 from noc.cm.models import DNS
- 16 ==> DNS.global_pull()
- 17 return True
- 18
- Variables:
- self = <noc.cm.periodics.dns_pull.Task object at 0x7fc27092e650>
- DNS = <class 'noc.cm.models.DNS'>
- ------------------------------------------------------------------------
- File: /opt/noc/main/scheduler.py (Line: 72)
- Function: task_wrapper
- 65 t = datetime.datetime.now()
- 66 cwd = os.getcwd()
- 67 try:
- 68 if task.periodic_name.startswith("pyrule:"):
- 69 status = PyRule.call(task.periodic_name[7:],
- 70 timeout=task.timeout)
- 71 else:
- 72 ==> status = task.periodic(task.timeout).execute()
- 73 except:
- 74 error_report()
- 75 status = False
- 76 logging.info(u"Periodic task=%s status=%s" % (unicode(task),
- 77 "completed" if status else "failed"))
- 78 # Current path may be implicitly changed by periodic. Restore old value
- Variables:
- self = <noc.main.scheduler.Scheduler object at 0x1b94410>
- task = <Schedule: cm.dns_pull:Any>
- cwd = '/opt/noc'
- t = datetime.datetime(2012, 8, 20, 12, 53, 25, 843173)
- ------------------------------------------------------------------------
- END OF TRACEBACK
- 2012-08-20 12:53:27,494 Periodic task=cm.dns_pull:Any status=failed
Advertisement
Add Comment
Please, Sign In to add comment