History log of /openbmc/service-config-manager/src/ (Results 1 – 25 of 31)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
b5aabea411-Nov-2024 Jayanth Othayoth <ojayanth@gmail.com>

boost version 1.86 support

Added fix for boost::asio::spawn overload issue reported similar
to chriskohlhoff/asio#1524, during boost 1.86 migration build.

Proposed fix is to use default completion

boost version 1.86 support

Added fix for boost::asio::spawn overload issue reported similar
to chriskohlhoff/asio#1524, during boost 1.86 migration build.

Proposed fix is to use default completion token.

Tested: verified build

Change-Id: I469a0c6eb8faac68d6b8ba4c4d3ef86838270eff
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

de87972616-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I9ff64598516b419af832abda0fce295f722f6969
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

23ecbb6c17-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I1312ecaf815d2967f2ac52df0965303455490e25
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...

d8effd6320-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I89ad2c8e776db7ad76d256853ebf83fc5f8fbb35
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

dfc7270a10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I85b6e82cdf14da2fb4fa197abed9a6820c0f1e71
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

ba287d8a01-Mar-2023 Ed Tanous <edtanous@google.com>

Change io_service to io_context

This was renamed a while back in boost to be compliant with the
std::executors proposal.

Change-Id: Ie95657cdff79b725d189ee0b36de72813248b52e
Signed-off-by: Ed Tanou

Change io_service to io_context

This was renamed a while back in boost to be compliant with the
std::executors proposal.

Change-Id: Ie95657cdff79b725d189ee0b36de72813248b52e
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

2ff3728d22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0f252203148d6202f2b161c1c36baef0e1e49f0f

show more ...

4b8637db01-Apr-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Encode object path with sdbusplus

Currently the object path of service-config-manager are encoded by
simply replacing characters, which only support a limited number of
characters (only - and @). Th

Encode object path with sdbusplus

Currently the object path of service-config-manager are encoded by
simply replacing characters, which only support a limited number of
characters (only - and @). This patch uses sdbusplus to encode the
object paths to support more charaters and make it more general for
other applications to use.

Tested:
Object paths of service-config-manager are now in the sdbusplus format
like below:
/xyz/openbmc_project/control/service/_70hosphor_2dipmi_2dnet_40eth0
/xyz/openbmc_project/control/service/bmcweb

Change-Id: Ia2738d555a8ba921f6ac2eb4753ba319f489dc4f
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...

430d7ea501-Apr-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Use unit name to distinguish USB code update service

In incoming patch, the object path of services will be encoded by
sdbusplus, using object path to distinguish the dummy USB code update
service i

Use unit name to distinguish USB code update service

In incoming patch, the object path of services will be encoded by
sdbusplus, using object path to distinguish the dummy USB code update
service is no longer suitable. This patch uses the unit name instead.

Tested:
Verified modifying the property of USB code update service will use
these special handlers as before. Other services are not affected.

Change-Id: I9d14ae57ca3f5a68744011e18e3ae45905edcacf
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...

f27f431f02-Apr-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Switch remaining logs to lg2

Since cb267c8 ("logging: switch to lg2"), service-config-manager has
switched to using lg2 for logging, but there are still some old-style
phosphor::logging::log calls.

Switch remaining logs to lg2

Since cb267c8 ("logging: switch to lg2"), service-config-manager has
switched to using lg2 for logging, but there are still some old-style
phosphor::logging::log calls. Change them to lg2.

Tested:
Build pass.

Change-Id: I2702e3d57b8f4b9e411c8f20f3f33329e70c8b23
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...

ef5ceced09-Dec-2021 Jiaqing Zhao <jiaqing.zhao@intel.com>

Add obmc-console-ssh (SOL over SSH) support

This patch adds obmc-console-ssh service support. Like dropbear, it is
also a socket-activated service.

Tested:
1. Changing obmc-console-ssh service stat

Add obmc-console-ssh (SOL over SSH) support

This patch adds obmc-console-ssh service support. Like dropbear, it is
also a socket-activated service.

Tested:
1. Changing obmc-console-ssh service status and its port number works.
2. When disabling obmc-console-ssh, all active SOL SSH connections will
be terminated in a few seconds.
3. All operations on obmc-console-ssh service will not affect dropbear
service, and vice versa.

Change-Id: Ibf56967236a08cb34535c175e0dc5eea7fc4c84c
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...

f476683c28-Feb-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Improve socket-activated service handling

This patch provides a more generic way of handling socket-activated
services like dropbear. A socket-activated service only has base socket
unit and spawns

Improve socket-activated service handling

This patch provides a more generic way of handling socket-activated
services like dropbear. A socket-activated service only has base socket
unit and spawns service unit with instance name on incoming connection,
so the instanced units of it need to be ignored. And whether a service
is socket-activated can be determined by checking the existance of its
service object path.

Tested:
* Two socket-activated service, dropbear and obmc-console-ssh, can be
controlled as expected.
* Instances of socket-activated services are no loger added to monitor
list.

Change-Id: If8faa2248e5794a410f804125410608aa69b858d
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...

d2a99a4d25-Feb-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Ignore non-existent units

In systemd, if a non-existent unit is referenced by other unit, it will
be listed in ListUnits response. This commit ignores these non-existent
entries to prevent performin

Ignore non-existent units

In systemd, if a non-existent unit is referenced by other unit, it will
be listed in ListUnits response. This commit ignores these non-existent
entries to prevent performing operations on them.

Tested:
In dropbear.socket, there is a Conflicts=dropbear.service which creates
a non-existent service entry. With this commit, it will not be added to
the service object path in /etc/srvcfg-mgr.json.

Change-Id: I2ce360ea3a0b10f527672d1601ae4d6234c1a9aa
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...

aa41e67414-Dec-2021 Jiaqing Zhao <jiaqing.zhao@intel.com>

Support reading socket-only systemd unit info

Current code will only read unit info like unit name and instance name
from service unit. For socket-only unit, these fields are blank. This
patch adds

Support reading socket-only systemd unit info

Current code will only read unit info like unit name and instance name
from service unit. For socket-only unit, these fields are blank. This
patch adds support to read these fields from socket units.

Tested:
1. Existing entries in generated srvcfg-mgr.json is the same as before
2. Unit and instance name of socket-only units can be successfully read

Change-Id: Ibb4d75231f1767f2164d95294e126dd649d466f0
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...

25a0f63411-Nov-2021 Chicago Duan <duanzhijia01@inspur.com>

ADD USB Code Update enable/disable

phosphor_usb_code_update is an application that use USB to do FW
update. phosphor_usb_code_update service is not a daemon, but an app
that will be called after ins

ADD USB Code Update enable/disable

phosphor_usb_code_update is an application that use USB to do FW
update. phosphor_usb_code_update service is not a daemon, but an app
that will be called after inserting a USB flash disk.

This commit creates an object of phosphor_usb_code_update when
phosphor_usb_code_update is not started. We can enable/disable
phosphor_usb_code_update by setting the "Enabled" property to
true/false.

Please configure the “usb-code-update” option in your bb/bbappend to
enable this feature.

For phosphor_usb_code_update, useful rules files is
/lib/udev/rules.d/70-bmc-usb.rules. When usb code update is disabled,
srvcfg_manager creates an empty symlink
/etc/udev/rules.d/70-bmc-usb.rules, which causes
/lib/udev/rules.d/70-bmc-usb.rules inoperative. When usb code update is
enabled, srvcfg_manager deletes /etc/udev/rules.d/70-bmc-usb.rules.

The commits of phosphor_usb_code_update is:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-bmc-code-mgmt/+/48742/1

Test:
get "Enabled" property:
busctl get-property xyz.openbmc_project.Control.Service.Manager
/xyz/openbmc_project/control/service/phosphor_2dusb_2dcode_2dupdate
xyz.openbmc_project.Control.Service.Attributes Enabled
b true

set "Enabled" property to false:
busctl set-property xyz.openbmc_project.Control.Service.Manager
/xyz/openbmc_project/control/service/phosphor_2dusb_2dcode_2dupdate
xyz.openbmc_project.Control.Service.Attributes Enabled b false

busctl get-property xyz.openbmc_project.Control.Service.Manager
/xyz/openbmc_project/control/service/phosphor_2dusb_2dcode_2dupdate
xyz.openbmc_project.Control.Service.Attributes Enabled
b false

The "Enabled" property will be persisted,reboot the BMC, then get the
"Enabled" property:
busctl get-property xyz.openbmc_project.Control.Service.Manager
/xyz/openbmc_project/control/service/phosphor_2dusb_2dcode_2dupdate
xyz.openbmc_project.Control.Service.Attributes Enabled
b false

Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: Iba7ffb541628d563e2c54c3e1c8c4dbe85f1507b

show more ...

f274489305-Jan-2022 George Liu <liuxiwei@inspur.com>

Fix loading json file causing coredump

If the json file is damaged, when the process is running and
deserializing, a coredump will occur and a cereal::RapidJSONException
will be thrown.

Error messa

Fix loading json file causing coredump

If the json file is damaged, when the process is running and
deserializing, a coredump will occur and a cereal::RapidJSONException
will be thrown.

Error message:
```
terminate called after throwing an instance of'cereal::RapidJSONException'
what(): rapidjson internal assertion failure: IsObject()
```

Add try-catch to catch the exception, and when the exception occurs,
we need to re-serialize the json file and record the log.

Tested: Use broken json file and restart the process

hosphor-srvcfg-manager[753]: Failed to load json file, need to rewrite,
ERROR = rapidjson internal assertion failure: IsObject(),
file path = /etc/srvcfg-mgr.json

Also, we can seen a bad json file in `/tmp`, like this:
/tmp/srvcfg-mgr.json.bad

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I996e9e32f87c25d584a3b5912334d1a137b55b6c

show more ...

cb267c8f05-Jan-2022 George Liu <liuxiwei@inspur.com>

logging: switch to lg2

After switching to C++20, it is recommended to use `phosphor::lg2`
to format log, and the correct `CODE_LINE` and `CODE_FUNC` values
can be used in log tracking.

Tested: buil

logging: switch to lg2

After switching to C++20, it is recommended to use `phosphor::lg2`
to format log, and the correct `CODE_LINE` and `CODE_FUNC` values
can be used in log tracking.

Tested: built phosphor-srvcfg-manager successfully and Unit Test
passes.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ib676a0d8082b0e3e72b51bd5115bf5b05599e6ec

show more ...

a1fe1a2818-Oct-2021 Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>

Use true instead of 1 for a while loop

Converts the while loop to while (true) from while (1).
This is in the same spirt as using ES.47: Use nullptr
rather than 0 or NULL
https://isocpp.github.io/Cp

Use true instead of 1 for a while loop

Converts the while loop to while (true) from while (1).
This is in the same spirt as using ES.47: Use nullptr
rather than 0 or NULL
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-nullptr

Tested: Built p10bmc before and after change, successful build
and runs on QEMU with no differences.

Signed-off-by: Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>
Change-Id: Ia01a17775f4731536bd6a1d0a09a927d3fc1807d

show more ...

a19b509324-May-2021 George Liu <liuxiwei@inspur.com>

Allow disabling SSH

The intent behind this commit is to add the dropbear service, monitor
the Enabled and Running properties, and then update the
dropbear.socket to allow disabling/enabling SSH.

Te

Allow disabling SSH

The intent behind this commit is to add the dropbear service, monitor
the Enabled and Running properties, and then update the
dropbear.socket to allow disabling/enabling SSH.

Tested:
1.
busctl introspect xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/dropbear
xyz.openbmc_project.Control.Service.Attributes interface
.Enabled property b false emits-change writable
.Masked property b false emits-change writable
.Running property b true emits-change writable

Open a new SSH connection:
sudo ssh username@<IP>
Successfully connected

2.
busctl set-property xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/dropbear xyz.openbmc_project.Control.Service.Attributes Running b false

busctl introspect xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/dropbear
xyz.openbmc_project.Control.Service.Attributes interface
.Enabled property b false emits-change writable
.Masked property b false emits-change writable
.Running property b false emits-change writable

Open a new SSH connection:
sudo ssh username@<IP>
ssh: connect to host <IP> port 22: Connection refused

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I5d004f7f49c25fc90b93dabd124fe0d3d93ca822

show more ...

1f3813f827-Jul-2020 Tom Joseph <tomjoseph@in.ibm.com>

add_manager adds the ObjectManager interface

add_manager adds the interface org.freedesktop.DBus.ObjectManager
in the object path /xyz/openbmc_project/control/service.

srcCfgMgrIntf had / in the in

add_manager adds the ObjectManager interface

add_manager adds the interface org.freedesktop.DBus.ObjectManager
in the object path /xyz/openbmc_project/control/service.

srcCfgMgrIntf had / in the interface name and phosphor-srvcfg-manager
terminates with "Invalid path or interface"

Tested:

1) Verified phosphor-srvcfg-manager is not terminating
2) Verified org.freedesktop.DBus.ObjectManager interface is implemented
by /xyz/openbmc_project/control/service.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I3f0286b4bc36929b15e6e915200d381034bf8663

show more ...

ba2c083e15-Jul-2020 Vernon Mauery <vernon.mauery@linux.intel.com>

Change files to use standard unix file endings

CRLF line endings are non-standard for this project. Change them to use
the standard unix LF ending.

Tested: `git show -w` shows no difference

Change

Change files to use standard unix file endings

CRLF line endings are non-standard for this project. Change them to use
the standard unix LF ending.

Tested: `git show -w` shows no difference

Change-Id: I353adcd2054c48a040b4e3a09bc46913cb6422fa
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...

130b6bbb15-Jul-2020 Vernon Mauery <vernon.mauery@linux.intel.com>

Use a valid D-Bus interface name

D-Bus interfaces require a dotted name with at least two parts, with the
recommended name reverse FQDN style. Without this change, the service
config manager was con

Use a valid D-Bus interface name

D-Bus interfaces require a dotted name with at least two parts, with the
recommended name reverse FQDN style. Without this change, the service
config manager was constantly aborting because of the invalid name (with
the latest sdbusplus changes)

Tested: The service config manager is back up and running and can
interact with other entities on the bus.

Change-Id: I4d3683548d61c71f7a56b86d65b7e48a50f91e4d
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...

1a885d9810-Jul-2020 Tom Joseph <tomjoseph@in.ibm.com>

Remove adding an empty interface

```
terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
what(): sd_bus_add_object_vtable: org.freedesktop.DBus.Error.InvalidArgs:
Inva

Remove adding an empty interface

```
terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
what(): sd_bus_add_object_vtable: org.freedesktop.DBus.Error.InvalidArgs:
Invalid argument
```
phosphor-srvcfg-manager is throwing the above exception and coredumping.
Adding an empty interface will throw an exception after the below change in
sdbusplus.

https://github.com/openbmc/sdbusplus/commit/017a19da5f67a74daedf4d63111569902d4764e6
https://github.com/openbmc/sdbusplus/commit/fb0366b5c15d196c62498b8c3c35c5231c372262

Tested:

1) Patched witherspoon-tacoma and phosphor-srvcfg-manager did not coredump.
2) ObjectManager interface is implemented by /xyz/openbmc_project/control/service.
3) Disabled and enabled net-ipmi successfully.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I5e66f0244c07345b5caea5f94578bf0592b4a91a

show more ...

83241c0930-May-2020 Tom Joseph <tomjoseph@in.ibm.com>

Add support for SocketAttributes interface

Tested:

1) Network services bmcweb and phosphor-ipmi-net implement the interface
xyz.openbmc_project.Control.Service.SocketAttributes and property Port

Add support for SocketAttributes interface

Tested:

1) Network services bmcweb and phosphor-ipmi-net implement the interface
xyz.openbmc_project.Control.Service.SocketAttributes and property Port
is populated correctly.
2) Verified services like VUART does not implement the SocketAttributes interface.
3) Modified the Port of phosphor-ipmi-net and verified.
3a) Network IPMI works on the new port.
3b) The new port is reflected when quering the IPMI protocol details via Redfish.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I4511ce9e5426d99895f8074617cdb41d6085fd13

show more ...

82e9557e07-May-2020 Tom Joseph <tomjoseph@in.ibm.com>

Add support for building with meson

Follow the OpenBMC herd and support a modern, comprehensible build framework.

To build with meson:
meson build
ninja -C build

The OpenBMC CI scripts look

Add support for building with meson

Follow the OpenBMC herd and support a modern, comprehensible build framework.

To build with meson:
meson build
ninja -C build

The OpenBMC CI scripts look for meson.build before looking for CMakelists so
approval of this patch would change the build system during CI to meson.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I23d023d8db8048579926231841f497366ab3d516

show more ...

12