Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2013-01-17 13:58:46,637 UNHANDLED EXCEPTION (2013-01-17 13:58:46.531596)
- Working directory: /opt/noc
- <type 'exceptions.AttributeError'>
- 'Interface' object has no attribute 'subinterfaces_set'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/jobs/mac_discovery.py (Line: 152)
- Function: check_port
- 145 remote_iface = interfaces[0]
- 146 if remote_iface.is_linked:
- 147 return # Remote interface is already linked
- 148 remote_subs = list(remote_iface.subinterface_set.filter(
- 149 enabled_afi__in=["IPv4", "IPv6"], mac=mac))
- 150 if not remote_subs:
- 151 return # Cannot find remote sub by MAC
- 152 ==> local_sub = iface.subinterfaces_set.filter(enabled_afi="BRIDGE").first()
- 153 if not local_sub:
- 154 return # Something goes wrong
- 155 if local_sub.untagged_vlan:
- 156 if len(remote_subs) == 1:
- 157 # Access port to L3 interface
- 158 self.submit_link(iface, remote_iface)
- Variables:
- iface = <Interface: cat-resh-main: Gi 0/10>
- 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>,
- remote_iface = <Interface: resh: Fa 0/0>
- interfaces = [<Interface: resh: Fa 0/0>]
- object = <ManagedObject: cat-resh-main>
- self = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x8084c2790>
- mac = '00:1E:7A:5F:D8:80'
- 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
- port = 'Gi 0/10'
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/jobs/mac_discovery.py (Line: 80)
- Function: handler
- 73 mh = defaultdict(int)
- 74 for p, m in pmc:
- 75 mh[m] += 1
- 76 # Check all unique MACs
- 77 for port, mac in pmc:
- 78 if mh[mac] == 1:
- 79 self.check_port(object, port, mac,
- 80 ==> [vlan for vlan, mac in port_macs[port]])
- 81 return True
- 82
- 83 @classmethod
- 84 def initial_submit_queryset(cls):
- 85 return {"object_profile__enable_mac_discovery": True}
- 86
- Variables:
- iface = 'Gi 0/16'
- 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
- 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
- v = {'mac': '58:8D:09:7C:AE:E9', 'type': 'D', 'interfaces': ['Gi 0/16'], 'vlan_id': 2288}
- vc_domain = <VCDomain: NN>
- self = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x8084c2790>
- vlan = 904
- m = '00:23:04:41:B9:C0'
- 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})
- object = <ManagedObject: cat-resh-main>
- p = 'Gi 0/6'
- mac = '00:1E:7A:5F:D8:80'
- 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
- 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')]
- 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,
- port = 'Gi 0/10'
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 244)
- Function: _job_wrapper
- 237 t.start()
- 238 else:
- 239 return self._job_wrapper(job, **kwargs)
- 240
- 241 def _job_wrapper(self, job, **kwargs):
- 242 tb = None
- 243 try:
- 244 ==> r = job.handler(**kwargs)
- 245 except Exception:
- 246 error_report()
- 247 job.on_exception()
- 248 s = job.S_EXCEPTION
- 249 tb = get_traceback()
- 250 else:
- Variables:
- job = <noc.inv.discovery.jobs.mac_discovery.MACDiscoveryJob object at 0x8084c2790>
- tb = None
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x804f79450>
- kwargs = {'object': <ManagedObject: cat-resh-main>, 'result': [{'mac': '00:00:21:00:7B:69', 'type': 'D', 'interfaces': ['Gi 0/16'], 'vlan_id':
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement