TECHZEN Zenoss User Community ARCHIVE  

Error displaying device after modifying a product under Manufactures

Subject: Error displaying device after modifying a product under Manufactures
Author: Andy Fleming
Posted: 2018-01-03 15:53

I wanted to see if anyone else has run into this bug, or if its something unique to my install.  I've got a test install of 6.0.1 setup and added various devices.  

As things like model number or software get detected they get added as products under the unknown or in some cases an organizer actual manufacture.  This is as I would expect.  

But here is the troubling part.  If I move a given product from say the Unknown organizer to a different one then when I navigate to those devices under the device tree, I get this error.  

Site error

An error was encountered while publishing this resource. The requested resource does not exist.

I also found that if I just rename a product, IE .1.3.6.1.4.1.318.1.3.4.6 for an APC PDU to  AP8953 (and leave the product key the same) I get the same error.  

Is this issue present in later versions of 5.3, or is this something new to 6.0?  OR for that matter anyone else doing testing that can verify if you have this issue and/or if there is a work around like a CLI command or some catalog update command?  

Thanks



Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Andy Fleming
Posted: 2018-01-03 16:03

I also forgot to mention.  This is an install was via the OVF appliance too not upgrade or anything.  So didn't even screw with the OS.

------------------------------
Andy Fleming
KanREN - Kansas Research and Education Network
KS
------------------------------


Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Neuromancer
Posted: 2018-01-15 10:31

Hi Andy,

FYR I got the same issue, I work on a Zenoss 6.1.0 r46 (recently upgrade from 5.1.x).
I modeled some cisco devices unknown to local manufacturers, once modified the entry with the correct model name (guessed from Cisco via the OID) trying to drill the device I have the same error.

I tried to remove the device but I'm not able to insert it back, the job stops after few seconds (see log).

What I tried:

- reverted the naming back to the original (putting back the device OID as device name)
- checked DB integrity with the Zenoss Toolbox tools


Already used Manufacturers feature but never had this problem.

Unfortunately nothing to do.




------------------------------
Neuromancer
------------------------------


Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Neuromancer
Posted: 2018-01-15 11:38

Forgot logs, sorry

2018-01-15 11:10:24,998 INFO zen.Job: Job 63cf74e9-ede8-4e2b-8741-375df90f9d78 (Products.ZenModel.ZDeviceLoader.CreateDeviceJob) received
2018-01-15 11:10:25,089 INFO zen.Job: Starting job 63cf74e9-ede8-4e2b-8741-375df90f9d78 (Products.ZenModel.ZDeviceLoader.CreateDeviceJob)
2018-01-15 11:10:25,590 ERROR zen.Job: Failed to create device.
Traceback (most recent call last):
File "/opt/zenoss/Products/ZenModel/ZDeviceLoader.py", line 234, in _run
device = createDevice()
File "/opt/zenoss/Products/ZenModel/ZDeviceLoader.py", line 230, in createDevice
performanceMonitor, manageIp, zProperties, deviceProps
File "/opt/zenoss/Products/ZenModel/ZDeviceLoader.py", line 138, in load_device
zProperties=zProperties, **deviceProperties
File "/opt/zenoss/Products/ZenModel/Device.py", line 121, in manage_createDevice
device = deviceClass.createInstance(deviceName, performanceMonitor, manageIp)
File "/opt/zenoss/Products/ZenModel/DeviceClass.py", line 168, in createInstance
self._checkDeviceExists(devId, performanceMonitor, manageIp)
File "/opt/zenoss/Products/ZenModel/DeviceClass.py", line 183, in _checkDeviceExists
dev = ipobj.device()
File "/opt/zenoss/Products/ZenModel/IpAddress.py", line 231, in device
if iface: return iface.device()
File "/opt/zenoss/Products/ZenModel/OSComponent.py", line 46, in device
if os: return os.device()
File "/opt/zenoss/Products/ZenModel/OperatingSystem.py", line 158, in device
return self.getPrimaryParent()
File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 92, in getPrimaryParent
return self.__primary_parent__.primaryAq()
File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 87, in primaryAq
raise KeyError(self.id)
KeyError: '172.16.1.17' <- this is the device I cannot insert anymore
2018-01-15 11:10:25,595 ERROR zen.Job: Job 63cf74e9-ede8-4e2b-8741-375df90f9d78 failed with an exception
2018-01-15 11:10:25,596 ERROR zen.Job: <traceback object at 0x6ab9950>

------------------------------
Neuromancer
------------------------------


Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Andy Fleming
Posted: 2018-01-16 14:49

How some of these bugs make it through to GA makes me question testing methodologies.  Even if GA needs to go out, I'm shocked they aren't found and listed as known issues in the release notes.  But hey, I'm a sysadm not a developer I guess.  I was thinking about trying 6.1.0 and, but I guess there isn't much point then.  Especially with the know issue of having to uninstall any ZenPacks in Dev mode before you upgrade.  


------------------------------
Andy Fleming
KanREN - Kansas Research and Education Network
KS
------------------------------


Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Chris Smouse
Posted: 2018-01-18 15:42

Andy -

Thanks for raising these issues. I was able to reproduce in 6.1.0 the scenario where renaming a Product, then navigating to a related Device causes the Site Error you mention. I've logged ZEN-29457 in JIRA. Feel free to comment and watch that issue for updates.

I'm having difficulty reproducing the first scenario you mentioned, however. I encourage you to log a JIRA for that specific case, and we'll research it as soon as possible.

Sorry for the inconvenience.

------------------------------
Chris Smouse
Senior Manager, Engineering, Zenoss

------------------------------

Site error

An error was encountered while publishing this resource. The requested resource does not exist.

I also found that if I just rename a product, IE .1.3.6.1.4.1.318.1.3.4.6 for an APC PDU to  AP8953 (and leave the product key the same) I get the same error.

Is this issue present in later versions of 5.3, or is this something new to 6.0?  OR for that matter anyone else doing testing that can verify if you have this issue and/or if there is a work around like a CLI command or some catalog update command?

Thanks



Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Andy Fleming
Posted: 2018-01-22 15:47

Thanks, I've added myself as a watcher for the JRIA issue on renaming a product.   

I've also just tried moving a product from the Unknown Manufacturer to a different one and verified I see the issue with 6.0.1.  So it sounds like my first problem was resolved in 6.1.0 since you can't recreate it.  I'll try again once I get the opportunity to update my test install from 6.0.1 to 6.1.0.  I haven't done it yet since I'll have to uninstall all of the Zenpacks I'm building that are installed in dev mode first.

------------------------------
Andy Fleming
KanREN - Kansas Research and Education Network
KS
------------------------------


Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Andy Fleming
Posted: 2018-01-23 15:55

I'll update the JIRA case, but I just upgraded from the 6.0.1 install to 6.1.0 and I still have the same problem when you move a product to a different manufacture not just rename it.  Not sure what is different in the test env Chris has.

------------------------------
Andy Fleming
KanREN - Kansas Research and Education Network
KS
------------------------------


Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Neuromancer
Posted: 2018-04-30 07:45

Hello,

just upgraded to 6.1.2 but the problem still there.

now I can modify the products name without issue but trying to insert back a device previously deleted I get the error "zen.Job: Failed to create device."
I tried a zodbscan also but it give no errors....

Any idea where to look?

Traceback (most recent call last):
File "/opt/zenoss/Products/ZenModel/ZDeviceLoader.py", line 234, in _run
device = createDevice()
File "/opt/zenoss/Products/ZenModel/ZDeviceLoader.py", line 230, in createDevice
performanceMonitor, manageIp, zProperties, deviceProps
File "/opt/zenoss/Products/ZenModel/ZDeviceLoader.py", line 138, in load_device
zProperties=zProperties, **deviceProperties
File "/opt/zenoss/Products/ZenModel/Device.py", line 121, in manage_createDevice
device = deviceClass.createInstance(deviceName, performanceMonitor, manageIp)
File "/opt/zenoss/Products/ZenModel/DeviceClass.py", line 168, in createInstance
self._checkDeviceExists(devId, performanceMonitor, manageIp)
File "/opt/zenoss/Products/ZenModel/DeviceClass.py", line 183, in _checkDeviceExists
dev = ipobj.device()
File "/opt/zenoss/Products/ZenModel/IpAddress.py", line 231, in device
if iface: return iface.device()
File "/opt/zenoss/Products/ZenModel/OSComponent.py", line 46, in device
if os: return os.device()
File "/opt/zenoss/Products/ZenModel/OperatingSystem.py", line 158, in device
return self.getPrimaryParent()
File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 92, in getPrimaryParent
return self.__primary_parent__.primaryAq()
File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 87, in primaryAq
raise KeyError(self.id)
KeyError: '172.16.1.17'
2018-04-30 11:36:52,016 ERROR zen.Job: Job 94d3ad2b-4f15-4534-8f20-aba8d4f61a02 failed with an exception
2018-04-30 11:36:52,016 ERROR zen.Job: <traceback object at 0x70b76c8>

------------------------------
Neuromancer
------------------------------


Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Shane Quinsey
Posted: 2018-05-01 21:02

I've gotten similar - on RM v6.1.0
I have 40 unknown cisco device types so my support case against the CiscoMonitor 5.9.0 ZenPack has been raised under ZPS-3515

Basically I worked out (to avoid the yellow flares) unassign every device from that hardware type
rename hardware device type
let ZenOSS modelling update overnight so it reflects what you want..

This is also the case if you want to clean up duplicate hardware vendors where a node is assigned against a hardware type

Unfortunately as I have over 80 nodes under some device types - the manual way is just exhausting, and I can't obtain a way to un/re-assign via CLI,

I may just have to wait for the updated ZenPack

For those effected and trying to get rid of the flares / see devices again (as mine went invisible as it couldn't display the device type)
Take a backup from CC! :)   -- though you already did that right before you changed the hardware types right?
If your getting flares containing OIDs, rebuild those first.
Scans need to be done against the Db, and then rescanned for the --fix switch to be applied. and resolve the issue. The below came from the searchable fixes, I've just put them together for my own quick howto so I thought I'd share....

Firstly you will need to Log in to the Control Centre via SSH for the instance having issues
 [# and $ are prompts] 

  1. [zenadmin@lprdzencc01 ~]$ sudo -s

  2. [root@lprdzencc01 zenadmin]# serviced service shell -i zope

  3. [root@1630d1a222fb /]# su - zenoss

  4. (zenoss) [zenoss@1630d1a222fb ~]$
    Use the following commands in sequence to resolve the device not found flares - may take about 10-20min per scan

      zodbscan
      findposkeyerror
      zenrelationscan
      zencatalogscan
      zencatalog run --forceindex --createcatalog --workers=8
    Check the portal where the issues were appearing - should be resolved now


------------------------------
Shane Quinsey
------------------------------


Subject: RE: Error displaying device after modifying a product under Manufactures
Author: Shane Quinsey
Posted: 2019-03-20 18:48

I'm hearing a fix is coming in RMv6.4 Chris :|

------------------------------
Shane, Australia
ZenN00b
------------------------------


< Previous
Nexus 9000 and nx-api
  Next
Not all Zenoss services starting
>