With services like this:
$ snap services
Service Startup Current Notes
edgexfoundry.consul enabled active -
edgexfoundry.core-command enabled active -
edgexfoundry.core-config-seed enabled inactive -
edgexfoundry.core-data enabled inactive -
edgexfoundry.core-metadata enabled inactive -
edgexfoundry.device-virtual disabled inactive -
edgexfoundry.export-client disabled inactive -
edgexfoundry.export-distro disabled inactive -
edgexfoundry.mongo-worker enabled inactive -
edgexfoundry.mongod enabled active -
edgexfoundry.security-services enabled active -
edgexfoundry.support-logging disabled inactive -
edgexfoundry.support-notifications disabled inactive -
edgexfoundry.support-rulesengine disabled inactive -
edgexfoundry.support-scheduler disabled inactive -
edgexfoundry.sys-mgmt-agent enabled active -
Running `snap restart` will start all the services, including those that are disabled. See:
$ sudo snap restart edgexfoundry
Restarted.
$ snap services
Service Startup Current Notes
edgexfoundry.consul enabled active -
edgexfoundry.core-command enabled active -
edgexfoundry.core-config-seed enabled active -
edgexfoundry.core-data enabled active -
edgexfoundry.core-metadata enabled active -
edgexfoundry.device-virtual disabled active -
edgexfoundry.export-client disabled active -
edgexfoundry.export-distro disabled active -
edgexfoundry.mongo-worker enabled inactive -
edgexfoundry.mongod enabled active -
edgexfoundry.security-services enabled active -
edgexfoundry.support-logging disabled active -
edgexfoundry.support-notifications disabled active -
edgexfoundry.support-rulesengine disabled active -
edgexfoundry.support-scheduler disabled active -
edgexfoundry.sys-mgmt-agent enabled active -
This is documented like that:
By default, all services for a specified snap will be restarted:
$ sudo snap restart lxd
Restarted.
it says all, no conditionals. I understand it might be undesired. OTOH what should snap stop <snap> do, stop everything or ignore the disabled services that were set to manually running? snap start <snap>?
(DWIM behavior can be confusing in its own ways.)
This needs a bit more thinking.