Advertisement
Guest User

Untitled

a guest
Jul 31st, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.86 KB | None | 0 0
  1. 2012-07-31 16:47:12,452 Running interface discovery for V1_KIR_3
  2. 2012-07-31 16:47:32,725 UNHANDLED EXCEPTION (2012-07-31 16:47:32.708054)
  3. Working directory: /var/backups/noc
  4. <class 'django.db.utils.DatabaseError'>
  5. can't adapt type 'MAC'
  6. START OF TRACEBACK
  7. ------------------------------------------------------------------------
  8. File: /var/backups/noc/contrib/lib/django/db/backends/postgresql_psycopg2/base.py (Line: 44)
  9. Function: execute
  10. 37 """
  11. 38
  12. 39 def __init__(self, cursor):
  13. 40 self.cursor = cursor
  14. 41
  15. 42 def execute(self, query, args=None):
  16. 43 try:
  17. 44 ==> return self.cursor.execute(query, args)
  18. 45 except Database.IntegrityError, e:
  19. 46 raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
  20. 47 except Database.DatabaseError, e:
  21. 48 raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
  22. 49
  23. 50 def executemany(self, query, args):
  24. Variables:
  25. query = 'UPDATE "ip_address" SET "prefix_id" = %s, "vrf_id" = %s, "afi" = %s, "address" = %s, "fqdn" = %s, "mac" = %s, "auto_update_mac" = %s, "managed_object_id" = %s, "description" = %s, "tags" = %s, "tt" = NULL, "style_id" = NULL, "state_id" = %s, "allocated_till" = NULL, "ipv6_transition_id" = NULL WHERE "ip_address"."id" = %s '
  26. self = <django.db.backends.postgresql_psycopg2.base.CursorWrapper object at 0x3b67690>
  27. args = (1522, 1, '4', '10.200.13.2', u'kir3.example.com', '70:72:CF:56:BE:A5', False, 25, 'V1_KIR_3:VLAN 270', u'', 1, 8213)
  28. e = ProgrammingError("can't adapt type 'MAC'",)
  29. ------------------------------------------------------------------------
  30. File: /var/backups/noc/contrib/lib/django/db/backends/util.py (Line: 34)
  31. Function: execute
  32. 27
  33. 28
  34. 29 class CursorDebugWrapper(CursorWrapper):
  35. 30
  36. 31 def execute(self, sql, params=()):
  37. 32 start = time()
  38. 33 try:
  39. 34 ==> return self.cursor.execute(sql, params)
  40. 35 finally:
  41. 36 stop = time()
  42. 37 duration = stop - start
  43. 38 sql = self.db.ops.last_executed_query(self.cursor, sql, params)
  44. 39 self.db.queries.append({
  45. 40 'sql': sql,
  46. Variables:
  47. self = <django.db.backends.util.CursorDebugWrapper object at 0x3b673d0>
  48. stop = 1343742452.708009
  49. start = 1343742452.7079661
  50. params = (1522, 1, '4', '10.200.13.2', u'kir3.example.com', '70:72:CF:56:BE:A5', False, 25, 'V1_KIR_3:VLAN 270', u'', 1, 8213)
  51. sql = None
  52. duration = 4.291534423828125e-05
  53. ------------------------------------------------------------------------
  54. File: /var/backups/noc/contrib/lib/django/db/models/sql/compiler.py (Line: 735)
  55. Function: execute_sql
  56. 728 except EmptyResultSet:
  57. 729 if result_type == MULTI:
  58. 730 return empty_iter()
  59. 731 else:
  60. 732 return
  61. 733
  62. 734 cursor = self.connection.cursor()
  63. 735 ==> cursor.execute(sql, params)
  64. 736
  65. 737 if not result_type:
  66. 738 return cursor
  67. 739 if result_type == SINGLE:
  68. 740 if self.query.ordering_aliases:
  69. 741 return cursor.fetchone()[:-len(self.query.ordering_aliases)]
  70. Variables:
  71. cursor = <django.db.backends.util.CursorDebugWrapper object at 0x3b673d0>
  72. self = <django.db.models.sql.compiler.SQLUpdateCompiler object at 0x3b67250>
  73. params = (1522, 1, '4', '10.200.13.2', u'kir3.example.com', '70:72:CF:56:BE:A5', False, 25, 'V1_KIR_3:VLAN 270', u'', 1, 8213)
  74. result_type = None
  75. sql = 'UPDATE "ip_address" SET "prefix_id" = %s, "vrf_id" = %s, "afi" = %s, "address" = %s, "fqdn" = %s, "mac" = %s, "auto_update_mac" = %s, "managed_object_id" = %s, "description" = %s, "tags" = %s, "tt" = NULL, "style_id" = NULL, "state_id" = %s, "allocated_till" = NULL, "ipv6_transition_id" = NULL WHERE "ip_address"."id" = %s '
  76. ------------------------------------------------------------------------
  77. File: /var/backups/noc/contrib/lib/django/db/models/sql/compiler.py (Line: 869)
  78. Function: execute_sql
  79. 862 def execute_sql(self, result_type):
  80. 863 """
  81. 864 Execute the specified update. Returns the number of rows affected by
  82. 865 the primary update query. The "primary update query" is the first
  83. 866 non-empty query that is executed. Row counts for any subsequent,
  84. 867 related queries are not available.
  85. 868 """
  86. 869 ==> cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
  87. 870 rows = cursor and cursor.rowcount or 0
  88. 871 is_empty = cursor is None
  89. 872 del cursor
  90. 873 for query in self.query.get_related_updates():
  91. 874 aux_rows = query.get_compiler(self.using).execute_sql(result_type)
  92. 875 if is_empty:
  93. Variables:
  94. self = <django.db.models.sql.compiler.SQLUpdateCompiler object at 0x3b67250>
  95. result_type = None
  96. ------------------------------------------------------------------------
  97. File: /var/backups/noc/contrib/lib/django/db/models/query.py (Line: 491)
  98. Function: _update
  99. 484 useful at that level).
  100. 485 """
  101. 486 assert self.query.can_filter(), \
  102. 487 "Cannot update a query once a slice has been taken."
  103. 488 query = self.query.clone(sql.UpdateQuery)
  104. 489 query.add_update_fields(values)
  105. 490 self._result_cache = None
  106. 491 ==> return query.get_compiler(self.db).execute_sql(None)
  107. 492 _update.alters_data = True
  108. 493
  109. 494 def exists(self):
  110. 495 if self._result_cache is None:
  111. 496 return self.query.has_results(using=self.db)
  112. 497 return bool(self._result_cache)
  113. Variables:
  114. query = <django.db.models.sql.subqueries.UpdateQuery object at 0x3b67610>
  115. self = [<Address: default(4): 10.200.13.2>]
  116. values = [(<django.db.models.fields.related.ForeignKey object at 0x3646490>, None, 1522), (<django.db.models.fields.related.ForeignKey object at 0x3646610>, None, 1), (<django.db.models.fields.CharField object at 0x3646710>, None, '4'), (<noc.lib.fields.INETField object at 0x3646810>, None, '10.200.13.2'), (<django.db.models.fields.CharField object at 0x36468d0>, None, u'kir3.example.com'), (<noc.lib.fields.MACField object at 0x3646a50>, None, '70:72:CF:56:BE:A5'), (<django.db.models.fields.BooleanField object at 0x3646ad0>, None, False), (<django.db.models.fields.related.ForeignKey object at 0x3646c10>, None, 25), (<django.db.models.fields.TextField object at 0x3646d50>, None, 'V1_KIR_3:VLAN 270'), (<noc.lib.fields.AutoCompleteTagsField object at 0x3646dd0>, None, u''), (<django.db.models.fields.IntegerField object at 0x3646f90>, None, None), (<django.db.models.fields.related.ForeignKey object at 0x3649050>, None, None), (<django.db.models.fields.related.ForeignKey object at 0x3649190>, None, 1), (<django.db.models.fields.DateField object at 0x36492d0>, None, None), (<django.db.models.fields.related.OneToOneField object at 0x3649350>, None, None)]
  117. ------------------------------------------------------------------------
  118. File: /var/backups/noc/contrib/lib/django/db/models/base.py (Line: 526)
  119. Function: save_base
  120. 519 if pk_set:
  121. 520 # Determine whether a record with the primary key already exists.
  122. 521 if (force_update or (not force_insert and
  123. 522 manager.using(using).filter(pk=pk_val).exists())):
  124. 523 # It does already exist, so do an UPDATE.
  125. 524 if force_update or non_pks:
  126. 525 values = [(f, None, (raw and getattr(self, f.attname) or f.pre_save(self, False))) for f in non_pks]
  127. 526 ==> rows = manager.using(using).filter(pk=pk_val)._update(values)
  128. 527 if force_update and not rows:
  129. 528 raise DatabaseError("Forced update did not affect any rows.")
  130. 529 else:
  131. 530 record_exists = False
  132. 531 if not pk_set or not record_exists:
  133. 532 if meta.order_with_respect_to:
  134. Variables:
  135. origin = <class 'noc.ip.models.Address'>
  136. non_pks = [<django.db.models.fields.related.ForeignKey object at 0x3646490>, <django.db.models.fields.related.ForeignKey object at 0x3646610>, <django.db.models.fields.CharField object at 0x3646710>, <noc.lib.fields.INETField object at 0x3646810>, <django.db.models.fields.CharField object at 0x36468d0>, <noc.lib.fields.MACField object at 0x3646a50>, <django.db.models.fields.BooleanField object at 0x3646ad0>, <django.db.models.fields.related.ForeignKey object at 0x3646c10>, <django.db.models.fields.TextField object at 0x3646d50>, <noc.lib.fields.AutoCompleteTagsField object at 0x3646dd0>, <django.db.models.fields.IntegerField object at 0x3646f90>, <django.db.models.fields.related.ForeignKey object at 0x3649050>, <django.db.models.fields.related.ForeignKey object at 0x3649190>, <django.db.models.fields.DateField object at 0x36492d0>, <django.db.models.fields.related.OneToOneField object at 0x3649350>]
  137. f = <django.db.models.fields.related.OneToOneField object at 0x3649350>
  138. self = <Address: default(4): 10.200.13.2>
  139. force_update = False
  140. connection = <django.db.backends.postgresql_psycopg2.base.DatabaseWrapper object at 0x1ca48e8>
  141. raw = False
  142. manager = <django.db.models.manager.Manager object at 0x3649a90>
  143. meta = <Options for Address>
  144. values = [(<django.db.models.fields.related.ForeignKey object at 0x3646490>, None, 1522), (<django.db.models.fields.related.ForeignKey object at 0x3646610>, None, 1), (<django.db.models.fields.CharField object at 0x3646710>, None, '4'), (<noc.lib.fields.INETField object at 0x3646810>, None, '10.200.13.2'), (<django.db.models.fields.CharField object at 0x36468d0>, None, u'kir3.example.com'), (<noc.lib.fields.MACField object at 0x3646a50>, None, '70:72:CF:56:BE:A5'), (<django.db.models.fields.BooleanField object at 0x3646ad0>, None, False), (<django.db.models.fields.related.ForeignKey object at 0x3646c10>, None, 25), (<django.db.models.fields.TextField object at 0x3646d50>, None, 'V1_KIR_3:VLAN 270'), (<noc.lib.fields.AutoCompleteTagsField object at 0x3646dd0>, None, u''), (<django.db.models.fields.IntegerField object at 0x3646f90>, None, None), (<django.db.models.fields.related.ForeignKey object at 0x3649050>, None, None), (<django.db.models.fields.related.ForeignKey object at 0x3649190>, None, 1), (<django.db.models.fields.DateField object at 0x36492d0>, None, None), (<django.db.models.fields.related.OneToOneField object at 0x3649350>, None, None)]
  145. pk_val = 8213
  146. using = 'default'
  147. pk_set = True
  148. org = None
  149. cls = <class 'noc.ip.models.Address'>
  150. force_insert = False
  151. record_exists = True
  152. ------------------------------------------------------------------------
  153. File: /var/backups/noc/contrib/lib/django/db/models/base.py (Line: 460)
  154. Function: save
  155. 453
  156. 454 The 'force_insert' and 'force_update' parameters can be used to insist
  157. 455 that the "save" must be an SQL insert or update (or equivalent for
  158. 456 non-SQL backends), respectively. Normally, they should not be set.
  159. 457 """
  160. 458 if force_insert and force_update:
  161. 459 raise ValueError("Cannot force both insert and updating in model saving.")
  162. 460 ==> self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  163. 461
  164. 462 save.alters_data = True
  165. 463
  166. 464 def save_base(self, raw=False, cls=None, origin=None, force_insert=False,
  167. 465 force_update=False, using=None):
  168. 466 """
  169. Variables:
  170. using = None
  171. self = <Address: default(4): 10.200.13.2>
  172. force_update = False
  173. force_insert = False
  174. ------------------------------------------------------------------------
  175. File: /var/backups/noc/ip/models/__init__.py (Line: 672)
  176. Function: save
  177. 665 if cv:
  178. 666 # Collision detected
  179. 667 raise ValidationError("Address already exists in VRF %s" % cv)
  180. 668 # Detect AFI
  181. 669 self.afi = self.get_afi(self.address)
  182. 670 # Set proper prefix
  183. 671 self.prefix = Prefix.get_parent(self.vrf, self.afi, self.address)
  184. 672 ==> super(Address, self).save(**kwargs)
  185. 673
  186. 674 ##
  187. 675 ## Field validation
  188. 676 ##
  189. 677 def clean(self):
  190. 678 self.prefix = Prefix.get_parent(self.vrf, self.afi, self.address)
  191. Variables:
  192. self = <Address: default(4): 10.200.13.2>
  193. cv = None
  194. kwargs = {}
  195. ------------------------------------------------------------------------
  196. File: /var/backups/noc/inv/discovery/daemon.py (Line: 235)
  197. Function: update_if_changed
  198. 228 for k, v in values.items():
  199. 229 vv = getattr(obj, k)
  200. 230 if v != vv:
  201. 231 if type(v) != int or not hasattr(vv, "id") or v != vv.id:
  202. 232 setattr(obj, k, v)
  203. 233 changes += [(k, v)]
  204. 234 if changes:
  205. 235 ==> obj.save()
  206. 236 return changes
  207. 237
  208. 238 def log_changes(self, o, msg, changes):
  209. 239 """
  210. 240 Log changes
  211. 241 :param o: managed object
  212. Variables:
  213. obj = <Address: default(4): 10.200.13.2>
  214. k = 'description'
  215. values = {'mac': '70:72:CF:56:BE:A5', 'managed_object': <ManagedObject: V1_KIR_3>, 'description': 'V1_KIR_3:VLAN 270'}
  216. vv = u''
  217. v = 'V1_KIR_3:VLAN 270'
  218. changes = [('mac', '70:72:CF:56:BE:A5'), ('description', 'V1_KIR_3:VLAN 270')]
  219. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x376a590>
  220. ------------------------------------------------------------------------
  221. File: /var/backups/noc/inv/discovery/daemon.py (Line: 736)
  222. Function: refresh_prefix
  223. 729 ).save()
  224. 730 else:
  225. 731 changes = {"managed_object": o}
  226. 732 if si.get("mac"):
  227. 733 changes["mac"] = si.get("mac")
  228. 734 if not a.description:
  229. 735 changes["description"] = "%s:%s" % (o, si["name"])
  230. 736 ==> self.update_if_changed(a, changes)
  231. 737 # Dual-stacking detection
  232. 738 if addresses and len(ipv4_addresses) == len(ipv6_addresses):
  233. 739 for ipv4, ipv6 in zip(ipv4_addresses, ipv6_addresses):
  234. 740 try:
  235. 741 p4 = Prefix.objects.get(vrf=vrf, afi="4",
  236. 742 prefix=str(IP.prefix(ipv4).normalized))
  237. Variables:
  238. a = <Address: default(4): 10.200.13.2>
  239. rd = '0:0'
  240. addresses = ['10.200.13.2/26']
  241. octx = {'host': u'V1_KIR_3', 'object': <ManagedObject: V1_KIR_3>, 'name': u'V1_KIR_3', 'domain': None, 'vrf': <VRF: global>}
  242. o = <ManagedObject: V1_KIR_3>
  243. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x376a590>
  244. si = {'name': 'VLAN 270', 'mac': '70:72:CF:56:BE:A5', 'ipv4_addresses': ['10.200.13.2/26'], 'vlan_ids': [270], 'oper_status': True, 'admin_status': True, 'is_ipv4': True}
  245. ipv4_addresses = ['10.200.13.2/26']
  246. ipv6_addresses = []
  247. p = <IPv4 10.200.13.2/26>
  248. prefix = '10.200.13.0/26'
  249. vrf_name = 'default'
  250. vrf = <VRF: global>
  251. seen = set(['10.200.13.0/26'])
  252. pfx = <Prefix: default(4): 10.200.13.0/26>
  253. changes = {'mac': '70:72:CF:56:BE:A5', 'managed_object': <ManagedObject: V1_KIR_3>, 'description': 'V1_KIR_3:VLAN 270'}
  254. ------------------------------------------------------------------------
  255. File: /var/backups/noc/inv/discovery/daemon.py (Line: 539)
  256. Function: import_interfaces
  257. 532 s_iface.save()
  258. 533 # refreshed = True
  259. 534 si_count += 1
  260. 535 # Run prefix discovery when necessary
  261. 536 if (self.p_save and # refreshed and
  262. 537 (si.get("is_ipv4") or si.get("is_ipv6"))):
  263. 538 self.refresh_prefix(o, fi["forwarding_instance"],
  264. 539 ==> fi.get("rd", "0:0"), si)
  265. 540 # Perform interface classification
  266. 541 self.interface_classification(iface)
  267. 542 # Remove hanging interfaces
  268. 543 db_interfaces = set(x.name for x in
  269. 544 Interface.objects.filter(managed_object=o.id).only("name"))
  270. 545 for i in db_interfaces - found_interfaces:
  271. Variables:
  272. iface = <Interface: V1_KIR_3: VLAN 270>
  273. ifaces = [{'name': 'VLAN 270', 'subinterfaces': [{'name': 'VLAN 270', 'mac': '70:72:CF:56:BE:A5', 'ipv4_addresses': ['10.200.13.2/26'], 'vlan_ids': [270], 'oper_status': True, 'admin_status': True, 'is_ipv4': True}], 'mac': '70:72:CF:56:BE:A5', 'oper_status': True, 'admin_status': True, 'type': 'SVI'}, {'name': 'Eth 1/8', 'subinterfaces': [{'name': 'Eth 1/8', 'tagged_vlans': [], 'oper_status': False, 'untagged_vlan': 278, 'mac': '70:72:CF:56:BE:AD', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AD', 'oper_status': False, 'admin_status': False, 'type': 'physical'}, {'name': 'Eth 1/9', 'subinterfaces': [{'name': 'Eth 1/9', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': True, 'mac': '70:72:CF:56:BE:AE', 'admin_status': True, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AE', 'oper_status': True, 'admin_status': True, 'type': 'physical'}, {'name': 'Eth 1/2', 'subinterfaces': [{'description': 'Kirova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 272, 'mac': '70:72:CF:56:BE:A7', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/2'}], 'mac': '70:72:CF:56:BE:A7', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_1'}, {'name': 'Eth 1/3', 'subinterfaces': [{'description': 'Simonova_1A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 273, 'mac': '70:72:CF:56:BE:A8', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/3'}], 'mac': '70:72:CF:56:BE:A8', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1A'}, {'name': 'Eth 1/1', 'subinterfaces': [{'description': 'Kirova_5', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 271, 'mac': '70:72:CF:56:BE:A6', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/1'}], 'mac': '70:72:CF:56:BE:A6', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5'}, {'name': 'Eth 1/6', 'subinterfaces': [{'description': 'Simonova_2', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 276, 'mac': '70:72:CF:56:BE:AB', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/6'}], 'mac': '70:72:CF:56:BE:AB', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_2'}, {'name': 'Eth 1/7', 'subinterfaces': [{'description': 'Kirova_03', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 277, 'mac': '70:72:CF:56:BE:AC', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/7'}], 'mac': '70:72:CF:56:BE:AC', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_03'}, {'name': 'Eth 1/4', 'subinterfaces': [{'description': 'Kirova_5A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 274, 'mac': '70:72:CF:56:BE:A9', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/4'}], 'mac': '70:72:CF:56:BE:A9', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5A'}, {'name': 'Eth 1/5', 'subinterfaces': [{'description': 'Simonova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 275, 'mac': '70:72:CF:56:BE:AA', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/5'}], 'mac': '70:72:CF:56:BE:AA', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1'}, {'name': 'Eth 1/10', 'subinterfaces': [{'name': 'Eth 1/10', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': False, 'mac': '70:72:CF:56:BE:AF', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AF', 'oper_status': False, 'admin_status': False, 'type': 'physical'}]
  274. agg = None
  275. si_count = 1
  276. interfaces = [{'interfaces': [{'name': 'VLAN 270', 'subinterfaces': [{'name': 'VLAN 270', 'mac': '70:72:CF:56:BE:A5', 'ipv4_addresses': ['10.200.13.2/26'], 'vlan_ids': [270], 'oper_status': True, 'admin_status': True, 'is_ipv4': True}], 'mac': '70:72:CF:56:BE:A5', 'oper_status': True, 'admin_status': True, 'type': 'SVI'}, {'name': 'Eth 1/8', 'subinterfaces': [{'name': 'Eth 1/8', 'tagged_vlans': [], 'oper_status': False, 'untagged_vlan': 278, 'mac': '70:72:CF:56:BE:AD', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AD', 'oper_status': False, 'admin_status': False, 'type': 'physical'}, {'name': 'Eth 1/9', 'subinterfaces': [{'name': 'Eth 1/9', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': True, 'mac': '70:72:CF:56:BE:AE', 'admin_status': True, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AE', 'oper_status': True, 'admin_status': True, 'type': 'physical'}, {'name': 'Eth 1/2', 'subinterfaces': [{'description': 'Kirova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 272, 'mac': '70:72:CF:56:BE:A7', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/2'}], 'mac': '70:72:CF:56:BE:A7', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_1'}, {'name': 'Eth 1/3', 'subinterfaces': [{'description': 'Simonova_1A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 273, 'mac': '70:72:CF:56:BE:A8', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/3'}], 'mac': '70:72:CF:56:BE:A8', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1A'}, {'name': 'Eth 1/1', 'subinterfaces': [{'description': 'Kirova_5', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 271, 'mac': '70:72:CF:56:BE:A6', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/1'}], 'mac': '70:72:CF:56:BE:A6', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5'}, {'name': 'Eth 1/6', 'subinterfaces': [{'description': 'Simonova_2', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 276, 'mac': '70:72:CF:56:BE:AB', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/6'}], 'mac': '70:72:CF:56:BE:AB', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_2'}, {'name': 'Eth 1/7', 'subinterfaces': [{'description': 'Kirova_03', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 277, 'mac': '70:72:CF:56:BE:AC', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/7'}], 'mac': '70:72:CF:56:BE:AC', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_03'}, {'name': 'Eth 1/4', 'subinterfaces': [{'description': 'Kirova_5A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 274, 'mac': '70:72:CF:56:BE:A9', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/4'}], 'mac': '70:72:CF:56:BE:A9', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5A'}, {'name': 'Eth 1/5', 'subinterfaces': [{'description': 'Simonova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 275, 'mac': '70:72:CF:56:BE:AA', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/5'}], 'mac': '70:72:CF:56:BE:AA', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1'}, {'name': 'Eth 1/10', 'subinterfaces': [{'name': 'Eth 1/10', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': False, 'mac': '70:72:CF:56:BE:AF', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AF', 'oper_status': False, 'admin_status': False, 'type': 'physical'}], 'type': 'ip', 'forwarding_instance': 'default'}]
  277. o = <ManagedObject: V1_KIR_3>
  278. s_iface = <SubInterface: V1_KIR_3 VLAN 270>
  279. q = <mongoengine.queryset.QCombination object at 0x3df0610>
  280. i = {'name': 'VLAN 270', 'subinterfaces': [{'name': 'VLAN 270', 'mac': '70:72:CF:56:BE:A5', 'ipv4_addresses': ['10.200.13.2/26'], 'vlan_ids': [270], 'oper_status': True, 'admin_status': True, 'is_ipv4': True}], 'mac': '70:72:CF:56:BE:A5', 'oper_status': True, 'admin_status': True, 'type': 'SVI'}
  281. si = {'name': 'VLAN 270', 'mac': '70:72:CF:56:BE:A5', 'ipv4_addresses': ['10.200.13.2/26'], 'vlan_ids': [270], 'oper_status': True, 'admin_status': True, 'is_ipv4': True}
  282. icache = {'VLAN 270': <Interface: V1_KIR_3: VLAN 270>}
  283. forwarding_instance = None
  284. e_subs = set([])
  285. fi = {'interfaces': [{'name': 'VLAN 270', 'subinterfaces': [{'name': 'VLAN 270', 'mac': '70:72:CF:56:BE:A5', 'ipv4_addresses': ['10.200.13.2/26'], 'vlan_ids': [270], 'oper_status': True, 'admin_status': True, 'is_ipv4': True}], 'mac': '70:72:CF:56:BE:A5', 'oper_status': True, 'admin_status': True, 'type': 'SVI'}, {'name': 'Eth 1/8', 'subinterfaces': [{'name': 'Eth 1/8', 'tagged_vlans': [], 'oper_status': False, 'untagged_vlan': 278, 'mac': '70:72:CF:56:BE:AD', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AD', 'oper_status': False, 'admin_status': False, 'type': 'physical'}, {'name': 'Eth 1/9', 'subinterfaces': [{'name': 'Eth 1/9', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': True, 'mac': '70:72:CF:56:BE:AE', 'admin_status': True, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AE', 'oper_status': True, 'admin_status': True, 'type': 'physical'}, {'name': 'Eth 1/2', 'subinterfaces': [{'description': 'Kirova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 272, 'mac': '70:72:CF:56:BE:A7', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/2'}], 'mac': '70:72:CF:56:BE:A7', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_1'}, {'name': 'Eth 1/3', 'subinterfaces': [{'description': 'Simonova_1A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 273, 'mac': '70:72:CF:56:BE:A8', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/3'}], 'mac': '70:72:CF:56:BE:A8', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1A'}, {'name': 'Eth 1/1', 'subinterfaces': [{'description': 'Kirova_5', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 271, 'mac': '70:72:CF:56:BE:A6', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/1'}], 'mac': '70:72:CF:56:BE:A6', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5'}, {'name': 'Eth 1/6', 'subinterfaces': [{'description': 'Simonova_2', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 276, 'mac': '70:72:CF:56:BE:AB', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/6'}], 'mac': '70:72:CF:56:BE:AB', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_2'}, {'name': 'Eth 1/7', 'subinterfaces': [{'description': 'Kirova_03', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 277, 'mac': '70:72:CF:56:BE:AC', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/7'}], 'mac': '70:72:CF:56:BE:AC', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_03'}, {'name': 'Eth 1/4', 'subinterfaces': [{'description': 'Kirova_5A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 274, 'mac': '70:72:CF:56:BE:A9', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/4'}], 'mac': '70:72:CF:56:BE:A9', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5A'}, {'name': 'Eth 1/5', 'subinterfaces': [{'description': 'Simonova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 275, 'mac': '70:72:CF:56:BE:AA', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/5'}], 'mac': '70:72:CF:56:BE:AA', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1'}, {'name': 'Eth 1/10', 'subinterfaces': [{'name': 'Eth 1/10', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': False, 'mac': '70:72:CF:56:BE:AF', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AF', 'oper_status': False, 'admin_status': False, 'type': 'physical'}], 'type': 'ip', 'forwarding_instance': 'default'}
  286. found_interfaces = set(['VLAN 270'])
  287. changes = []
  288. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x376a590>
  289. f_subs = set(['VLAN 270'])
  290. ------------------------------------------------------------------------
  291. File: /var/backups/noc/inv/discovery/daemon.py (Line: 296)
  292. Function: process_interface_discovery
  293. 289 def process_interface_discovery(self, r):
  294. 290 """
  295. 291 Process interface discovery results
  296. 292 """
  297. 293 for o, status, result in r:
  298. 294 if status == "C":
  299. 295 try:
  300. 296 ==> self.import_interfaces(o, result)
  301. 297 except:
  302. 298 error_report()
  303. 299 DiscoveryStatusInterface.reschedule(o,
  304. 300 random.randint(*self.i_success_retry_range), True)
  305. 301 else:
  306. 302 self.o_info(o, "get_interfaces failed: %s" % result)
  307. Variables:
  308. status = u'C'
  309. self = <noc.inv.discovery.daemon.DiscoveryDaemon object at 0x376a590>
  310. r = [(<ManagedObject: V1_KIR_3>, u'C', [{'interfaces': [{'name': 'VLAN 270', 'subinterfaces': [{'name': 'VLAN 270', 'mac': '70:72:CF:56:BE:A5', 'ipv4_addresses': ['10.200.13.2/26'], 'vlan_ids': [270], 'oper_status': True, 'admin_status': True, 'is_ipv4': True}], 'mac': '70:72:CF:56:BE:A5', 'oper_status': True, 'admin_status': True, 'type': 'SVI'}, {'name': 'Eth 1/8', 'subinterfaces': [{'name': 'Eth 1/8', 'tagged_vlans': [], 'oper_status': False, 'untagged_vlan': 278, 'mac': '70:72:CF:56:BE:AD', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AD', 'oper_status': False, 'admin_status': False, 'type': 'physical'}, {'name': 'Eth 1/9', 'subinterfaces': [{'name': 'Eth 1/9', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': True, 'mac': '70:72:CF:56:BE:AE', 'admin_status': True, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AE', 'oper_status': True, 'admin_status': True, 'type': 'physical'}, {'name': 'Eth 1/2', 'subinterfaces': [{'description': 'Kirova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 272, 'mac': '70:72:CF:56:BE:A7', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/2'}], 'mac': '70:72:CF:56:BE:A7', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_1'}, {'name': 'Eth 1/3', 'subinterfaces': [{'description': 'Simonova_1A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 273, 'mac': '70:72:CF:56:BE:A8', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/3'}], 'mac': '70:72:CF:56:BE:A8', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1A'}, {'name': 'Eth 1/1', 'subinterfaces': [{'description': 'Kirova_5', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 271, 'mac': '70:72:CF:56:BE:A6', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/1'}], 'mac': '70:72:CF:56:BE:A6', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5'}, {'name': 'Eth 1/6', 'subinterfaces': [{'description': 'Simonova_2', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 276, 'mac': '70:72:CF:56:BE:AB', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/6'}], 'mac': '70:72:CF:56:BE:AB', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_2'}, {'name': 'Eth 1/7', 'subinterfaces': [{'description': 'Kirova_03', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 277, 'mac': '70:72:CF:56:BE:AC', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/7'}], 'mac': '70:72:CF:56:BE:AC', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_03'}, {'name': 'Eth 1/4', 'subinterfaces': [{'description': 'Kirova_5A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 274, 'mac': '70:72:CF:56:BE:A9', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/4'}], 'mac': '70:72:CF:56:BE:A9', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5A'}, {'name': 'Eth 1/5', 'subinterfaces': [{'description': 'Simonova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 275, 'mac': '70:72:CF:56:BE:AA', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/5'}], 'mac': '70:72:CF:56:BE:AA', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1'}, {'name': 'Eth 1/10', 'subinterfaces': [{'name': 'Eth 1/10', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': False, 'mac': '70:72:CF:56:BE:AF', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AF', 'oper_status': False, 'admin_status': False, 'type': 'physical'}], 'type': 'ip', 'forwarding_instance': 'default'}])]
  311. result = [{'interfaces': [{'name': 'VLAN 270', 'subinterfaces': [{'name': 'VLAN 270', 'mac': '70:72:CF:56:BE:A5', 'ipv4_addresses': ['10.200.13.2/26'], 'vlan_ids': [270], 'oper_status': True, 'admin_status': True, 'is_ipv4': True}], 'mac': '70:72:CF:56:BE:A5', 'oper_status': True, 'admin_status': True, 'type': 'SVI'}, {'name': 'Eth 1/8', 'subinterfaces': [{'name': 'Eth 1/8', 'tagged_vlans': [], 'oper_status': False, 'untagged_vlan': 278, 'mac': '70:72:CF:56:BE:AD', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AD', 'oper_status': False, 'admin_status': False, 'type': 'physical'}, {'name': 'Eth 1/9', 'subinterfaces': [{'name': 'Eth 1/9', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': True, 'mac': '70:72:CF:56:BE:AE', 'admin_status': True, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AE', 'oper_status': True, 'admin_status': True, 'type': 'physical'}, {'name': 'Eth 1/2', 'subinterfaces': [{'description': 'Kirova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 272, 'mac': '70:72:CF:56:BE:A7', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/2'}], 'mac': '70:72:CF:56:BE:A7', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_1'}, {'name': 'Eth 1/3', 'subinterfaces': [{'description': 'Simonova_1A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 273, 'mac': '70:72:CF:56:BE:A8', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/3'}], 'mac': '70:72:CF:56:BE:A8', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1A'}, {'name': 'Eth 1/1', 'subinterfaces': [{'description': 'Kirova_5', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 271, 'mac': '70:72:CF:56:BE:A6', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/1'}], 'mac': '70:72:CF:56:BE:A6', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5'}, {'name': 'Eth 1/6', 'subinterfaces': [{'description': 'Simonova_2', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 276, 'mac': '70:72:CF:56:BE:AB', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/6'}], 'mac': '70:72:CF:56:BE:AB', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_2'}, {'name': 'Eth 1/7', 'subinterfaces': [{'description': 'Kirova_03', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 277, 'mac': '70:72:CF:56:BE:AC', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/7'}], 'mac': '70:72:CF:56:BE:AC', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_03'}, {'name': 'Eth 1/4', 'subinterfaces': [{'description': 'Kirova_5A', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 274, 'mac': '70:72:CF:56:BE:A9', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/4'}], 'mac': '70:72:CF:56:BE:A9', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Kirova_5A'}, {'name': 'Eth 1/5', 'subinterfaces': [{'description': 'Simonova_1', 'tagged_vlans': [], 'oper_status': True, 'untagged_vlan': 275, 'mac': '70:72:CF:56:BE:AA', 'admin_status': True, 'is_bridge': True, 'name': 'Eth 1/5'}], 'mac': '70:72:CF:56:BE:AA', 'oper_status': True, 'admin_status': True, 'type': 'physical', 'description': 'Simonova_1'}, {'name': 'Eth 1/10', 'subinterfaces': [{'name': 'Eth 1/10', 'tagged_vlans': [270, 271, 272, 273, 274, 275, 276, 277, 278, 1000], 'oper_status': False, 'mac': '70:72:CF:56:BE:AF', 'admin_status': False, 'is_bridge': True}], 'mac': '70:72:CF:56:BE:AF', 'oper_status': False, 'admin_status': False, 'type': 'physical'}], 'type': 'ip', 'forwarding_instance': 'default'}]
  312. o = <ManagedObject: V1_KIR_3>
  313. ------------------------------------------------------------------------
  314. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement