15b63e12 | 16-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: I07372e75f12f406bd0555dd27e249bc7dd0958d4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
d4554f2a | 17-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: I153217f4ae8454e3546a59da9fcfe3f83fd04b39 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
3cf9e806 | 30-Apr-2024 |
John Wedig <johnwedig@google.com> |
Add retries when getting dbus properties
We have found that the dbus requests to Entity Manager sometimes time out at startup, when getting the dbus properties from the Entity Manager config object.
Add retries when getting dbus properties
We have found that the dbus requests to Entity Manager sometimes time out at startup, when getting the dbus properties from the Entity Manager config object. This commit adds retries, similar to how dbus-sensors will retry these requests, if needed.
Tested: Observed the dbus request to Entity Manager get retried on a machine, and then it succeeded on the second attempt.
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I924703e9be0879489477cc31644ef280429c347b
show more ...
|
c0d66eb7 | 26-Feb-2024 |
John Wedig <johnwedig@google.com> |
Populate Protocol property in Item.Drive interface
By populating this property, bmcweb can populate the "Protocol" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eS
Populate Protocol property in Item.Drive interface
By populating this property, bmcweb can populate the "Protocol" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Protocol s "xyz.openbmc_project.Inventory.Item.Drive.DriveProtocol.eMMC"
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I2bd19190c445ce57f3d867ffbb437c1a4a370b51
show more ...
|
d7be42bd | 19-Jan-2024 |
John Wedig <johnwedig@google.com> |
Populate the Type property in Item.Drive interface
By populating this property, bmcweb can populate the "MediaType" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.e
Populate the Type property in Item.Drive interface
By populating this property, bmcweb can populate the "MediaType" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Type s "xyz.openbmc_project.Inventory.Item.Drive.DriveType.SSD"
$ curl http://localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0 { ... "MediaType": "SSD", ... }
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I2cb6c7d3ec3b49e8d666da940d873f1117a0aa85
show more ...
|
043af59f | 23-Nov-2023 |
Tom Tung <shes050117@gmail.com> |
Get eraseMaxGeometry and eraseMinGeometry from dbus
Also, make findDevice return output parameters based on RVO.
With the change like in EntityManager JSON: ``` { "Name": "example_emmc", "T
Get eraseMaxGeometry and eraseMinGeometry from dbus
Also, make findDevice return output parameters based on RVO.
With the change like in EntityManager JSON: ``` { "Name": "example_emmc", "Type": "EmmcDevice", "LocationCode": "location" "EraseMaxGeometry": 10000000000, "EraseMinGeometry": 5000000000, } ``` and geometry values will be set to estoraged.
Tested: - unit test pass: ``` 5/7 util_test OK 0.05s ```
Change-Id: Ia8499af2168c7e740558978273fc80456eb29282 Signed-off-by: Tom Tung <shes050117@gmail.com>
show more ...
|
19825057 | 26-May-2023 |
Rahul Kapoor <rahulkpr@google.com> |
Add support for LocationCode
LocationCode is needed to populate ServiceLabel by BMCWeb for Redfish resource associated with eStorage. LocationCode is derived from config object exported by Entity Ma
Add support for LocationCode
LocationCode is needed to populate ServiceLabel by BMCWeb for Redfish resource associated with eStorage. LocationCode is derived from config object exported by Entity Manager in the the following interface: "xyz.openbmc_project.Configuration.EmmcDevice
To surface LocationCode, the "Exposes" entry in board's Entity Manager config can add "LocationCode" property as follows: { "Name": "example_emmc", "Type": "EmmcDevice", "LocationCode": "U1000" }
Here the LocationCode is the silk screen label.
Tested:
busctl introspect xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Decorator.LocationCode
NAME TYPE SIGNATURE RESULT/VALUE FLAGS .LocationCode property s "U1000" emits-change
wget -qO- localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0 { "@odata.id": "/redfish/v1/Chassis/DCSCM/Drives/mmcblk0", "@odata.type": "#Drive.v1_7_0.Drive", "Id": "mmcblk0", "Links": { "Chassis": { "@odata.id": "/redfish/v1/Chassis/DCSCM" } }, "Name": "mmcblk0", "PhysicalLocation": { "PartLocation": { "LocationType": "Embedded", "ServiceLabel": "U1000" }, "PartLocationContext": "DC_SCM" }, "PredictedMediaLifeLeftPercent": 100, "Status": { "State": "Enabled" } }
Change-Id: Ibf53ede5ee65787f9cef53d4bad4cb8fccba3606 Signed-off-by: Rahul Kapoor <rahulkpr@google.com>
show more ...
|
04c28fad | 10-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: Ia968a74764d3bda33160a8a9890629ed3cc94d0e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
2443a021 | 17-Mar-2023 |
John Wedig <johnwedig@google.com> |
Improve accuracy of 'Locked' property
The 'Locked' property in the volume interface is supposed to indicate whether the LUKS volume is currently activated, but this property is often inaccurate beca
Improve accuracy of 'Locked' property
The 'Locked' property in the volume interface is supposed to indicate whether the LUKS volume is currently activated, but this property is often inaccurate because it always defaults to false upon startup (i.e. unlocked). However, the LUKS volume is usually locked at startup. So, client daemons can get confused when looking at the Locked property.
This commit reworks the functionality for the 'Locked' property, so that it checks whether the mapped virtual crypt device exists, e.g. whether /dev/mapper/<luks_device> exists. This way, the Locked property should better reflect the actual state.
The one caveat to keep in mind is that 'Locked' will be True even if the device isn't formatted as a LUKS volume. If client daemons need to know whether it's already formatted, we may want to add another property to the Volume interface for that purpose. But in the meantime, eStoraged already exports an EncryptionStatus property as part of the Drive interface. So, the information is already available, if needed.
Tested: Checked 'Locked' property at startup $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true Formatted the LUKS volume, then checked 'Locked' property again $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b false Restarted eStoraged and checked 'Locked' again. $ systemctl restart xyz.openbmc_project.eStoraged $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b false Locked the LUKS volume, and checked 'Locked' again. $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true Restarted eStoraged, and checked 'Locked' again. $ systemctl restart xyz.openbmc_project.eStoraged $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I5cd6bac4b4426c0e2579c3fc8cf7a27b4f2ccc08
show more ...
|
61cf4260 | 17-Mar-2023 |
John Wedig <johnwedig@google.com> |
Fix build warnings
This commit fixes some build warnings in CI caused by unused variables and an invalid move assignment operator, since a member variable is of reference type.
Signed-off-by: John
Fix build warnings
This commit fixes some build warnings in CI caused by unused variables and an invalid move assignment operator, since a member variable is of reference type.
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I2b813ef017e47f2d35666063435a52638b74d156
show more ...
|
8d5a3a07 | 29-Sep-2022 |
John Wedig <johnwedig@google.com> |
Implement the changePassword method
With this commit, it is now possible to change the password for the LUKS-encrypted volume, using the changePassword D-Bus method for eStoraged.
Tested: $ busctl
Implement the changePassword method
With this commit, it is now possible to change the password for the LUKS-encrypted volume, using the changePassword D-Bus method for eStoraged.
Tested: $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume ChangePassword \ ayay 3 1 2 3 3 4 5 6 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock Attempted to unlock using the old password. It failed as expected. $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3 Unlocked with the new password $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 4 5 6
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: If1395fb04f51b1fb1a3d26731422d21476205207
show more ...
|
b4838308 | 22-Jul-2022 |
John Wedig <johnwedig@google.com> |
Export the part number and serial number
This commit exposes the eMMC's part name and serial number over the appropriate D-Bus interface, so that it can be exposed over Redfish in bmcweb.
Tested: $
Export the part number and serial number
This commit exposes the eMMC's part name and serial number over the appropriate D-Bus interface, so that it can be exposed over Redfish in bmcweb.
Tested: $ busctl introspect xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 ... xyz.openbmc_project.Inventory.Decorator.Asset interface - - - .PartNumber property s "ABCDEF" emits-change .SerialNumber property s "123456abcd" emits-change ... $ wget -qO- http://localhost:80/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0 { "@odata.id": "/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0", "@odata.type": "#Drive.v1_7_0.Drive", "CapacityBytes": 15634268160, "Id": "mmcblk0", "Links": { "Chassis": { "@odata.id": "/redfish/v1/Chassis/DC_SCM" } }, "Name": "Name", "PartNumber": "ABCDEF", "PhysicalLocation": { "PartLocation": { "LocationType": "Embedded" } }, "SerialNumber": "123456abcd", "Status": { "State": "Enabled" } }
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I1d17f08b99907620b5f2c73fdaeacc84950ce64e
show more ...
|
49796415 | 22-Jun-2022 |
John Edward Broadbent <jebr@google.com> |
Update location interface
Before LocationCode was being set, but the bmcweb code used LocationType. This change makes eStorageD use LocationType, and not LocationCode.
Tested:
$ busctl introspect
Update location interface
Before LocationCode was being set, but the bmcweb code used LocationType. This change makes eStorageD use LocationType, and not LocationCode.
Tested:
$ busctl introspect xyz.openbmc_project.eStoraged /xyz/openbmc_project/inventory/storage/mmcblk0 NAME TYPE ... xyz.openbmc_project.Inventory.Connector.Embedded interface ...
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I3e077559fa00cccd8e0d4580fafadf4a2cdb40fd
show more ...
|
6771c691 | 22-Jun-2022 |
John Edward Broadbent <jebr@google.com> |
Update initial values for new CI
Tested: code builds, and passes unit test
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: Ib9080fc5b1aa1353a985f700d65e7a9694c07634 |
740e94bd | 10-Jun-2022 |
John Edward Broadbent <jebr@google.com> |
Add location interface
Tested: $busctl introspect xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 ... xyz.openbmc_project.Inventory.Decorator.LocationCode interface .
Add location interface
Tested: $busctl introspect xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 ... xyz.openbmc_project.Inventory.Decorator.LocationCode interface .LocationCode property s "Embedded" emits-change ...
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: Ib1c2177541de193c5930238958201ad26b38e7d2
show more ...
|
91c1ec1b | 20-May-2022 |
John Edward Broadbent <jebr@google.com> |
Add DriveEncryptionState property
Tested: Verify the property is as expected (Encrypted). Then wipe the disk, and re-check the value to verify it is as expected (unknown).
$ busctl get-property xyz
Add DriveEncryptionState property
Tested: Verify the property is as expected (Encrypted). Then wipe the disk, and re-check the value to verify it is as expected (unknown).
$ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive EncryptionStatus s \ "xyz.openbmc_project.Inventory.Item.Drive.DriveEncryptionState.Encrypted"
$ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VendorSanitize
$ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive EncryptionStatus s \ "xyz.openbmc_project.Inventory.Item.Drive.DriveEncryptionState.Unknown"
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I4abba7a1e7f047c481aaf4938b2b1e2b7d7ec6be
show more ...
|
6c0d8ce1 | 22-Apr-2022 |
John Wedig <johnwedig@google.com> |
Add association between chassis and drive
This commit adds an association between the storage device ("drive") and the associated chassis. Specifically, the new association is the following: ["cha
Add association between chassis and drive
This commit adds an association between the storage device ("drive") and the associated chassis. Specifically, the new association is the following: ["chassis", "drive", <chassis_path>]
This association will be used in bmcweb to add Redfish links between drive and chassis.
Tested: $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Association.Definitions Associations $ busctl get-property xyz.openbmc_project.ObjectMapper \ /xyz/openbmc_project/inventory/system/board/dcscm/drive \ xyz.openbmc_project.Association endpoints $ busctl get-property xyz.openbmc_project.ObjectMapper \ /xyz/openbmc_project/inventory/storage/mmcblk0/chassis \ xyz.openbmc_project.Association endpoints
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: Ie21725e9ceb5134ac94854dcb06f3b86a48eeabd
show more ...
|
d32b9667 | 13-Apr-2022 |
John Wedig <johnwedig@google.com> |
Initial integration with Entity Manager
This commit changes eStoraged so that it doesn't take a specific device as an argument. Instead, it looks for a config object from Entity Manager and creates
Initial integration with Entity Manager
This commit changes eStoraged so that it doesn't take a specific device as an argument. Instead, it looks for a config object from Entity Manager and creates a D-Bus object corresponding to the config object.
The config objects need to expose the following interface: "xyz.openbmc_project.Configuration.EmmcDevice"
To support more types of storage devices in the future, we can introduce a new interface for each one.
In addition, eStoraged currently only supports 1 eMMC device. If we want to support more than one in the future, we will need to add more information to the Entity Manager config, to distinguish between them.
Assuming the eMMC is located on a FRU-detectable board, an "Exposes" entry can be added to that board's Entity Manager config, for example: { "Name": "example_emmc", "Type": "EmmcDevice" }
Doing so will tell Entity Manager to create a config object with the EmmcDevice interface mentioned above. Then, eStoraged will find the config object with that interface and create its own D-Bus object that can be used to manage the eMMC.
Tested: Updated the Entity Manager config (as described above), started eStoraged, then tested most of its methods and properties using busctl. $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3 $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Capacity $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VerifyGeometry $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalOverWrite \ --timeout=1200 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalVerify \ --timeout=1200
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: If137d02e185c366f4a1437076512b4883ba6d595
show more ...
|
b2c86be3 | 15-Apr-2022 |
John Edward Broadbent <jebr@google.com> |
Change ownership of handle to eStorageD object
Clients used to create both the CryptHandle and the eStorageD objects using the same information. Then the client would pass the CryptHandle into eStor
Change ownership of handle to eStorageD object
Clients used to create both the CryptHandle and the eStorageD objects using the same information. Then the client would pass the CryptHandle into eStorageD methods in order to perform crypto methods. This change creates the CryptHandle closer to where it is used. This makes the code simpler and easier to understand.
Tested: busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ > /xyz/openbmc_project/inventory/storage/mmcblk0 \ > xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ > xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ > --timeout=60
Change-Id: I276e97146f4498191eb19512bc244a1e8d9cd2cb Signed-off-by: John Edward Broadbent <jebr@google.com>
show more ...
|
28cc834c | 14-Apr-2022 |
John Edward Broadbent <jebr@google.com> |
Add exception when constructor fails
We should fail as soon as we know the object had failed to init the cryptdevice correctly. There is no logic to compensate this type of failure.
Signed-off-by:
Add exception when constructor fails
We should fail as soon as we know the object had failed to init the cryptdevice correctly. There is no logic to compensate this type of failure.
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I4c4b3719840ef42d8ecf378410ff0788fb040b1a
show more ...
|
2b5454d3 | 14-Apr-2022 |
John Edward Broadbent <jebr@google.com> |
fix error handling for CryptHandle.get
The old code calls CryptHandle once to make sure it is valid, then calls it again to use it.
Tested: busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ > /
fix error handling for CryptHandle.get
The old code calls CryptHandle once to make sure it is valid, then calls it again to use it.
Tested: busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ > /xyz/openbmc_project/inventory/storage/mmcblk0 \ > xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ > xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ > --timeout=60
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I21c02315c365e74ead3d0b5b2578c62503376756
show more ...
|
d6071fc2 | 31-Mar-2022 |
John Edward Broadbent <jebr@google.com> |
Fix Short read/write issue
It was possible for "short" reads and writes to cause the pattern and zero steps to not work correctly. This change adds logic to deal with the short reads.
Tested: unit
Fix Short read/write issue
It was possible for "short" reads and writes to cause the pattern and zero steps to not work correctly. This change adds logic to deal with the short reads.
Tested: unit test and machine test root@bmc# time busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ > /xyz/openbmc_project/inventory/storage/mmcblk0 \ > xyz.openbmc_project.Inventory.Item.Volume Erase s \ > xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.ZeroOverWrite \ > --timeout=1200 real 6m0.815s user 0m0.010s sys 0m0.010s
Change-Id: If8df9bdba159a3bcfa77104a4c17b8d352794db2 Signed-off-by: John Edward Broadbent <jebr@google.com>
show more ...
|
5d799bb9 | 22-Mar-2022 |
John Edward Broadbent <jebr@google.com> |
Add lifetime property for drives interface
This will set the lifetime property when the eStoraged object is created. This change does not expect the lifetime to change.
Tested: busctl introspect x
Add lifetime property for drives interface
This will set the lifetime property when the eStoraged object is created. This change does not expect the lifetime to change.
Tested: busctl introspect xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/inventory/storage/mmcblk0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.Inventory.Item.Drive interface - - - .Capacity property t (top secret) emits-change .PredictedMediaLifeLeftPercent property y 100 emits-change xyz.openbmc_project.Inventory.Item.Volume interface - - - .ChangePassword method ayay - - .Erase method s - - .FormatLuks method ays - - .Lock method - - - .Unlock method ay - -
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: Ifbbed7d81c55e3edbe519c2b1048b5d1731fbb0e
show more ...
|
67a47446 | 05-Apr-2022 |
John Wedig <johnwedig@google.com> |
Switch eStoraged to asio interface
Switching the D-Bus interface to asio makes it easier to integrate with EntityManager. In addition, this switch to asio makes sense since some of the erase operati
Switch eStoraged to asio interface
Switching the D-Bus interface to asio makes it easier to integrate with EntityManager. In addition, this switch to asio makes sense since some of the erase operations take a long time, about 6 minutes.
This commit also removes one of the clang-tidy checks because clang was flagging an error in one of the boost asio files, inside the constructor for sdbusplus::asio::connection.
Tested: Tested most of the methods and properties using busctl. $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3 $ busctl get-property xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked $ busctl get-property xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Capacity $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VerifyGeometry $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalOverWrite \ --timeout=1200 $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalVerify \ --timeout=1200
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I99cb371871bfa68eb0193f614f899221afd9013a
show more ...
|
605085a6 | 05-Nov-2021 |
John Edward Broadbent <jebr@google.com> |
Add erase sanitize
Sanitize uses the eMMC firmware to erase all blocks.
Tested: $ cat /dev/urandom > /dev/mmcblk0
$ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/in
Add erase sanitize
Sanitize uses the eMMC firmware to erase all blocks.
Tested: $ cat /dev/urandom > /dev/mmcblk0
$ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VendorSanitize \ --timeout=1200
real 0m1.793s user 0m0.021s sys 0m0.009s
root@ytbaz20-nfd01:/# cat /dev/mmcblk0 | hexdump
0000000 0000 0000 0000 0000 0000 0000 0000 0000 *
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I31bc21c0b6d31cbba0db752d94a93eb004dbbde6
show more ...
|