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_monitor or system-monitor. Also, no entrypoint in your orchestration.toml file refers to orangeqs.juice.system_monitor.

This page has these sections:

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 entrypoint strings. The orangeqs.juice.system_monitor package exists as a thin alias package. Your orchestration.toml file can use the entry entrypoint = "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, and fridge-monitor-dashboard.toml look for the old file name if they cannot find the new one. For example, the system can read an existing system-monitor.toml file. This fallback logs a DeprecationWarning. From v26.43.0, the system ignores the old files.

  • Custom init_module scripts. The task handlers in FridgeService look for a fridge variable in the kernel namespace. If your init_module script binds a system_monitor variable instead, the task handlers use that variable. This fallback logs a DeprecationWarning. From v26.43.0, the task handlers fail if there is no fridge variable.

  • Dashboard service name. fridge-monitor-dashboard.toml::service_name defaults to "fridge". If the system reads it from a system-monitor-dashboard.toml file 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 in orchestration.toml. This fallback logs a DeprecationWarning. It stops when you rename the file to fridge-monitor-dashboard.toml (step 2). Thus, on these versions, rename your service entry (step 1) before you rename the file, or set service_name first.

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.