-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service 'PackageRepository' cannot be migrated because the specified service is not installed locally. #147
Comments
The migration tool is giving you that message because PackageRepository.json doesn't exist within the configuration file directory, which does indicate that you don't have the pakcage repository service installed. Are you sure you have that service installed? If there are files to migrate related to the PackageRepository service, they would be located at If PackageRepository is simply not installed and doesn't need to be migrated, you can run the tool excluding the |
Fixes Issue [ni#147](ni#147): "Service 'PackageRepository' cannot be migrated because the specified service is not installed locally." The service definition json for the package repository is %PROGRAMDATA%/Skyline/Config/Repository.json", which fails to match the RepositoryMigrator.name = "PackageRepository" property -> hence the service fails to be found by the module.
The problem is that the service definition .json below %PROGRAMDATA%/National Instruments/Skyline/Config/Repository.json does not match nislmigrate's RepositoryMigrator.name property value "PackageRepository" which hence fails to identify the service correctly. I wonder when that service got renamed. I have submitted Pull Request #148 to amend this issue. |
I left this comment on the PR also, but perhaps creating a copy of Repository.json and renaming it to PackageRepository.json would fix the issue, the format of the file should be the same. |
Hi @Christian-Nunnally and thank you for the quick response. So @NurAb-Sal as our NI Field Engineer helped me already to get this working by renaming in repository_migrator.py: But of cause this must be fixed in the source code here on git as well. But now I have the same issue with Systemstates: And the problem now is that non such corresponding SystemsState.json exists in C:\ProgramData\National Instruments\Skyline\Config There are only SystemsManagement.json and SystemsStateManager.json 1. What would you suggest to get this fixed @Christian-Nunnally |
By changing the name that the migrator returns, you're going to need to make sure that you rename the json file after restore to PackageRepostory.json. Alternatively leaving the code unchanged and creating a copy of the file named PackageRepository.json will also work. As far as system states migration from 2020 to 2022 that is untested, however you could attempt the same remedy we're doing for the package repo service and copy and rename |
Hi @Christian-Nunnally so the change worked you suggested C:\WINDOWS\system32>nislmigrate capture --systemstates --secret=####--dir=C:\Users\####\Desktop\#### 1. How to fix this KeyError |
Oh, the service name is also defined inside the .json file. In your copied files, rename SystemsStateManager to SystemsState |
Hi @Christian-Nunnally as I understand from your last post SystemsStateManager & SystemsState is creating the same export of data is this correct? Command Line with "SystemsStateManager" Folder name in the capture folder: Command Line with "_SystemsState _" Folder name in the capture folder: So as you can see the restore function is expecting a separat "SystemsStateManager" AND "SystemsState" folder to be created by the capture command on the original server. 1. How can we continue now and when this stuff will be fixed in the nislmigrate tool directly? |
Hi @Christian-Nunnally sorry for making pressure but we really need a quick solution for the migration... |
@Christian-Nunnally do you have a solution or answer for me? |
It looks like you resolved the issue with the SystemsState service and and now facing new issue with the SystemsManagement service, which is a separate service. I'm not sure why it's not finding SystemsManagement.json though because you mentioned that it existed on the original server right? Did it not get captured for some reason? If SystemsManagement.json is not in the capture folder, double check it was on the original server, was that one of the things that got renamed? This tool is open source with a contributing guide, if you want to add support for 20.0 migrations a new version can be released at any time, my recommended approach for fixing would be to add a flag that modifies the behavior of the renamed exporters using this function:
|
Hi @Christian-Nunnally this is everything what gets created by the command "capture --all":
|
It looks like you had it working in your above example ^ but it was having issue with |
Hi @Christian-Nunnally here is the content of the And it only worked for |
Hi @Christian-Nunnally with the help of @NurAb-Sal I could finally get the capture for the After this change I could execute the BUT now as I wanted to create a full capture with And I can reproduce this also by just running @NurAb-Sal explained me that this So I kindly ask you to help me fixing this issue @Christian-Nunnally. |
@Christian-Nunnally do you have any updated? |
@OSZF I'm so sorry, I didn't mean to leave you hanging after the holidays! This issue dropped off my radar, and I haven't been getting notifications from this repo. The content of the
I suggest going through similar steps to make sure you have a If you capture after changing the |
Hi @Christian-Nunnally, But regarding the NI-SystemLink-Migration Tool when will this be properly updated by NI to not must be using all this Workarounds above??? Because it's written in the official Docu that SystemLink 21.0 is support but we see its not because its not working without al this huge effort and help.... |
The migration tool was manually tested against fresh installs of the versions of SL listed on the read me, I think the reason there are so many work arounds needed here is that the server you're migrating from was previously upgraded from an earlier version, if that is the case, that was not tested. Can you confirm the history of the server you're migrating from and whether it was originally installed as a 21.0 server or was previously upgraded in place? |
Hi @Christian-Nunnally not that is defiantly not the case. This means for me now the tool was never relay tested with SystemLink 21.0 because otherwise it should work as you just explained by yourself. And also the documentation in not matching the current version of the tool as we found out with @NurAb-Sal as I wrote on the top. So again my question: |
@OSZF Since you're migrating from a 'freshly' installed 21.0 I'm not sure how this didn't get caught during the manual testing. If the tool failed in this way the test would have failed, so you're right that that indicates manual tests weren't done against a clean 21.0 server. I added the documentation on which versions are supported and did a lot of the manual testing, maybe I incorrectly documented 21.0 when 21.1 was the oldest version tested against, but that just doesn't sound right because there were four versions we tested against and 22 was not out yet. When I have time I can re-run the manual tests against a 21.0 server to validate what we're saying here. Then I can update the documentation to remove the claimed 21.0 support if it doesn't work. Adding support for the SystemsManagement and PackageRepository migrators to look for the configuration file in one of two places would be a potential 'fix' but the restore would need to know how to rename and edit the file after restore depending on which version you're restoring to. This could be done by adding a command line argument to both of these migrators that specifies the version being migrated to/from
I can implement a potential fix for your 21.0 migration and provide it to you in a branch as a one off, as that would only take a couple of hours, but it would be untested. I've updated the documentation for the |
I think the documentation may just be wrong. We did test 21.0 during development and ran into these problems. My recollection is that we decided to simply not support this use case. It's possible that didn't get reflected in the documentation. |
Hi @JD-Robertson so you mean you saw all this issues already and didn't want to support SystemLink 21.0? did I got this right? |
Hi @JD-Robertson & @Christian-Nunnally do you have any updated for me? Next week we will NEED to migrate the full SystemLink Server together with the testmonitor stuff as well which didn't work bevor as you know! |
I'm trying to create a backup of our SystemLink 21.0 Server and try to restore it to a new SystemLink 2022 Q1 on a other machine but when doing this I'm receiving the Error:
C:\Program Files (x86)\Python310-32\Scripts>nislmigrate.exe restore --all -f --secret=#### --dir=C:\Users\Public\Documents\####
[2022-12-01 15:30:16] Performing pre-migration check for AlarmInstance
[2022-12-01 15:30:16] Pre-migration check passed for AlarmInstance.
[2022-12-01 15:30:16] Performing pre-migration check for AssetPerformanceManagement
[2022-12-01 15:30:16] Pre-migration check passed for AssetPerformanceManagement.
[2022-12-01 15:30:16] Performing pre-migration check for AssetPerformanceManagementRuleEngine
[2022-12-01 15:30:16] Pre-migration check passed for AssetPerformanceManagementRuleEngine.
[2022-12-01 15:30:16] Performing pre-migration check for DocumentManager
[2022-12-01 15:30:16] Pre-migration check passed for DocumentManager.
[2022-12-01 15:30:16] Performing pre-migration check for FileIngestion
[2022-12-01 15:30:16] Pre-migration check passed for FileIngestion.
[2022-12-01 15:30:16] Performing pre-migration check for Notification
[2022-12-01 15:30:16] Pre-migration check passed for Notification.
[2022-12-01 15:30:16] Performing pre-migration check for PackageRepository
[2022-12-01 15:30:16] FileNotFoundError: Could not find the captured service at C:\Users\Public\Documents\####\PackageRepository\PackageRepository
So this is for me the indication that the capture went wrong.
But when I now try to backup only the repos with I receive the fallowing error:
C:\WINDOWS\system32>nislmigrate capture --repo --secret=#### --dir=C:\Users\####\Desktop\####
[2022-12-01 15:19:30] MigrationError:
Service 'PackageRepository' cannot be migrated because the specified service is not installed locally.
Remove unavailable services from the request and try again, or use --all to request all supported services
that are currently installed..
The text was updated successfully, but these errors were encountered: