Advertisement
Guest User

Untitled

a guest
Jan 17th, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.07 KB | None | 0 0
  1. 2013-01-17 13:58:46,637 UNHANDLED EXCEPTION (2013-01-17 13:58:46.531596)
  2. Working directory: /opt/noc
  3. <type 'exceptions.AttributeError'>
  4. 'Interface' object has no attribute 'subinterfaces_set'
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/inv/discovery/jobs/mac_discovery.py (Line: 152)
  8. Function: check_port
  9. 145 remote_iface = interfaces[0]
  10. 146 if remote_iface.is_linked:
  11. 147 return # Remote interface is already linked
  12. 148 remote_subs = list(remote_iface.subinterface_set.filter(
  13. 149 enabled_afi__in=["IPv4", "IPv6"], mac=mac))
  14. 150 if not remote_subs:
  15. 151 return # Cannot find remote sub by MAC
  16. 152 ==> local_sub = iface.subinterfaces_set.filter(enabled_afi="BRIDGE").first()
  17. 153 if not local_sub:
  18. 154 return # Something goes wrong
  19. 155 if local_sub.untagged_vlan:
  20. 156 if len(remote_subs) == 1:
  21. 157 # Access port to L3 interface
  22. 158 self.submit_link(iface, remote_iface)
  23. Variables:
  24. iface = <Interface: cat-resh-main: Gi 0/10>
  25. remote_subs = [<SubInterface: resh Fa 0/0.901>, <SubInterface: resh Fa 0/0.902>, <SubInterface: resh Fa 0/0.903>, <SubInterface: resh Fa 0/0.904>,
  26. remote_iface = <Interface: resh: Fa 0/0>
  27. interfaces = [<Interface: resh: Fa 0/0>]
  28. object = <ManagedObject: cat-resh-main>
  29. self = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x8084c2790>
  30. mac = '00:1E:7A:5F:D8:80'
  31. vlans = [919, 929, 905, 926, 931, 936, 925, 930, 910, 901, 915, 906, 920, 927, 937, 999, 911, 902, 916, 907, 921, 912, 933, 903, 917, 908, 92
  32. port = 'Gi 0/10'
  33. ------------------------------------------------------------------------
  34. File: /opt/noc/inv/discovery/jobs/mac_discovery.py (Line: 80)
  35. Function: handler
  36. 73 mh = defaultdict(int)
  37. 74 for p, m in pmc:
  38. 75 mh[m] += 1
  39. 76 # Check all unique MACs
  40. 77 for port, mac in pmc:
  41. 78 if mh[mac] == 1:
  42. 79 self.check_port(object, port, mac,
  43. 80 ==> [vlan for vlan, mac in port_macs[port]])
  44. 81 return True
  45. 82
  46. 83 @classmethod
  47. 84 def initial_submit_queryset(cls):
  48. 85 return {"object_profile__enable_mac_discovery": True}
  49. 86
  50. Variables:
  51. iface = 'Gi 0/16'
  52. port_macs = defaultdict(<type 'set'>, {'Gi 0/16': set([(535, '58:8D:09:7C:AE:E9'), (46, '00:1D:60:77:B7:05'), (46, '00:19:DB:6A:75:A7'), (46, '00
  53. dups = set(['58:8D:09:96:59:1B', '00:11:93:D5:33:C0', '58:8D:09:13:48:00', '00:17:0E:98:F1:1B', '00:1E:7A:5F:D8:80', '58:8D:09:7C:AE:E9', '0
  54. v = {'mac': '58:8D:09:7C:AE:E9', 'type': 'D', 'interfaces': ['Gi 0/16'], 'vlan_id': 2288}
  55. vc_domain = <VCDomain: NN>
  56. self = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x8084c2790>
  57. vlan = 904
  58. m = '00:23:04:41:B9:C0'
  59. mh = defaultdict(<type 'int'>, {'00:1E:7A:5F:D8:80': 1, '00:13:80:8B:69:B1': 1, '00:23:04:41:B9:C0': 1})
  60. object = <ManagedObject: cat-resh-main>
  61. p = 'Gi 0/6'
  62. mac = '00:1E:7A:5F:D8:80'
  63. result = [{'mac': '00:00:21:00:7B:69', 'type': 'D', 'interfaces': ['Gi 0/16'], 'vlan_id': 46}, {'mac': '00:00:21:23:07:D6', 'type': 'D', 'inte
  64. pmc = [('Gi 0/10', '00:1E:7A:5F:D8:80'), ('Gi 0/7', '00:13:80:8B:69:B1'), ('Gi 0/6', '00:23:04:41:B9:C0')]
  65. seen = {'00:18:B9:45:D8:D8': 2376, '00:25:5C:72:E2:00': 2376, '00:16:47:58:06:00': 2144, '00:07:0E:58:98:52': 2043, '2C:27:D7:2E:5C:4F': 46,
  66. port = 'Gi 0/10'
  67. ------------------------------------------------------------------------
  68. File: /opt/noc/lib/scheduler/scheduler.py (Line: 244)
  69. Function: _job_wrapper
  70. 237 t.start()
  71. 238 else:
  72. 239 return self._job_wrapper(job, **kwargs)
  73. 240
  74. 241 def _job_wrapper(self, job, **kwargs):
  75. 242 tb = None
  76. 243 try:
  77. 244 ==> r = job.handler(**kwargs)
  78. 245 except Exception:
  79. 246 error_report()
  80. 247 job.on_exception()
  81. 248 s = job.S_EXCEPTION
  82. 249 tb = get_traceback()
  83. 250 else:
  84. Variables:
  85. job = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x8084c2790>
  86. tb = None
  87. self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x804f79450>
  88. kwargs = {'object': <ManagedObject: cat-resh-main>, 'result': [{'mac': '00:00:21:00:7B:69', 'type': 'D', 'interfaces': ['Gi 0/16'], 'vlan_id':
  89. ------------------------------------------------------------------------
  90. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement