Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2014-03-25 15:00:13,615 [inv.discovery] Job version_inventory(AGG-RTPC-01) is failed
- 2014-03-25 15:00:13,615 [inv.discovery] Rescheduling job version_inventory(25) to 2014-03-25 15:11:09.321437 status=W
- 2014-03-25 15:00:13,628 [inv.discovery: asset_discovery(jnr01-yla-str)] Submit vendor=JUNIPER, description=MX480, part_no=['MX480'], number=None, builtin=False, serial=JN11BD4C8AFB, type=CHASSIS, re
- vision=None
- 2014-03-25 15:00:13,629 [inv.discovery: asset_discovery(jnr01-yla-str)] Set context N = None -> NN=0, N=None
- 2014-03-25 15:00:13,644 [inv.discovery: asset_discovery(jnr01-yla-str)] Setting connection rule 'Juniper | MX'
- 2014-03-25 15:00:13,645 [inv.discovery: asset_discovery(jnr01-yla-str)] Context mappings: {u'PIC': (u'pic', []), u'MIC': (u'mic', []), u'CHASSIS': (u'chassis', [u'fpc', u'pic']), u'FPC': (u'fpc', [u
- 'pic'])}
- 2014-03-25 15:00:13,645 [inv.discovery: asset_discovery(jnr01-yla-str)] Set context chassis = None -> chassis=None, Nchassis=0, NN=0, N=None
- 2014-03-25 15:00:13,646 [inv.discovery: asset_discovery(jnr01-yla-str)] Creating new object. model='Juniper | MX | MX480 Chassis', serial='JN11BD4C8AFB'
- 2014-03-25 15:00:13,669 [inv.discovery: asset_discovery(jnr01-yla-str)] UNHANDLED EXCEPTION (2014-03-25 15:00:13.646515)
- Working directory: /opt/noc
- <type 'exceptions.AttributeError'>
- 'Object' object has no attribute '_changed_fields'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/inv/models/object.py (Line: 459)
- Function: change_container
- 452 if hasattr(mo, "id"):
- 453 mo = mo.id
- 454 return cls.objects.filter(data__management__managed_object=mo)
- 455
- 456 @classmethod
- 457 def change_container(cls, sender, document, target=None,
- 458 created=False, **kwargs):
- 459 ==> if "container" not in document._changed_fields:
- 460 return
- 461 old_container = getattr(document, "_cache_container", None)
- 462 old_pop = None
- 463 new_pop = None
- 464 # Old pop
- 465 if old_container:
- Variables:
- sender = <class 'noc.inv.models.object.Object'>
- created = False
- kwargs = {}
- target = None
- document = <Object: None>
- cls = <class 'noc.inv.models.object.Object'>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/blinker/base.py (Line: 267)
- Function: send
- 260 '%s given' % len(sender))
- 261 else:
- 262 sender = sender[0]
- 263 if not self.receivers:
- 264 return []
- 265 else:
- 266 return [(receiver, receiver(sender, **kwargs))
- 267 ==> for receiver in self.receivers_for(sender)]
- 268
- 269 def has_receivers_for(self, sender):
- 270 """True if there is probably a receiver for *sender*.
- 271
- 272 Performs an optimistic check only. Does not guarantee that all
- 273 weakly referenced receivers are still alive. See
- Variables:
- _[1] = []
- self = <blinker.base.NamedSignal object at 0x3149490; 'pre_save'>
- kwargs = {'document': <Object: None>}
- sender = <class 'noc.inv.models.object.Object'>
- receiver =
- <bound method ?.change_container of <class 'noc.inv.models.object.Object'>>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.6/site-packages/mongoengine/document.py (Line: 181)
- Function: save
- 174 .. versionchanged:: 0.6
- 175 Cascade saves are optional = defaults to True, if you want fine grain
- 176 control then you can turn off using document meta['cascade'] = False
- 177 Also you can pass different kwargs to the cascade save using cascade_kwargs
- 178 which overwrites the existing kwargs with custom values
- 179
- 180 """
- 181 ==> signals.pre_save.send(self.__class__, document=self)
- 182
- 183 if validate:
- 184 self.validate()
- 185
- 186 if not write_options:
- 187 write_options = {}
- Variables:
- force_insert = False
- self = <Object: None>
- safe = True
- _refs = None
- cascade = None
- cascade_kwargs = None
- write_options = None
- validate = True
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/reports/asset.py (Line: 134)
- Function: submit
- 127 # Create new object
- 128 self.info("Creating new object. model='%s', serial='%s'" % (
- 129 m.name, serial))
- 130 data = {"asset": {"serial": serial}}
- 131 if revision:
- 132 data["asset"]["revision"] = revision
- 133 o = Object(model=m, data=data, container=self.lost_and_found)
- 134 ==> o.save()
- 135 o.log(
- 136 "Created by asset_discovery",
- 137 system="DISCOVERY", managed_object=self.object,
- 138 op="CREATE"
- 139 )
- 140 # Check revision
- Variables:
- vnd = <Vendor: Juniper Networks>
- vendor = 'JUNIPER'
- description = 'MX480'
- part_no = ['MX480']
- type = 'CHASSIS'
- self = <noc.inv.discovery.reports.asset.AssetReport object at 0x4cc2a90>
- m = <ObjectModel: Juniper | MX | MX480 Chassis>
- number = 'None'
- o = <Object: None>
- p = 'MX480'
- builtin = False
- is_unknown_xcvr = False
- scope = u'chassis'
- serial = 'JN11BD4C8AFB'
- data = {'asset': {'serial': 'JN11BD4C8AFB', 'revision': 'None'}}
- revision = 'None'
- ------------------------------------------------------------------------
- File: /opt/noc/inv/discovery/jobs/asset_discovery.py (Line: 41)
- Function: handler
- 34 for o in result:
- 35 self.debug("Submit %s" % str_dict(o))
- 36 self.report.submit(
- 37 type=o["type"], number=o.get("number"),
- 38 builtin=o["builtin"],
- 39 vendor=o.get("vendor"), part_no=o["part_no"],
- 40 revision=o.get("revision"), serial=o.get("serial"),
- 41 ==> description=o.get("description")
- 42 )
- 43 # Assign stack members
- 44 self.report.submit_stack_members()
- 45 #
- 46 self.report.submit_connections()
- 47 #
- Variables:
- self =
- <noc.inv.discovery.jobs.asset_discovery.AssetDiscoveryJob object at 0x5119190>
- object = <ManagedObject: jnr01-yla-str>
- result =
- [{'builtin': False,
- 'description': 'MX480',
- 'number': 'None',
- 'part_no': ['MX480'],
- 'revision': 'None',
- 'serial': 'JN11BD4C8AFB',
- 'type': 'CHASSIS',
- 'vendor': 'JUNIPER'},
- {'builtin': False,
- 'description': 'MX480',
- 'number': 'None',
- 'part_no': ['MX480'],
- 'revision': 'None',
- 'serial': 'JN11BD4C8AFB',
- 'type': 'CHASSIS',
- 'vendor': 'JUNIPER'}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 280)
- Function: _job_wrapper
- 273 else:
- 274 return self._job_wrapper(job, **kwargs)
- 275
- 276 def _job_wrapper(self, job, **kwargs):
- 277 tb = None
- 278 t0 = time.time()
- 279 try:
- 280 ==> r = job.handler(**kwargs)
- 281 except Exception:
- 282 # error_report()
- 283 tb = get_traceback()
- 284 job.error(tb)
- 285 job.on_exception()
- 286 s = job.S_EXCEPTION
- Variables:
- job =
- <noc.inv.discovery.jobs.asset_discovery.AssetDiscoveryJob object at 0x5119190>
- tb = None
- self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x4414b10>
- t0 = 1395745213.623014
- kwargs =
- {'object': <ManagedObject: jnr01-yla-str>,
- 'result': [{'builtin': False,
- 'description': 'MX480',
- 'number': 'None',
- 'part_no': ['MX480'],
- 'revision': 'None',
- 'serial': 'JN11BD4C8AFB',
- 'type': 'CHASSIS',
- 'vendor': 'JUNIPER'},
- {'builtin': False,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement