1# Service Management 2 3## Overview 4 5Applications must use service manager daemon to configure services like 6phosphor-ipmi-net, bmcweb, obmc-console etc in the system, instead of directly 7controlling the same using 'systemd' or 'iptables'. This way client 8applications doesn't need to change to configure services, when the 9implementations differ. The list of services supported are: 10 11- "bmcweb" 12- "obmc-console"` 13- "phosphor-ipmi-kcs" 14- "phosphor-ipmi-net" 15- "start-ipkvm" 16 17## Implementation Details 18 19Service manager daemon will create D-Bus objects for configurable services 20in the system under the object path `/xyz/openbmc_project/control/service`. For 21each instance of the service there will be a D-Bus object 22`/xyz/openbmc_project/control/service/<service-name>`. 23For example, if there are two instances of `phosphor-ipmi-net` then there 24will be two D-Bus objects 25`/xyz/openbmc_project/control/service/phosphor_2dipmi_2dnet_40eth0` 26and `/xyz/openbmc_project/control/service/phosphor_2dipmi_2dnet_40eth1`. 27The D-Bus object manages both the associated service and socket unit files. 28The D-Bus object implements the interface 29`xyz.openbmc_project.Control.Service.Attributes`. Network services like bmcweb, 30phosphor-ipmi-net also implements the 31`xyz.openbmc_project.Control.Service.SocketAttributes` interface. 32 33In order to update the property value of a service, `override.conf` file under 34`/etc/systemd/system/<Service unit name>/` is updated and the unit is restarted 35through `org.freedesktop.systemd1`. 36 37### xyz.openbmc_project.Control.Service.Attributes interface 38 39#### properties 40 41- Enabled - indicates whether the service is enabled or disabled, `true` 42 indicates the service will be started on the next boot and `false` indicates 43 that service will not be started on the next boot. This property can be used 44 to change the service behaviour on the next boot, `true` to start the service 45 on the next boot and `false` to not start the service on the next boot. Even 46 if the service is disabled, on the next boot it can be started if there are 47 other service dependencies to satisfy. The service cannot be enabled if the 48 service is masked. 49 50- Masked - indicates whether the service is masked, `true` indicates the 51 service is permanently disabled and `false` indicates the service 52 is enabled. If the property is set to `true`, then the service is 53 permanently disabled and the service is stopped. If the property 54 is set to `false` then the service is enabled and starts running. 55 56- Running - indicates the current state of the service, `true` if the service 57 is running and `false` if the service is not running. This property 58 can be used to change the running state of the service, to start the 59 service set to `true` and to stop the service set to `false`. The 60 service cannot be started if the service is Masked. 61 62### xyz.openbmc_project.Control.Service.SocketAttributes interface 63 64#### properties 65 66- Port - Port number to which the service is configured to listen, if 67 applicable for service. Services like obmc-console will not 68 implement this interface. 69 70## Usage 71 72To permanently disable a service the `Masked` property under the interface 73`xyz.openbmc_project.Control.Service.Attributes` needs to be set to `true` and 74vice versa to enable a service. 75 76RMCP+ port number can be modified from the default port number 623 to a custom 77one by updating the `Port` property value under the interface 78`xyz.openbmc_project.Control.Service.SocketAttributes`. 79