Migrate from System Monitor to Fridge#
OrangeQS Juice v26.39.0 renamed the system_monitor service and Python package to fridge. Juice v26.39.0 to v26.42.0 keep backward-compatible fallbacks for the old names. Juice v26.43.0 removes these fallbacks. From v26.43.0, a setup that still uses the old names stops working.
Versions that need this migration#
Your current version |
Version you upgrade to |
What to do |
|---|---|---|
v26.38.0 or earlier |
v26.39.0 to v26.42.0 |
Optional. Your setup continues to work and logs deprecation warnings. Migrate before you upgrade to v26.43.0. |
v26.38.0 or earlier |
v26.43.0 or later |
Required. Do the migration steps before you start the new version. |
v26.39.0 to v26.42.0, with deprecation warnings |
v26.43.0 or later |
Required. Do the migration steps before you upgrade. |
You can skip this migration if one of these is true:
Your installation does not run a System Monitor (or Fridge) service.
You set up the Fridge service on v26.39.0 or later, with the new names from the start.
You already did the migration on v26.39.0 to v26.42.0, and your services log no deprecation warnings about
system_monitororsystem-monitor. Also, noentrypointin yourorchestration.tomlfile refers toorangeqs.juice.system_monitor.
This page has these sections:
Complete the migration: what you must do.
Background: fallbacks in v26.39.0 to v26.42.0: what changed in v26.39.0 and in v26.43.0.
Complete the migration#
Do the steps that apply to your setup, then restart. On v26.39.0 to v26.42.0, each step stops one deprecation warning.
1. Rename your service entry and InfluxDB bucket in orchestration.toml#
# Before
[services.system-monitor]
entrypoint = "orangeqs.juice.system_monitor._service:SystemMonitorService"
[influxdb2.buckets.system_monitor]
name = "system_monitor"
# After
[services.fridge]
entrypoint = "orangeqs.juice.fridge._service:FridgeService"
[influxdb2.buckets.service-fridge]
name = "service-fridge"
(If your service entry already uses a different name, rename it to fridge and update entrypoint the same way.)
The service-fridge bucket is new: sudo juice install (step 5) creates it, but does not move data out of the old system_monitor bucket. New readings go to service-fridge; your existing history stays in system_monitor unless you export and re-import it yourself with InfluxDB’s own tools.
2. Rename your configuration files#
Find these files in your lab repository’s config folder, or in /etc/juice/config, and rename each one you find:
mv system-monitor.toml fridge.toml
mv mock-system-monitor.toml mock-fridge.toml
mv system-monitor-dashboard.toml fridge-monitor-dashboard.toml
3. If you maintain a custom hardware backend using init_module#
Skip this step if you use the built-in mock backend. It only applies if you wrote your own init_module script: the entrypoint script that runs inside the service’s kernel and constructs your backend object.
FridgeService finds your backend by looking, by name, for a variable in that kernel namespace. Your script must bind that variable as fridge, not system_monitor:
# Before, in your init_module script
system_monitor = MyFridgeApp(...)
# After
fridge = MyFridgeApp(...)
Also update any imports:
# Before
from orangeqs.juice.system_monitor import ...
# After
from orangeqs.juice.fridge import ...
Consider replacing init_module with the application_class method instead: see Writing a Custom Fridge Backend.
4. Remove the service-name override, if you added one#
After step 1, delete this line from fridge-monitor-dashboard.toml if it’s there:
# Before
service_name = "system-monitor"
# After
# (delete the line: "fridge" is now the default)
5. Apply your changes#
sudo juice install --restart
Background: fallbacks in v26.39.0 to v26.42.0#
This section gives background information. You do not need it to do the migration.
Juice v26.39.0 to v26.42.0 have these fallbacks for the old names. Juice v26.43.0 removes all of them.
Python imports and
entrypointstrings. Theorangeqs.juice.system_monitorpackage exists as a thin alias package. Yourorchestration.tomlfile can use the entryentrypoint = "orangeqs.juice.system_monitor._service:SystemMonitorService". This fallback does not log a warning. From v26.43.0, the package does not exist, and the import fails.Configuration file names.
fridge,mock-fridge.toml, andfridge-monitor-dashboard.tomllook for the old file name if they cannot find the new one. For example, the system can read an existingsystem-monitor.tomlfile. This fallback logs aDeprecationWarning. From v26.43.0, the system ignores the old files.Custom
init_modulescripts. The task handlers inFridgeServicelook for afridgevariable in the kernel namespace. If yourinit_modulescript binds asystem_monitorvariable instead, the task handlers use that variable. This fallback logs aDeprecationWarning. From v26.43.0, the task handlers fail if there is nofridgevariable.Dashboard service name.
fridge-monitor-dashboard.toml::service_namedefaults to"fridge". If the system reads it from asystem-monitor-dashboard.tomlfile that does not set it, the value is"system-monitor"instead. Thus the dashboard continues to address a service entry that you did not rename inorchestration.toml. This fallback logs aDeprecationWarning. It stops when you rename the file tofridge-monitor-dashboard.toml(step 2). Thus, on these versions, rename your service entry (step 1) before you rename the file, or setservice_namefirst.
A DeprecationWarning message tells you what to change. The system sends this message through the Python warnings module and through the logger of your service.