Archived community.zenoss.org | full text search
Skip navigation
10664 Views 7 Replies Latest reply: May 5, 2010 12:36 PM by Ryan Matte RSS
Ryan Matte ZenossMaster 653 posts since
Mar 26, 2009
Currently Being Moderated

May 4, 2010 6:00 PM

zenmigrate error: Schema for relation job not found on JobStatus

Ok, so, I have 13 Zenoss servers in Production (which were all cloned from the same VM image which is constantly kept up to date).  12 of the upgrades went perfectly fine, but on one of them I am getting the following error when zenmigrate is run:

 

zenoss@D2Z01LAB:~$ zenmigrate --force
INFO:zen.migrate:Database going to version Zenoss 2.5.2
INFO:zen.migrate:Installing AddConfigTimeDataPoints (2.5.0)
INFO:zen.migrate:Installing AddEventQueueLength (2.5.0)
INFO:zen.migrate:Installing AddFilesystemAndInterfaceDataPointAliases (2.5.0)
INFO:zen.migrate:Installing AddResultFields (2.5.0)
INFO:zen.migrate:Installing AddTitleOrIdToCatalogs (2.5.0)
INFO:zen.migrate:Reindexing devices.  This may take a while...
INFO:zen.migrate:Installing ChangeDeviceProdStatePermission (2.5.0)
INFO:zen.migrate:Installing CustomSchemaMenuRestriction (2.5.0)
INFO:zen.migrate:Installing DeleteDevicePermission (2.5.0)
INFO:zen.migrate:Installing FixBadJobs (2.5.0)
Recovering
Traceback (most recent call last):
  File "/usr/local/zenoss/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in ?
    main()
  File "/usr/local/zenoss/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in main
    m.main()
  File "/usr/local/zenoss/zenoss/Products/ZenModel/migrate/Migrate.py", line 425, in main
    self.cutover()
  File "/usr/local/zenoss/zenoss/Products/ZenModel/migrate/Migrate.py", line 305, in cutover
    self.migrate()
  File "/usr/local/zenoss/zenoss/Products/ZenModel/migrate/Migrate.py", line 281, in migrate
    m.cutover(self.dmd)
  File "/usr/local/zenoss/zenoss/Products/ZenModel/migrate/fixjobs.py", line 41, in cutover
    status.delete()
  File "/usr/local/zenoss/zenoss/Products/Jobber/status.py", line 144, in delete
    parent._delObject(self.id)
  File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyRelationshipBase.py", line 79, in _delObject
    self.removeRelation(obj)
  File "/usr/local/zenoss/zenoss/Products/ZenRelations/RelationshipBase.py", line 110, in removeRelation
    self._remove(obj)
  File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyContRelationship.py", line 149, in _remove
    notify(ObjectWillBeRemovedEvent(robj, self, robj.getId()))
  File "/usr/local/zenoss/zenoss/lib/python/zope/event/__init__.py", line 23, in notify
    subscriber(event)
  File "/usr/local/zenoss/zenoss/lib/python/zope/component/event.py", line 26, in dispatch
    for ignored in zope.component.subscribers(event, None):
  File "/usr/local/zenoss/zenoss/lib/python/zope/component/_api.py", line 130, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/usr/local/zenoss/zenoss/lib/python/zope/component/registry.py", line 290, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/usr/local/zenoss/zenoss/lib/python/zope/interface/adapter.py", line 535, in subscribers
    subscription(*objects)
  File "/usr/local/zenoss/zenoss/lib/python/zope/component/event.py", line 33, in objectEventNotify
    adapters = zope.component.subscribers((event.object, event), None)
  File "/usr/local/zenoss/zenoss/lib/python/zope/component/_api.py", line 130, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/usr/local/zenoss/zenoss/lib/python/zope/component/registry.py", line 290, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/usr/local/zenoss/zenoss/lib/python/zope/interface/adapter.py", line 535, in subscribers
    subscription(*objects)
  File "/usr/local/zenoss/zenoss/lib/python/OFS/subscribers.py", line 107, in dispatchObjectWillBeMovedEvent
    dispatchToSublocations(ob, event)
  File "/usr/local/zenoss/zenoss/lib/python/zope/app/container/contained.py", line 182, in dispatchToSublocations
    for ignored in zope.component.subscribers((sub, event), None):
  File "/usr/local/zenoss/zenoss/lib/python/zope/component/_api.py", line 130, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/usr/local/zenoss/zenoss/lib/python/zope/component/registry.py", line 290, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/usr/local/zenoss/zenoss/lib/python/zope/interface/adapter.py", line 535, in subscribers
    subscription(*objects)
  File "/usr/local/zenoss/zenoss/Products/ZenRelations/subscribers.py", line 22, in cleanUpRelationships
    if not (isinstance(ob, ToOneRelationship) and
  File "/usr/local/zenoss/zenoss/Products/ZenRelations/RelationshipBase.py", line 121, in remoteTypeName
    schema = self.__primary_parent__.lookupSchema(self.id)
  File "/usr/local/zenoss/zenoss/Products/ZenRelations/RelationshipManager.py", line 240, in lookupSchema
    raise ZenSchemaError("Schema for relation %s not found on %s" %
Products.ZenRelations.Exceptions.ZenSchemaError: Schema for relation job not found on JobStatus

 

Does anyone have any idea what might be causing this and how to fix it?  Any feedback would be much appreciated, I've really hit a dead end here.

  • Ian McCracken ZenossEmployee 257 posts since
    Feb 26, 2007

    Never seen that one before. Somehow, you've got a bad JobStatus object in there. Can try rebuilding the relations in zendmd:

     

    for status in dmd.JobManager.jobs():

        status.checkRelations(repair=True)

     

    Then run zenmigrate again.

More Like This

  • Retrieving data ...

Incoming Links

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points