Upgrade from 4.x
Migrate from Resource Manager 4.x to 5.
Resource Manager 5.0 introduces the find-id and find-ip actions and thus no longer requires committing the allocation request before a resource is assigned. This approach makes the allocation process fully synchronous, greatly simplifying operation and integration with application code.
However, this change is not backward compatible with existing application/service code:
You can no longer make an allocation request by directly configuring the Resource Manager data model, e.g. creating
/resource-manager/*-pool/allocationentry.The location of the assigned resource value in the data model has changed to
/resource-manager/*-pool/allocation/resource.The programmatic API has changed to use an interface that returns the requested value directly.
Resource Manager no longer supports automatically redeploying services.
At the same time, the internal data model has also changed but the upgrade component migrates the data to the new format, preserving existing allocations.
Upgrade Procedure
Due to NSO validation limitations, upgrade from Resource Manager 4.x must use a specific procedure, either with the --ignore-initial-validation switch or the upgrade-helper-rm package. We also strongly recommend to minimize other package changes during migration, focusing solely on Resource Manager-related updates.
In cases where a start switch can be easily provided to the ncs daemon, such as local installs or NSO versions supporting NCS_EXTRA_ARGS in system install, the --ignore-initial-validation switch may be used:
Create a backup copy of the NSO installation with the
ncs-backupcommand.Replace the old Resource Manager package (4.x) with the new one (5.x). Make sure that Resource Manager is the only package that is changed.
Restart NSO with the
--with-package-reload-forceand--ignore-initial-validationflags:For local install:
ncs --stop; ncs --ignore-initial-validation --with-package-reload-forceFor system install:
Edit
/etc/ncs/ncs.systemd.confto setNCS_RELOAD_PACKAGES=forceandNCS_EXTRA_ARGS=--ignore-initial-validation.Restart the service, e.g.
systemctl restart ncs.Edit
/etc/ncs/ncs.systemd.confand remove theNCS_RELOAD_PACKAGESandNCS_EXTRA_ARGSvalues.
Replace/upgrade other (service) packages.
Alternatively, you may use the upgrade-helper-rm package that is part of the Resource Manager release binary and does not require restarting NSO:
Create a backup copy of the NSO installation with the
ncs-backupcommand.Add the
upgrade-helper-rmpackage to the NSO (packagesdirectory).Invoke
packages reload.Replace the Resource Manager 4 package with the Resource Manager 5 package.
Remove the
upgrade-helper-rmpackage from the NSO (packagesdirectory).Invoke
packages reload force.Replace/upgrade other (service) packages.
Suggested Code Updates
Data Model Reliance
If your code currently works directly with the data in /resource-manager/*-pool/allocation, you will need to use the new API or find-id / find-ip actions instead.
Example Python service code that no longer works:
Should be migrated to:
For code outside service callbacks, you can invoke the action directly:
Updated Python API
Example Python service code that no longer works:
Should be migrated to:
Updated Java API
Example Java service code that no longer works:
Should be migrated to:
Allocations Using Pool Sync
If your allocations currently make use of the /resource-pools/id-pool/allocation/request/sync feature, you can achieve the same outcome by providing the list of resource pools to the new API.
Example allocation request that no longer works:
Should be migrated to:
Synchronous Operation
If your service code relies on the asynchronous operation of Resource Manager for anything other than resource allocation by the id-allocator or ip-address-allocator, you should use Nano Services.
Last updated
Was this helpful?

