i/builtin: flag interfaces unsupported for parallel instances [p2] - #17704
Mohit-Chachada wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Broad interface-policy changes and unresolved error-message inconsistencies warrant final human review.
Review effort: Balanced
Findings: None
What changed in this PR
Adds slot-side parallel-instance restrictions for built-in interfaces with appropriate system, gadget, and singleton-service errors.
Changes:
- Introduces shared restriction errors and slot classification.
- Flags unsupported parallel-instance slot providers.
- Expands unit and integration coverage.
| File | Description |
|---|---|
tests/main/parallel-install-iface-support/task.yaml |
Adds allowed-plug and rejected-slot integration cases. |
interfaces/builtin/login_session_observe.go |
Restricts parallel slot instances. |
interfaces/builtin/login_session_control.go |
Restricts parallel slot instances. |
interfaces/builtin/log_observe.go |
Restricts parallel slot instances. |
interfaces/builtin/location_observe.go |
Restricts singleton service slots. |
interfaces/builtin/location_control.go |
Restricts singleton service slots. |
interfaces/builtin/locale_control.go |
Restricts parallel slot instances. |
interfaces/builtin/libvirt.go |
Restricts parallel slot instances. |
interfaces/builtin/kvm.go |
Restricts parallel slot instances. |
interfaces/builtin/kernel_module_observe.go |
Restricts parallel slot instances. |
interfaces/builtin/kernel_module_load.go |
Restricts parallel slot instances. |
interfaces/builtin/kernel_module_control.go |
Restricts parallel slot instances. |
interfaces/builtin/kernel_firmware_control.go |
Restricts parallel slot instances. |
interfaces/builtin/kernel_crypto_api.go |
Restricts parallel slot instances. |
interfaces/builtin/kerberos_tickets.go |
Restricts parallel slot instances. |
interfaces/builtin/juju_client_observe.go |
Restricts parallel slot instances. |
interfaces/builtin/joystick.go |
Restricts parallel slot instances. |
interfaces/builtin/jack1.go |
Restricts parallel slot instances. |
interfaces/builtin/ion_memory_control.go |
Restricts parallel slot instances. |
interfaces/builtin/io_ports_control.go |
Restricts parallel slot instances. |
interfaces/builtin/intel_qat.go |
Restricts parallel slot instances. |
interfaces/builtin/intel_mei.go |
Restricts parallel slot instances. |
interfaces/builtin/iio.go |
Adds system/gadget-aware slot checks. |
interfaces/builtin/iio_test.go |
Tests system/gadget slot checks. |
interfaces/builtin/i2c.go |
Adds system/gadget-aware slot checks. |
interfaces/builtin/i2c_test.go |
Tests system/gadget slot checks. |
interfaces/builtin/hugepages_control.go |
Restricts parallel slot instances. |
interfaces/builtin/hostname_control.go |
Restricts parallel slot instances. |
interfaces/builtin/home.go |
Restricts parallel slot instances. |
interfaces/builtin/hidraw.go |
Adds system/gadget-aware slot checks. |
interfaces/builtin/hidraw_test.go |
Tests system/gadget slot checks. |
interfaces/builtin/hardware_random_observe.go |
Restricts parallel slot instances. |
interfaces/builtin/hardware_random_control.go |
Restricts parallel slot instances. |
interfaces/builtin/hardware_observe.go |
Restricts parallel slot instances. |
interfaces/builtin/gsettings.go |
Restricts parallel slot instances. |
interfaces/builtin/gpio.go |
Adds system/gadget-aware slot checks. |
interfaces/builtin/gpio_test.go |
Tests system/gadget slot checks. |
interfaces/builtin/gpio_memory_control.go |
Restricts parallel slot instances. |
interfaces/builtin/gpio_control.go |
Restricts parallel slot instances. |
interfaces/builtin/gpio_chardev.go |
Restricts gadget-provided slots. |
interfaces/builtin/gpg_public_keys.go |
Restricts parallel slot instances. |
interfaces/builtin/gpg_keys.go |
Restricts parallel slot instances. |
interfaces/builtin/gconf.go |
Restricts parallel slot instances. |
interfaces/builtin/fwupd.go |
Restricts singleton service slots. |
interfaces/builtin/fuse_support.go |
Restricts parallel slot instances. |
interfaces/builtin/framebuffer.go |
Restricts parallel slot instances. |
interfaces/builtin/fpga.go |
Restricts parallel slot instances. |
interfaces/builtin/firewall_control.go |
Restricts parallel slot instances. |
interfaces/builtin/export_test.go |
Exposes parallel-instance errors to tests. |
interfaces/builtin/dvb.go |
Restricts parallel slot instances. |
interfaces/builtin/dsp.go |
Adds system/gadget-aware slot checks. |
interfaces/builtin/dsp_test.go |
Tests system/gadget slot checks. |
interfaces/builtin/docker.go |
Restricts slots. Nit (1 vote): app-provided slots should use the singleton-service reason, not the system-slot reason. |
interfaces/builtin/display_control.go |
Restricts parallel slot instances. |
interfaces/builtin/devlxd.go |
Restricts parallel slot instances. |
interfaces/builtin/device_buttons.go |
Restricts parallel slot instances. |
interfaces/builtin/desktop.go |
Restricts slots. Nit (1 vote): app-provided slots should use the singleton-service reason, not the system-slot reason. |
interfaces/builtin/desktop_legacy.go |
Restricts parallel slot instances. |
interfaces/builtin/desktop_launch.go |
Restricts parallel slot instances. |
interfaces/builtin/dcdbas_control.go |
Restricts parallel slot instances. |
interfaces/builtin/daemon_notify.go |
Restricts parallel slot instances. |
interfaces/builtin/custom_device.go |
Restricts gadget-provided slots. |
interfaces/builtin/cpu_control.go |
Restricts parallel slot instances. |
interfaces/builtin/contacts_service.go |
Restricts parallel slot instances. |
interfaces/builtin/confdb.go |
Restricts parallel slot instances. |
interfaces/builtin/common.go |
Adds shared errors and slot classification logic. |
interfaces/builtin/common_test.go |
Tests system/gadget error selection. |
interfaces/builtin/cifs_mount.go |
Restricts parallel slot instances. |
interfaces/builtin/can_bus.go |
Restricts parallel slot instances. |
interfaces/builtin/camera.go |
Restricts parallel slot instances. |
interfaces/builtin/calendar_service.go |
Restricts parallel slot instances. |
interfaces/builtin/browser_support.go |
Restricts parallel slot instances. |
interfaces/builtin/broadcom_asic_control.go |
Restricts parallel slot instances. |
interfaces/builtin/bool_file.go |
Adds system/gadget-aware slot checks. |
interfaces/builtin/bool_file_test.go |
Tests system/gadget slot checks. |
interfaces/builtin/bluez.go |
Restricts singleton service slots. |
interfaces/builtin/bluetooth_control.go |
Restricts parallel slot instances. |
interfaces/builtin/block_devices.go |
Restricts parallel slot instances. |
interfaces/builtin/avahi_observe.go |
Restricts singleton service slots. |
interfaces/builtin/avahi_control.go |
Restricts singleton service slots. |
interfaces/builtin/autopilot.go |
Restricts parallel slot instances. |
interfaces/builtin/audio_playback.go |
Restricts singleton service slots. |
interfaces/builtin/appstream_metadata.go |
Restricts parallel slot instances. |
interfaces/builtin/alsa.go |
Restricts parallel slot instances. |
interfaces/builtin/allegro_vcu.go |
Restricts parallel slot instances. |
interfaces/builtin/all_test.go |
Covers the expanded slot restriction set. |
interfaces/builtin/accounts_service.go |
Restricts parallel slot instances. |
interfaces/builtin/account_control.go |
Restricts parallel slot instances. |
interfaces/builtin/accel.go |
Restricts parallel slot instances. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thu Sep 24 17:28:53 UTC 2026 Test Predictor AnalysisPreparing
Executing
Restoring
Skipped tests from snapd-testing-skipIf you wish to have any of the below tests run in your PR, in your PR description, add 'unskip:' followed by a copy-and-pasted list of the below tests you wish to run (unskip plus test list must be valid yaml)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #17704 +/- ##
==========================================
- Coverage 80.73% 78.41% -2.32%
==========================================
Files 1414 1416 +2
Lines 199948 200743 +795
Branches 2502 2503 +1
==========================================
- Hits 161433 157421 -4012
+ Misses 33937 33902 -35
- Partials 4578 9420 +4842
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4fb2ae2 to
75d4c04
Compare
75d4c04 to
1c56a8b
Compare
Builds on #17666. Only the last commit is new here.
See the previously prepared list of interfaces that do not support parallel instances. This change flags some of those interfaces with appropriate error msg that will be included in the user shown error when trying to parallel install such a snap.
Notes
lxdinterface can be allowed slot side parallel instances too after i/builtin: lxd interface allows access to the connected lxd parallel instance #17708 is fixed [ the list marked it unsupported on slot side ]gpio-memory-control: similar concerns as shared-memory non-private modeio-ports-control: concurrent/conflicting I/O privilege level changes and interrupt disabling from two instances could lead to a system-crash?SNAPDENG-37498