#
40e9b92e |
| 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This pa
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This patchset does not intend to modify any intent on any existing copyrights or licenses, only to standardize their inclusion.
[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects
Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
e21126ec |
| 03-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out hostlogger
Similar to what we've done elsewhere, break out hostlogger into its own file.
Tested: Code compiles.
Change-Id: Ib9a48577878f57eb7ed4e3cf6b84a58a3ec203f6 Signed-off-by: Ed Tan
Break out hostlogger
Similar to what we've done elsewhere, break out hostlogger into its own file.
Tested: Code compiles.
Change-Id: Ib9a48577878f57eb7ed4e3cf6b84a58a3ec203f6 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
8d2f868c |
| 03-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out post codes
Similar to other patches, break out the post codes log services into their own file. log_services.hpp is far too large.
Change-Id: I3cb644d52a9d3b5f9a15a2f90c1b69c87491e5c8 Si
Break out post codes
Similar to other patches, break out the post codes log services into their own file. log_services.hpp is far too large.
Change-Id: I3cb644d52a9d3b5f9a15a2f90c1b69c87491e5c8 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
68896206 |
| 21-Aug-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Add a Hypervisor Computer System Option
Today to determine if the hypervisor computer system resource should be added to the System Collection a call to the Settings Manager is made.
Based on discu
Add a Hypervisor Computer System Option
Today to determine if the hypervisor computer system resource should be added to the System Collection a call to the Settings Manager is made.
Based on discussion in https://gerrit.openbmc.org/c/openbmc/bmcweb/+/73203 and to help the multihost stuff move forward, lets move this hypervisor under a meson option which any company that needs can enable. I think IBM is the only one who uses this so the risk of breaking someone should be small.
One day hope to converge at some point, this probably doesn't happen until after the multihost stuff goes in.
This is also better for implementations that don't have this backend because now routes like /redfish/v1/Systems/hypervisor/EthernetInterfaces/ aren't put out. I.e. a call to /redfish/v1/Systems/hypervisor/EthernetInterfaces/ is now going to return 404 instead of 500 on systems without this backend support.
Tested: Enabled this and see the hypervisor system. Without this enabled do not see the hypervisor system. No new validator errors either way.
Change-Id: Ie05e6644dd6f640cf8225f96becb99b9c2d0de20 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
a782e265 |
| 12-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
event logs: move route requests
The alternative routes declared depending on BMCWEB_REDFISH_DBUS_LOG can be closer together. This makes the route declarations more readable.
Tested: no, simple code
event logs: move route requests
The alternative routes declared depending on BMCWEB_REDFISH_DBUS_LOG can be closer together. This makes the route declarations more readable.
Tested: no, simple code move
Change-Id: Ia296a3391cc8476b4fa4a1198a7005aab000b4fa Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
#
d5c0172e |
| 16-Jun-2024 |
Ed Tanous <etanous@nvidia.com> |
Add back odata support
/redfish/v1/odata/index.json was inadvertently moved to be not installed in a529a6aa44e04ae5845d1324f3e8c887ebd47f7b
This file is basically unused, and even this author doesn
Add back odata support
/redfish/v1/odata/index.json was inadvertently moved to be not installed in a529a6aa44e04ae5845d1324f3e8c887ebd47f7b
This file is basically unused, and even this author doesn't understand what it's used for, but it is technically required in the spec, so add it back using a runtime derived handler.
Tested: Get /redfish/v1/odata returns the appropriate struct.
Change-Id: I548abbdd9f0b1eb28299165202626feede41e363 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
84177a2f |
| 17-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Break journal logging into methods
Like we've done other places, make log services journal follow the naming convention, and break down lambdas into actual methods.
This is a refactor not intended
Break journal logging into methods
Like we've done other places, make log services journal follow the naming convention, and break down lambdas into actual methods.
This is a refactor not intended to make any functional changes.
Tested: Redfish service validator passes. Journal works as before.
Change-Id: Ibbc7a13fba9c63606f7fd9c741af3b296633b664 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
b0983db2 |
| 17-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out Journal log into its own file
log_services.hpp probably shouldn't have been allowed to get as large as it has. This commit starts by breaking out functions from log_services.hpp, and move
Break out Journal log into its own file
log_services.hpp probably shouldn't have been allowed to get as large as it has. This commit starts by breaking out functions from log_services.hpp, and moves them to manager_logservices_journal.hpp. Code is moved as-is with no functional changes.
Tested: Journal GET works as before. Redfish service validator passes.
Change-Id: I93c372ae3e39967e1b0eaf0cf496f84ac4114b5c Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
090ab8e1 |
| 18-May-2024 |
Ed Tanous <ed@tanous.net> |
Generate metadata at runtime
In the initial implementation of metadata indexing the bmc knew at compile time what schemas it could potentially publish. bmcweb took the approach of adding all schema
Generate metadata at runtime
In the initial implementation of metadata indexing the bmc knew at compile time what schemas it could potentially publish. bmcweb took the approach of adding all schemas of all versions to the $metadata resource. Since that was made, two major changes have happened. First, Redfish has added significantly more versions of each schema, as well as significantly more schemas to the point where the metadata index is now 213KB. While this file compresses fairly well, the size is obvious from the large amount of time that redfish service validator takes to parse the schemas, compared to actually acquiring BMC redfish resources. Second, aggregation was added, where an aggregated Redfish service might implement any number of schemas, including OEM ones.
In an effort to fix this, this patch takes the compile-time algorithm in update_schemas.py, and moves it into bmcweb itself, parsing the files on disk as needed on demand. This has some immediate benefits; First, is that now schemas can be potentially installed from anywhere, not only from within the bmcweb build, and they will be resolved at runtime.
Second, patches that want to add support for a given schema need to only symlink the schema into the correct folder, without needing to rerun update_schemas.py. This saves time in review.
Finally, this opens to door to reducing the schema versions present in the metadata to the unique set of only what this bmcweb instance, and its aggregated BMCs expose.
Tested: Redfish service validator passes. Need A/B checking to verify the file is byte for byte the same. GET /redfish/v1/$metadata returns what looks like sane results, with a correct content-type. Unit tests require the use of TemporaryFileHandle, so that class is moved into a more general folder, outside of test/http.
Change-Id: I326159099c6b6c4056023b2e173c5f074ed88ce1 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
36a59eaf |
| 01-May-2024 |
Ed Tanous <ed@tanous.net> |
Fix regression in LogService
25b54db introduced an inadvertent inversion in options. Admittedly, this option (redfish-dbus-entries) chose to override URLs instead of creating new ones, which makes
Fix regression in LogService
25b54db introduced an inadvertent inversion in options. Admittedly, this option (redfish-dbus-entries) chose to override URLs instead of creating new ones, which makes it incompatible. Normally we'd require unique URIs for each entry to make this error not possible, and I believe that this is the only instance of us registering two handlers for one url/verb.
Tested: Romulus now boots and functions in qemu. GET /redfish/v1 returns results.
Change-Id: I6125a5a0242b6cfc54ff19866665227c97f45d0a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
25b54dba |
| 17-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options usi
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options using a config file. This history has led to a lot of different ways to configure code in the codebase itself, which has led to problems, and issues in consistency.
ifdef options do no compile time checking of code not within the branch. This is good when you have optional dependencies, but not great when you're trying to ensure both options compile.
This commit moves all internal configuration options to: 1. A namespace called bmcweb 2. A naming scheme matching the meson option. hyphens are replaced with underscores, and the option is uppercased. This consistent transform allows matching up option keys with their code counterparts, without naming changes. 3. All options are bool true = enabled, and any options with _ENABLED or _DISABLED postfixes have those postfixes removed. (note, there are still some options with disable in the name, those are left as-is) 4. All options are now constexpr booleans, without an explicit compare.
To accomplish this, unfortunately an option list in config/meson.build is required, given that meson doesn't provide a way to dump all options, as is a manual entry in bmcweb_config.h.in, in addition to the meson_options. This obsoletes the map in the main meson.build, which helps some of the complexity.
Now that we've done this, we have some rules that will be documented. 1. Runtime behavior changes should be added as a constexpr bool to bmcweb_config.h 2. Options that require optionally pulling in a dependency shall use an ifdef, defined in the primary meson.build. (note, there are no options that currently meet this class, but it's included for completeness.)
Note, that this consolidation means that at configure time, all options are printed. This is a good thing and allows direct comparison of configs in log files.
Tested: Code compiles Server boots, and shows options configured in the default build. (HTTPS, log level, etc)
Change-Id: I94e79a56bcdc01755036e4e7278c7e69e25809ce Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
5b90429a |
| 16-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Add missing headers
Most of these were found by breaking every redfish class handler into its own compile unit:
When that's done, these missing headers become compile errors. We should just fix the
Add missing headers
Most of these were found by breaking every redfish class handler into its own compile unit:
When that's done, these missing headers become compile errors. We should just fix them.
In addition, this allows us to enable automatic header checking in clang-tidy using misc-header-cleaner. Because the compiler can now "see" all the defines, it no longer tries to remove headers that it thinks are unused.
[1] https://github.com/openbmc/bmcweb/commit/4fdee9e39e9f03122ee16a6fb251a380681f56ac
Tested: Code compiles.
Change-Id: Ifa27ac4a512362b7ded7cc3068648dc4aea6ad7b Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
f5139334 |
| 03-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Refactor UpdateService
Similar to other refactorings we've been doing, make UpdateService call into methods instead of inline lambdas.
Tested: Redfish service validator passes. Structural changes
Refactor UpdateService
Similar to other refactorings we've been doing, make UpdateService call into methods instead of inline lambdas.
Tested: Redfish service validator passes. Structural changes only.
Change-Id: I96b6db5e14fa0f7d357fb0faf63d0457b7963581 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
3cd7072b |
| 06-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Move run and redfish to compile units
Meson supports unity builds[1] natively. There's no reason to continue with the pseudo unity build we've been using by putting implementations in header files.
Move run and redfish to compile units
Meson supports unity builds[1] natively. There's no reason to continue with the pseudo unity build we've been using by putting implementations in header files.
This commit is the first in a long series of starting to break this up into smaller compile units, in the hopes of dropping incremental compile times for developers, and reduce the total per-core memory usage that gcc requires.
This commit breaks out the run() function from main() and the constructor of RedfishService from redfish.hpp into their own compile units. According to tracing, even after broken out, these are still by far the two longest to compile units in the build.
Tested: Code compiles. Debug build on a 24 core build server results in a decrease in compile time for compiling just bmcweb from 1m38s to 1m22s.
[1] https://mesonbuild.com/Unity-builds.html
Change-Id: Ibf352e8aba61d64c9a41a7a76e94ab3b5a0dde4b Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|