I just copied my instance via omd cp oldsite newsite and upgraded the new copy from 1.6.0p29 to 2.0.0p27. I got a few errors regarding autochecks and permission errors regarding rrd graphs.
The permission error is at step 8/17 Migrating fs_used name…:
After digging deeper into the permission problem I found that some of the hostfolders in /opt/omd/sites/OLDSITENAME/var/pnp4nagios/perfdata have different permissions accross the folders. The newer host folders have 750 the older ones 775. But I never changed them by hand. How can this happen? And what is the right permission for the host folders?
Another question is, why is the upgrade of the new site trying to convert rrd graphs of the old sites path?
Shouldn’t the new site use their own rrds which should be located in /opt/omd/sites/NEWSITENAME/var/pnp4nagios/perfdata? There would be at least the owner the right one…
There were bugs in older versions of the omd cp command.
You might want to try and upgrade the site first and then do a copy, or use the backup mechanism to “copy” the site.
Tried with the backup & restore method but got the same problem again:
-| 8/17 Migrating fs_used name…
-| + “Migrating fs_used name” failed
-| Traceback (most recent call last):
-| File “/omd/sites/MYNEWSITE/lib/python3/cmk/update_config.py”, line 158, in run
-| step_func()
-| File “/omd/sites/MYNEWSITE/lib/python3/cmk/update_config.py”, line 199, in update_fs_used_name
-| cmk.update_rrd_fs_names.update()
-| File “/omd/sites/MYNEWSITE/lib/python3/cmk/update_rrd_fs_names.py”, line 186, in update
-| update_service_info(config_cache, get_hostnames(config_cache))
-| File “/omd/sites/MYNEWSITE/lib/python3/cmk/update_rrd_fs_names.py”, line 176, in update_service_info
-| update_files(hostname, service.description, service.item, ‘pnp4nagios’))
-| File “/omd/sites/MYNEWSITE/lib/python3/cmk/update_rrd_fs_names.py”, line 95, in update_files
-| entry_to_rename = update_pnp_info_files(perfvar, ‘fs_used’, filepath)
-| File “/omd/sites/MYNEWSITE/lib/python3/cmk/update_rrd_fs_names.py”, line 156, in update_pnp_info_files
-| os.rename(rrdfile, rrdfilenew)
-| PermissionError: [Errno 13] Permission denied: '/opt/omd/sites/MYOLDSITE/var/pnp4nagios/perfdata/MYHOST/Filesystem_C___C_.rrd’ → ‘/opt/omd/sites/MYOLDSITE/var/pnp4nagios/perfdata/MYHOST/Filesystem_C___fs_used.rrd’
I don’t want to update our main site. This is not just a 5 minute job. We need to migrate a few checks and also want to get a migration way which works for us in a reasonable time. Without days or weeks of a not working monitoring.
It could be so easy if this copy/backup mechanisms would work. I could let my old monitoring running and test the new/migrated one…
Hi,
if i remember right I had same problem with permisions when updating my site to 2.0. The problem was that some files had owner not as omd user but as root user dunno why. I switched to omd user and migrating worked.
My problem currently is that the old filepath of the original site is used. This should not happen after copying to a new site or restoring a backup to a new site.
But this error happens at the update process of the copied site not at the copying process of it.
So it’s a update problem for me… the new site (copying process completed) tries to access rrds graphs of its origin at the update. Doesn’t make sense for me.
First, in the old site, double-check all permissions, as @jan.filo suggested.
Next, do a backup and restore to a new site.
Then upgrade the restored site.
If there are issues with the RRDs afterwards, take a look here.
Another approach would be to back up the old site and then upgrade the old site instead of the backup.
That way you have a backup just in case, but you might avoid the path issue.