summaryrefslogtreecommitdiff
path: root/meson_options.txt
AgeCommit message (Collapse)AuthorFilesLines
2024-05-03updateservice: add start-update meson optionJagpal Singh Gill1-0/+14
Add the meson option for the start-update D-Bus interface feature to be used in UpdateService. More more details refer to - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738 https://gerrit.openbmc.org/c/openbmc/docs/+/65739 Tested: Build passes. Change-Id: I594ddc0d2df6c032823eaeba9429cf50047d5dcd Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
2024-04-30Consolidate Vm implementationsEd Tanous1-2/+3
As much as the two vm implementations SEEM different, the differences largely lie in how we're getting the nbd proxy socket. One is relying on launching a process (nbd-proxy), the other is getting the fd from dbus. Given [1] exists and is in process, we need to have a plan for getting these two VM implementations into one, once that patchset is complete. This commit: Splits the vm-websocket option into vm-websocket-provider, providing two options, nbd-proxy, and virtual-media (the names of the respective apps). To accomplish this, it moves the contents of nbd-proxy into include/vm-websocket, so we can compare the similarities and start consolidating. The longer term intent is that the nbd-proxy option will be completely removed, and the code deleted. This has the additional advantage that we will no longer require the boost::process dependency, as all info will be available on dbus. As part of this, the nbd proxy websocket is also registered at /vm/0/0, to be backward compatible with the old interfaces. Tested: Code compiles. Need some help here. [1] https://gerrit.openbmc.org/c/openbmc/jsnbd/+/49944 Change-Id: Iedbca169ea40d45a8775f843792b874a248bb594 Signed-off-by: Ed Tanous <ed@tanous.net>
2024-04-23Remove XSS prevention codeEd Tanous1-7/+0
This feature was created for a time before webpack had a built in proxy, and to debug the UI required setting specific flags. The webpack proxy solves this problem in a much better way, by proxying everything. This commit is one piece in the solving a use after free bug. Removing this allows us to no longer have to cache the origin header [1], which is only used in this mode. Tested: Code compiles. [1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/70850 Change-Id: I01d67006e217c0c9fd2db7526c0ec34b0da068f3 Signed-off-by: Ed Tanous <ed@tanous.net>
2024-04-04Remove redfish-health-populateGunnar Mills1-8/+0
The redfish-health-populate option was scheduled to be removed in 1Q 2024. It is now 2Q, so remove the option. No upstream layers enabled it and did not find a downstream layer that did either. This was always limited to a few resources. Overall this design was only half done. A future "HealthRollup" can be proposed. Some discord discussion: [1]: https://discord.com/channels/775381525260664832/855566794994221117/1110728560819327069 Commit disabling this (merged 10 months ago): [2]: https://github.com/openbmc/bmcweb/commit/6f8273e49cffdd347c223b9538558edfb05e818a Tested: Code compiles Change-Id: I4d33c1e674ecdb0fd256df62f3795073454ae7a1 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2024-04-02Remove redfish-enable-proccessor-memory-statusGunnar Mills1-10/+0
The redfish-enable-proccessor-memory-status option was scheduled to be removed in 1Q 2024. It is now 2Q, so remove the option. No upstream layers enabled it and I could not find a downstream layer that did either. Redfish deprecated the Processor/Memory Summary Status (state, health, healthrollup) attributes. Discussion on discord, when disabling: [1]: https://discord.com/channels/775381525260664832/855566794994221117/1093939076710793296 Commit disabling this (merged 10 months ago): [2]: https://github.com/openbmc/bmcweb/commit/5fd0aafb0f14fb3011970e8575647bb608688c7c Tested: Code builds. Change-Id: I539cd5f384633afa7badf1cecfc6c7a87062f672 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2024-03-21Change logging to default to Error/CriticalEd Tanous1-1/+1
Historically, logging has been disabled in bmcweb for two reasons. First, the crow logging handler used iostreams, which can bloat binary sizes if there are lots of logging call sites. Second, the amount of logging and the levels at which is was performed were not very carefully selected by either crow, or the follow on bmcweb. A number of log calls logged at Error or Critical level that are fully expected to occur in a normally operating service. The first was corrected with commit 62598e3, which replaced the iostreams logger with c++20 compliant std::format. The second was corrected by Gunnar, documenting when and where to log different levels in commit 0e88cb3, and a series of commits after making the levels usage more consistent. With those two changes in place and showing the appearance of being functional, this patchset is recommending that we change the default error level to log Critical and Error levels by default. A number of organizations have already made this change to their local systems [1], opting for varying levels. Given that we're now internally consistent, this is going to request that we modify those systems to accept defaults once again. There are two negatives to this being the default. 1. We take a 2.7% increase (about 27KB) in binary size. Given the last couple years of reductions in the default binary size, this shouldn't cause any platforms to go over their flash limit, and we're still well within the documented size targets. 2. Error paths now log, which slows down the result, and increases the potential that a DOS attack or test will slow down real results. This concern is hypothetical at best, but we will have to watch for repeated patterns emerging and evaluate if this is a potential problem. Please comment. [1] https://github.com/search?q=repo%3Aopenbmc%2Fopenbmc%20bmcweb-logging&type=code Change-Id: Ib32654c3bcbcbee567f3bd7abd003411dd9e489a Signed-off-by: Ed Tanous <ed@tanous.net>
2024-02-21multi-host: give some more timePatrick Williams1-1/+1
Extend the deletion deadline until 9/1/2024 as Meta intends to have someone work on this feature shortly. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3683aa3f04905c20fa7bb406dde54e549fdd2d8c
2024-02-08Enable redfish-new-powersubsystem-thermalsubsystemGunnar Mills1-4/+4
This is just the default, but enable redfish-new-powersubsystem-thermalsubsystem. As discussed on discord 4 companies enabled it upstream and I see a few more downstream forks enabling it as well. This does enable all sensors in the sensor collection, this is following Redfish as described in the new thermalSubsystem and powerSubsystem doc the sensor collection should contain all sensors that are associated with that chassis. [1] [1] https://redfishforum.com/thread/190/sensorcollection-contain-all-sensors-chassis Redfish release 2020.4 was the new powersubsystem, thermalsubsystem schemas. Redfish has continued to add to them, deprecate the old, and stated this is the new schemas are the future direction. Leave the old redfish-allow-deprecated-power-thermal alone (enabled), this allows for an easier client transition. Also, it would be best if the few outstanding new powersubsystem, thermalsubsystem children resources could get in first. Added a warning about disabling redfish-allow-deprecated-power-thermal in June 2024. Tested: See these APIs, a validator run with both of these enabled (average (2 runs) 6:06) and a validator run with just redfish-new-powersubsystem-thermalsubsystm (average 2 runs 5:52). 3.8% increase. I think this increase is worth it for the client compatibility. Change-Id: Ideb0f1999289b11b80ee0b8288e7ce53de0a7433 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2023-12-09mutual-tls: Add support for Meta certificatesMarco Kawajiri1-0/+14
Meta Inc's client certificates use an internal Subject CN format which AFAIK is specific to Meta and don't adhere to a known standard: Subject: CN = <type>:<entity>/<hostname> Commit adds the `mutual-tls-common-name-parsing=meta` option to, on Meta builds, parse the Subject CN field and map either the <entity> to a local user. The <type> field determines what kind of client identity the cert represents. Only type="user" is supported for now with <entity> being the unixname of a Meta employee. For example, the Subject CN string below maps to a local BMC user named "kawmarco": Subject CN = "user:kawmarco/dev123.facebook.com" Tested: Unit tests, built and tested on romulus using the script below: https://gist.github.com/kawmarco/87170a8250020023d913ed5f7ed5c01f Flags used in meta-ibm/meta-romulus/conf/layer.conf : ``` -Dbmcweb-logging='enabled' -Dmutual-tls-common-name-parsing='meta' ``` Change-Id: I35ee9b92d163ce56815a5bd9cce5296ba1a44eef Signed-off-by: Marco Kawajiri <kawajiri@meta.com>
2023-06-28HTTP/2 supportEd Tanous1-0/+9
HTTP/2 gives a number of optimizations, while keeping support for the protocol. HTTP/2 support was recently added to the Redfish specification. The largest performance increase in bmc usage is likely header compression. Almost all requests reuse the same header values, so the hpack based compression scheme in HTTP/2 allows OpenBMC to be more efficient as a transport, and has the potential to significantly reduce the number of bytes we're sending on the wire. This commit adds HTTP2 support to bmcweb through nghttp2 library. When static linked into bmcweb, this support adds 53.4KB to the bmcweb binary size. nghttp2 is available in meta-oe already. Given the experimental nature of this option, it is added under the meson option "experimental-http2" and disabled by default. The hope is to enable it at some point in the future. To accomplish the above, there a new class, HTTP2Connection is created. This is intended to isolate HTTP/2 connections code from HttpConnection such that it is far less likely to cause bugs, although it does duplicate about 20 lines of code (async_read_some, async_write_some, buffers, etc). This seems worth it for the moment. In a similar way to Websockets, when an HTTP/2 connection is detected through ALPN, the HTTP2Connection class will be instantiated, and the socket object passed to it, thus allowing the Connection class to be destroyed, and the HTTP2Connection to take over for the user. Tested: Redfish service validator passes with option enabled With option disabled GET /redfish/v1 in curl shows ALPN non negotiation, and fallback to http1.1 With the option enable GET /redfish/v1 in curl shows ALPN negotiates to HTTP2 Change-Id: I7839e457e0ba918b0695e04babddd0925ed3383c Signed-off-by: Ed Tanous <edtanous@google.com>
2023-06-21Add an option flag for multi-computersystemEd Tanous1-0/+10
A number of discussions have occurred, and it's clear that multi-computer system is not a transition that can be done in a single series of commits, and needs to be done incrementally over time. This commit adds the initial option for multi-computer system support, with an option flag that can be enabled when the new behavior is desired. This is to prevent needing a long-lived fork. This option operatates such that if enabled, all ComputerSystem route options will now return 404. This is to allow the redfish service validator to pass, and to be used for incremental development. As the routes are moved over, they will be enabled, and service validator re-run. Per the description in the meson options, this option flag, and all code beneath of it will be removed on 9/1/23. The expectation is that by this date, given the appropriate level of effort in implementation, there will be no code remaining under that option flag. After this date, code beneath this option flag will be removed. Tested: No functional changes without option. With option enabled, /redfish/v1/Systems produces no entries. Spot check of various routes returns 404. Redfish service validator passes. Change-Id: I3b58642cb76d61df668076c2e0f1e7bed110ae25 Signed-off-by: Ed Tanous <ed@tanous.net>
2023-06-12Require content-type by defaultEd Tanous1-1/+1
Per the input-validation rules that we follow[1], we should ALWAYS be checking to see that there's a valid content type. Change the default. Tested: Only a default change, code compiles. [1] https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html Change-Id: I4cd58a5d2fb0a49671fc5ec0398010036c743591 Signed-off-by: Ed Tanous <edtanous@google.com>
2023-06-01Rename option and enable it by defaultEd Tanous1-9/+8
I jumped the gun a little on merging this. This commit moves the health-populate option to be called redfish-health-populate and disables it by default Tested: Code compiles Change-Id: I9b2ffef828ec912e011d5d82fbfeaae5fb66ff2a Signed-off-by: Ed Tanous <edtanous@google.com>
2023-05-31Disabled processor and memory summary statusNinad Palsule1-0/+11
Redfish deprecated the Processor/Memory Summary Status (state, health, healthrollup) attributes. Please refer to redfish spec for more details: https://redfish.dmtf.org/schemas/v1/ComputerSystem.v1_20_0.json Initially I tried to fix the summary status issues, (https://gerrit.openbmc.org/c/openbmc/bmcweb/+/60663) But later it was decided that we should also remove these attributes from the bmcweb code. Here is a link to discussion on discord: https://discord.com/channels/775381525260664832/855566794994221117/1093939076710793296 This drop hides these attributes under defined BMCWEB_ENABLE_PROC_MEM_STATUS. This option is disabled by default. These attributes will be permanently removed from code in 1Q 2024 (in 8-9 months). Testing: - Redfish validator passed excepted couple of failures but those are failing without my changes too. - Make sure that summary status for memory and processor is not seen in the output. Without fix: ------------ ''' $ curl -s -k https://${bmc}/redfish/v1/Systems/system ..... "MemorySummary": { "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "TotalSystemMemoryGiB": 256 }, ..... "ProcessorSummary": { "CoreCount": 20, "Count": 4, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } }, ..... '''' With fix: --------- ''' "MemorySummary": { "TotalSystemMemoryGiB": 256 }, ..... "ProcessorSummary": { "CoreCount": 20, "Count": 4 }, ..... '''' - Turned on BMCWEB_ALLOW_DEPRECATED_PROC_MEM_STATUS flag and made sure that properties are shown again. Change-Id: I1e0ee386bd4f365599afcf46e5d587285af635ad Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com> Signed-off-by: Ed Tanous <edtanous@google.com>
2023-05-31health: Add option to disable health-populateWilly Tu1-0/+8
The Health populate calls GetManagedObjects at `/` which can take a lot of time. Add the option to disable to improve performance if it is not needed. Tested: ``` $ meson build -Dhealth-populate=disabled ... User defined options backend : ninja health-populate : disabled ``` Build passed. Health Status removed. Some resource still create HealthPopulate, but does not populate. It will require further refactoring to clean it out. Testing on `/redfish/v1/Chassis?$expand=.($levels=1)` On 14 chassis, from about 2.5 seconds to 400 ms. :) Before: ``` Getting times for chassis Getting good line count with wget -q -O- localhost:80/redfish/v1/Chassis?$expand=.($levels=1) Line count: 980 17:05:56: real 0m2.908s user 0m0.000s sys 0m0.030s 17:05:59: real 0m2.414s user 0m0.010s sys 0m0.010s 17:05:03: real 0m3.410s user 0m0.000s sys 0m0.020s 17:05:09: real 0m2.372s user 0m0.000s sys 0m0.010s 17:05:13: real 0m3.407s user 0m0.010s sys 0m0.000s 17:05:19: real 0m2.420s user 0m0.010s sys 0m0.000s 17:05:23: real 0m3.463s user 0m0.010s sys 0m0.000s 17:05:29: real 0m2.414s user 0m0.000s sys 0m0.010s 17:05:33: real 0m2.843s user 0m0.010s sys 0m0.010s 17:05:38: real 0m2.512s user 0m0.000s sys 0m0.020s 17:05:42: real 0m2.474s user 0m0.000s sys 0m0.010s 17:05:47: real 0m2.557s user 0m0.010s sys 0m0.010s 17:05:52: real 0m2.439s user 0m0.020s sys 0m0.000s 17:05:56: real 0m3.127s user 0m0.010s sys 0m0.000s 17:05:01: real 0m2.563s user 0m0.020s sys 0m0.000s 17:05:06: real 0m2.392s user 0m0.020s sys 0m0.020s 17:05:10: real 0m2.405s user 0m0.020s sys 0m0.000s 17:05:15: real 0m2.514s user 0m0.010s sys 0m0.010s 17:05:19: real 0m2.809s user 0m0.020s sys 0m0.010s 17:05:24: real 0m2.944s user 0m0.010s sys 0m0.010s 17:05:29: real 0m2.537s user 0m0.010s sys 0m0.000s 17:05:34: real 0m3.290s user 0m0.000s sys 0m0.000s 17:05:39: real 0m2.601s user 0m0.040s sys 0m0.000s 17:05:43: real 0m2.398s user 0m0.010s sys 0m0.040s 17:05:48: real 0m2.664s user 0m0.000s sys 0m0.020s 17:05:53: real 0m2.323s user 0m0.010s sys 0m0.000s 17:05:57: real 0m3.033s user 0m0.000s sys 0m0.010s 17:05:02: real 0m3.243s user 0m0.000s sys 0m0.010s 17:05:07: real 0m2.604s user 0m0.010s sys 0m0.010s 17:05:12: real 0m2.813s user 0m0.010s sys 0m0.010s 17:05:17: real 0m2.325s user 0m0.020s sys 0m0.000s 17:05:21: real 0m2.577s user 0m0.010s sys 0m0.000s 17:05:26: real 0m2.882s user 0m0.030s sys 0m0.000s 17:05:31: real 0m2.572s user 0m0.000s sys 0m0.020s 17:05:35: real 0m2.678s user 0m0.010s sys 0m0.010s 17:05:40: real 0m2.656s user 0m0.010s sys 0m0.010s 17:05:45: real 0m2.921s user 0m0.020s sys 0m0.000s 17:05:49: real 0m2.723s user 0m0.000s sys 0m0.020s 17:05:54: real 0m2.910s user 0m0.010s sys 0m0.010s 17:05:59: real 0m2.601s user 0m0.020s sys 0m0.000s 17:05:04: real 0m2.615s user 0m0.000s sys 0m0.000s ``` After: ``` Getting times for chassis Getting good line count with wget -q -O- localhost:80/redfish/v1/Chassis?$expand=.($levels=1) Line count: 980 16:04:43: real 0m0.188s user 0m0.020s sys 0m0.000s 16:04:43: real 0m0.195s user 0m0.010s sys 0m0.000s 16:04:45: real 0m0.219s user 0m0.010s sys 0m0.000s 16:04:48: real 0m0.226s user 0m0.020s sys 0m0.000s 16:04:50: real 0m0.208s user 0m0.020s sys 0m0.010s 16:04:52: real 0m0.226s user 0m0.010s sys 0m0.010s 16:04:54: real 0m0.419s user 0m0.000s sys 0m0.010s 16:04:57: real 0m0.222s user 0m0.010s sys 0m0.020s 16:04:59: real 0m0.194s user 0m0.000s sys 0m0.010s 16:04:01: real 0m0.191s user 0m0.010s sys 0m0.010s 16:04:04: real 0m0.276s user 0m0.010s sys 0m0.020s 16:04:06: real 0m0.183s user 0m0.020s sys 0m0.000s 16:04:08: real 0m0.193s user 0m0.040s sys 0m0.000s 16:04:10: real 0m0.406s user 0m0.020s sys 0m0.010s 16:04:13: real 0m0.317s user 0m0.000s sys 0m0.000s 16:04:15: real 0m0.442s user 0m0.005s sys 0m0.005s 16:04:18: real 0m0.226s user 0m0.010s sys 0m0.000s 16:04:20: real 0m0.217s user 0m0.020s sys 0m0.000s 16:04:22: real 0m0.200s user 0m0.010s sys 0m0.030s 16:04:24: real 0m0.423s user 0m0.010s sys 0m0.010s 16:04:27: real 0m0.203s user 0m0.020s sys 0m0.010s 16:04:29: real 0m0.433s user 0m0.000s sys 0m0.000s 16:04:31: real 0m0.318s user 0m0.020s sys 0m0.000s 16:04:34: real 0m1.206s user 0m0.000s sys 0m0.010s 16:04:37: real 0m0.403s user 0m0.000s sys 0m0.020s 16:04:39: real 0m0.353s user 0m0.010s sys 0m0.000s 16:04:42: real 0m0.291s user 0m0.000s sys 0m0.030s 16:04:44: real 0m0.742s user 0m0.020s sys 0m0.010s 16:04:47: real 0m0.369s user 0m0.010s sys 0m0.000s 16:04:49: real 0m0.215s user 0m0.020s sys 0m0.000s 16:04:52: real 0m0.204s user 0m0.000s sys 0m0.010s 16:04:54: real 0m0.418s user 0m0.000s sys 0m0.000s 16:04:56: real 0m0.215s user 0m0.000s sys 0m0.010s 16:04:58: real 0m0.202s user 0m0.010s sys 0m0.010s 16:04:01: real 0m0.202s user 0m0.010s sys 0m0.010s 16:04:03: real 0m0.212s user 0m0.010s sys 0m0.000s 16:04:05: real 0m0.694s user 0m0.010s sys 0m0.010s 16:04:08: real 0m0.201s user 0m0.010s sys 0m0.010s 16:04:10: real 0m0.230s user 0m0.000s sys 0m0.020s 16:04:12: real 0m0.206s user 0m0.010s sys 0m0.010s 16:04:15: real 0m0.446s user 0m0.010s sys 0m0.010s ``` Change-Id: I90b242e2cd24973420de871fedf9793dd1e310f3 Signed-off-by: Willy Tu <wltu@google.com>
2023-05-30Allow async resolver to be optionalEd Tanous1-0/+11
This commit adds a meson option to allow selecting which dns resolver bmcweb uses. There are use cases, like Open Compute Project Inband Management Agent, that would require not using dbus, which would require us to fall back to the asio resolver. This commit makes the existing asio resolver constructor, and async_resolve methods match the equivalents in asio (which we intended to do anyway), then adds a macro and configure option for being able to select which resolver backend to rely on. Tested: Code can now compile without sdbusplus. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I3220214367179f131a60082bdfaf7e725d35c125
2023-05-19Remove redfish-post-to-old-updateserviceEd Tanous1-10/+0
It is now Q2 2023, and this option has been deprecated. Maintainers have not had any reports of this behavior breaking people. Tested: Code delete only. Code compiles. Change-Id: I9c1fe26e497806c6bc602fb019bafe0fc80d7619 Signed-off-by: Ed Tanous <edtanous@google.com>
2023-05-05Update Logging option for the setting log levelMyung Bae1-2/+6
In order to be able to more easily debug bmcweb related issue, a new meson option is added to set a specific logging level Which generates the targeted logging traces rather than all of debug traces. The current option -Dbmcweb-logging which can be either disabled or enabled is changed to allow to set the log level for the specific level traces (e.g. error or critical traces) to be written to the journal. -Dbmcweb-logging=<log-level> where <log-level> can be disabled, enabled, debug, info, warning, error, or critical. - `disabled`: Turns off all bmcweb log traces. - `enabled` : treated as `debug` - Other option can be described in [Logging Levels](DEVELOPING.md). For an example, to enable only 'error', 'critical' log entries, bmcweb can be built with -Dbmcweb-logging=error Testing: - Verified that only the specific logs (e.g. error and critical logs) were displayed by compiling bmcweb with the specific bmcweb-logging level. Change-Id: I522ca26700ea420fee1a5cf688d3e8c6661f2f55 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2023-02-22Disable old compatibility option defaultEd Tanous1-2/+2
This is a feature that we said we were going to keep until Q4 2022, but because we haven't changed this to default to enabled, disable it by default, and ratchet up our compatibility for another quarter so people have time to adjust. Tested: Code deprecation; Inspection only. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I4294b25317892c809a232b6715e380713afcd689
2023-02-17Add option for validating content-type headerEd Tanous1-0/+11
For systems implementing to the OWASP security guidelines[1] (of which all should ideally) we should be checking the content-type header all times that we parse a request as JSON. This commit adds an option for parsing content-type, and sets a default of "must get content-type". Ideally this would not be a breaking change, but given the number of guides and scripts that omit the content type, it seems worthwhile to add a trapdoor, such that people can opt into their own model on how they would like to see this checking work. Tested: ``` curl --insecure -H "Content-Type: application/json" -X POST -D headers.txt https://${bmc}/redfish/v1/SessionService/Sessions -d '{"UserName":"root", "Password":"0penBmc"}' ``` Succeeds. Removing Content-Type argument causes bmc to return Base.1.13.0.UnrecognizedRequestBody. [1] cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html Change-Id: Iaa47dd563b40036ff2fc2cacb70d941fd8853038 Signed-off-by: Ed Tanous <edtanous@google.com>
2022-08-10Add redfish-oem-manager-fan-data optionGunnar Mills1-0/+9
IBM doesn't use the Redfish OEM fan data in OemManager. IBM does not use phosphor-pid-control instead using phosphor-fan-presence and such. This is data such as PidControllers, StepwiseControllers, FanZones, FanControllers, and Profile. This has been in bmcweb since Oct 2018 so defaulting this flag to enabled to not break anyone. Why we want a flag: 1) Have observed 500 errors with getting the thermalMode. "Jan 24 16:34:57 rain534 bmcweb[435]: (2022-01-24 16:34:57) [ERROR "managers.hpp":1196] GetPIDValues: Can't get thermalModeIface /xyz/openbmc_project/control/thermal/0" 2) This Redfish OEM fan data includes PATCHing. Commit turning this off in meta-ibm: https://gerrit.openbmc.org/c/openbmc/openbmc/+/56327 Tested: With this flag enabled and disabled. Manager resource looks as expected. Before on a dummy PATCH to this: curl -k -X PATCH https://$bmc/redfish/v1/Managers/bmc -d \ '{"Oem":{"OpenBmc":{"Fan":{"Profile":"Acoustic"}}}}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service... With this change and the meta-ibm change (instead see a PropertyUnknown) curl -k -X PATCH https://$bmc/redfish/v1/Managers/bmc -d \ '{"Oem":{"OpenBmc":{"Fan":{"Profile" : "Acoustic"} }}}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The property %1 is not in the list of valid... "MessageArgs": [ "Oem" ], "MessageId": "Base.1.13.0.PropertyUnknown", PATCHed the DateTime with this enabled. Change-Id: I374292ca2798e096b18d49df5bbc7a93c7f1c400 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2022-06-02Enable redfish journal by defaultWilly Tu1-1/+1
The journal logs in redfish provide really useful information for debugging. Enabling it by default for all system to use it. Tested: Redfish Validator Passed Working example, ``` wget -qO- http://localhost:80/redfish/v1/Managers/bmc/LogServices/Journal { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal", "@odata.type": "#LogService.v1_1_0.LogService", "DateTime": "1970-01-02T22:46:40+00:00", "DateTimeLocalOffset": "+00:00", "Description": "BMC Journal Log Service", "Entries": { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal/Entries" }, "Id": "BMC Journal", "Name": "Open BMC Journal Log Service", "OverWritePolicy": "WrapsWhenFull" } ``` ``` { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of BMC Journal Entries", "Members": [ { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal/Entries/91187366227", "@odata.type": "#LogEntry.v1_8_0.LogEntry", "Created": "1970-01-02T01:19:47+00:00", "EntryType": "Oem", "Id": "91187366227", "Message": "bmcweb: (1970-01-02 01:19:47) [DEBUG \"memory.hpp\":438] Get available system components.", "Name": "BMC Journal Entry", "OemRecordFormat": "BMC Journal Entry", "Severity": "OK" }, ... } ``` Change-Id: I4f22e82884b28f76d7b505cca8b690132bc357b9 Signed-off-by: Willy Tu <wltu@google.com>
2022-05-31meson option: make the insecure-disable-auth macro more accurateNan Zhou1-2/+2
The "auth" term is overloaded in meson option and macros. This commit changes the macro from BMCWEB_INSECURE_DISABLE_AUTHENTICATION to BMCWEB_INSECURE_DISABLE_AUTHX, given that if "insecure-disable-auth" is enabled, both authentication and authorization are disabled. Tested: 1. set 'insecure-disable-auth=enabled', no authz nor authn is performed, no crash on AccountService as well. Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Iddca1f866d16346bcc2017338fa6f077cb89cef9
2022-05-23bmcweb: Fetch Satellite Config from D-BusCarson Labrado1-1/+7
Adds a RedfishAggregator class which is able to pull configuration information from D-Bus for Satellite BMCs. These BMCs will be aggregated by Redfish Aggregation. Also added is a new compiler option which will be used to enable Redfish Aggregation. This patch only allows configurations with unencrypted and unauthenticated satellite BMC communication. Support for encryption and authentication willneed to be added in future patches. Note that this patch does not actually use the config information after it has been fetched. That functionality will be added in future patches. Tested: I made this example config information available on D-Bus busctl introspect xyz.openbmc_project.EntityManager \ /xyz/openbmc_project/inventory/system/board/SatelliteBMC/aggregated0 \ xyz.openbmc_project.Configuration.SatelliteController NAME TYPE SIGNATURE RESULT/VALUE FLAGS .AuthType property s "None" emits-change .Hostname property s "127.0.0.1" emits-change .Name property s "aggregated0" emits-change .Port property t 443 emits-change .Type property s "SatelliteController" emits-change That information was picked up by the changes in this CL: [DEBUG "redfish_aggregator.hpp":80] Found Satellite Controller at /xyz/openbmc_project/inventory/system/board/SatelliteBMC/aggregated0 [DEBUG "redfish_aggregator.hpp":209] Added satellite config aggregated0 at http://127.0.0.1:443 [DEBUG "redfish_aggregator.hpp":52] Redfish Aggregation enabled with 1 satellite BMCs [DEBUG "redfish_aggregator.hpp":21] There were 1 satellite configs found at startup Signed-off-by: Carson Labrado <clabrado@google.com> Change-Id: Ib5eee2c93aeb209157191055975c127759d73627
2022-05-17Change UpdateService POST URIEd Tanous1-0/+11
As d01e32c3786f2fbbb70c9724a87cf979b4a06232 found, the Redfish specification doesn't allow a direct POST handler on UpdateService. Ideally clients would be following the specification, and relying on the HttpPushUri as the spec requires, so we could simply make this change. Unfortunately, a quick polling of the community shows that a significant number of instances, including the Redfish cheat sheet, and the robot tests, have hardcoded the non-spec behavior. This commit is present to give a trap door to allow easier porting of this behavior to the specification. The old uri is left, and now returns a WARNING http field, indicating that the uri is deprecated, in case clients have ignored the Redfish specification. Tested: Ran firmware update instructions from https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/53664 Test gave the same result as previously. /redfish/v1/UpdateService returns an HttpPushUri that matches the above. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7427f461d151c9460160b0b9b366dca5aefc49d5
2022-05-04Fix whitespacing on meson_options.txtEd Tanous1-34/+272
The meson_options.txt file is difficult to read and maintain because it has inconsistent whitespace, lines that are far longer than fit on a single monitor, and inline strings that are inconsistent. This commit fixes those, moving the syntax to use newlines for each option method key value, no space on the key colon, and wraps description strings using mesons multi-line syntax on 80 character boundaries. Doing this should make this file more maintainable in the future, and helps people to review, and read it better than previously. The intent is that this patchset has no functional changes, only whitespace and non-enforcing string manipulation, with one exception. Anywhere we noted a redfish path, we used escaped single quotes. Multiline strings in meson don't support escaping, so in lieu of worse alternatives, the quoting was removed, which inline with this patch, continues to improve the readability of the file. Tested: Code builds. No functional changes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I04f3e31e364bcd3d4b09a219afff21a8eaabc463
2022-04-28Make insecure-enable-redfish-query more specificEd Tanous1-1/+1
insecure-enable-redfish-query is really only intended to protect the user from things that might run the system out of resources, like expand, or complex filter queries (ie queries that might pop the stack). This commit message moves the location where the parameters are enabled/disabled into the parser itself, such that some parameters (like top and skip in the next commit) can be executed outside of this option flag. Because of moving the expand support deeper in the call stack, some unit tests now need to be aware of whether or not expand is supported in the configuration. Tested: Enabled query option through local.conf with EXTRA_OEMESON:pn-bmcweb:append = "-Dinsecure-enable-redfish-query='enabled'" Then did: curl --insecure --user root:0penBmc https://192.168.7.2/redfish/v1\?\$expand\=\* Query expanded as expected; set insecure-enable-redfish-query='disabled' and observed that the same curl query returned QueryParameterValueFormatError, which is expected. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I24fbc2c9f64628d6457dd117b61ff22b276b0682
2022-04-05Add new option for query parametersEd Tanous1-0/+1
Query parameters in their initial incarnation will likely have security consequences. For example, requesting ServiceRoot with expand depth 999 would likely run most BMCs out of memory. This isn't a good reason to keep those features out of master, as there are a number of services (webui-vue for example) that would like to test against them, and identify the weaknesses. The goal with this option is to allow users to test, so we can determine things like the max depth we should support, which query params have security consequences and how to mitigate them, and other testing. The end goal would be for this option to be enabled by default. If it's removed entirely would depend on the impacts of supporting query params and is something we will have to discuss at a later date. Tested: Code compiles. Use of this option is added in next patchset in series. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I93ff31c938e4be2d92eb07b59a3288f8bacde2ac
2021-12-17Change Default of REST D-Bus to OFFJames Feist1-1/+1
REST D-Bus, while providing useful functionality, also allows authenticated users access to privileged information that may be above their permission level. This change sets the default to disabled. Users if they wish can turn it back on in their own layers. A lot of functionality previously provided by REST D-Bus is now available on Redfish with more coming all the time. Note: phosphor-webui uses the REST D-Bus so a user of that will have to enable this in their layer. webui-vue, the replacement for phosphor-webui, uses Redfish. See here [1]. Resolves openbmc/bmcweb/issues/114 [1] https://github.com/openbmc/webui-vue Tested: Rest D-Bus was disabled Change-Id: I35682b113287b3be4e19b033d0296790b204d8e0 Signed-off-by: James Feist <james.feist@linux.intel.com> Signed-off-by: Ali Ahmed <ama213000@gmail.com>
2021-11-18meson_options: implement disable-auth; delete pamNan Zhou1-1/+0
Implemented the disable-auth option. This patch also removed the pam option which never worked. Tested: With disable-auth, ``` ~# wget -qO- http://localhost/redfish/v1/Systems/ { "@odata.id": "/redfish/v1/Systems", "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "Members@odata.count": 1, "Name": "Computer System Collection" } ``` Without disable-auth, ``` ~# wget -qO- http://localhost/redfish/ { "v1": "/redfish/v1/" } ~# wget -qO- http://localhost/redfish/v1/Systems/system wget: server returned error: HTTP/1.1 401 Unauthorized ``` Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I88e4e6fa6ed71096bc866b42b9af283645a65988
2021-11-04Redfish: Support Host Log EntriesSpencer Ku1-0/+1
This commit is designing and implementing a new logging service in Redfish to expose host serial console logs.The goal is that clients can talk to bmc via Redfish and get a real-time console. It will improve the debuggability of BMCs. We will add three paths to redfish tree to implement the feature: 1. /redfish/v1/Systems/system/LogServices/HostLogger 2. /redfish/v1/Systems/system/LogServices/HostLogger/Entries 3. /redfish/v1/Systems/system/LogServices/HostLogger/Entries/<str> To use this feature, we expect to use phosphor-hostlogger(stream mode) + rsyslog + bmcweb. Phosphor-hostlooger in stream mode forwards the byte stream into rsyslog via the imuxsock module. The log is persisted via the omfile module as soon as collected. It makes Host Logger leverage exsisting tools (rsyslog and logrotate). Then we can expose host serial console logs via bmcweb. This feature can be enabled or disabled by setting the option "redfish-host-logger", and the default value is "enabled". If you don't want to expose host serial console logs, you need to turn the value to "disabled". Sample Output: curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/HostLogger/ { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger", "@odata.type": "#LogService.v1_1_0.LogService", "Description": "Host Logger Service", "Entries": { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries" }, "Id": "HostLogger", "Name": "Host Logger Service" } curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/HostLogger/Entries { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of HostLogger Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries/0", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "EntryType": "Oem", "Id": "0", "Message": "123123", "Name": "Host Logger Entry", "OemRecordFormat": "Host Logger Entry", "Severity": "OK" } ], "Members@odata.count": 1, "Name": "HostLogger Entries" } curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/HostLogger/Entries/0 { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries/0", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "EntryType": "Oem", "Id": "0", "Message": "123123", "Name": "Host Logger Entry", "OemRecordFormat": "Host Logger Entry", "Severity": "OK" } Signed-off-by: Spencer Ku <Spencer.Ku@quantatw.com> Change-Id: I4ad2652a80fb1c441a25382b7d422ecd7ffc8557
2021-10-19Revert "Redfish: Support Host Log Entries"Ed Tanous1-1/+0
This commit appears to cause 500 errors on systems that don't have host-logger installed. Reverting for now to get the codebase back to stable; To the author, please fix the error and resubmit. The bump that failed is here: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/47933 This reverts commit bf888502a247d8374c70e7ceddc9862bf0ad88bd. Change-Id: I346178f079245f96e2c1e03720490dcbcf19427b Signed-off-by: Ed Tanous <edtanous@google.com>
2021-10-19Redfish: Support Host Log EntriesSpencerKu1-0/+1
This commit is designing and implementing a new logging service in Redfish to expose host serial console logs.The goal is that clients can talk to bmc via Redfish and get a real-time console. It will improve the debuggability of BMCs. We will add three paths to redfish tree to implement the feature: 1. /redfish/v1/Systems/system/LogServices/HostLogger 2. /redfish/v1/Systems/system/LogServices/HostLogger/Entries 3. /redfish/v1/Systems/system/LogServices/HostLogger/Entries/<str> To use this feature, we expect to use phosphor-hostlogger(stream mode) + rsyslog + bmcweb. Phosphor-hostlooger in stream mode forwards the byte stream into rsyslog via the imuxsock module. The log is persisted via the omfile module as soon as collected. It makes Host Logger leverage exsisting tools (rsyslog and logrotate). Then we can expose host serial console logs via bmcweb. This feature can be enabled or disabled by setting the option "redfish-host-logger", and the default value is "enabled". If you don't want to expose host serial console logs, you need to turn the value to "disabled". RedfishServiceValidator results: /redfish/v1/Systems/system/LogServices/HostLogger pass: 4 passGet: 1 skipOptional: 9 /redfish/v1/Systems/system/LogServices/HostLogger/Entries pass: 24 passGet: 1 skipOptional: 1 /redfish/v1/Systems/system/LogServices/HostLogger/Entries/<str> pass: 7 passGet: 1 skipOptional: 15 Sample Output: curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/HostLogger/Entries { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of HostLogger Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries/1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "EntryType": "Event", "Id": "1", "Message": "[ 57.061546] gq 0000:16:00.0 eth0: link up, 100 Gbps, no PAUSE", "MessageArgs": [ "[ 57.061546] gq 0000:16:00.0 eth0: link up, 100 Gbps, no PAUSE" ], "MessageId": "OpenBMC.0.1.SerialLogAdded", "Name": "HostLogger Entries", "Severity": "OK" }, ... ], "Members@odata.count": 22, "Name": "HostLogger Entries" } Signed-off-by: SpencerKu <Spencer.Ku@quantatw.com> Change-Id: I5a7873caa117400fb0a737588a50bd743e8b5063
2021-10-07Remove dead hostname codeEd Tanous1-1/+0
The original code said we'd remove this in Q4 2021, and it's now Q4 2021. So far as I've heard, no user has reported this, and no system has needed to enable this for backward compatibility. The original author of the patch has stated that it's no longer used, so this is effectively dead code, lets remove it. Also, added a missing return in what was previously a #ifdef Tested: Code builds. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I1d58efb92ed06b7632d57440072834a1d02e87dd
2021-08-20Move sensor collection to all sensorsGeorge Liu1-0/+1
Redfish's thinking on what sensors should be included in the sensor collection has changed. Roughly two years ago their thinking was "for sensors that are not covered elsewhere in the model-meaning do not duplicate Power and Thermal" and that is what OpenBMC implemented. Today, as described in the new thermalSubsystem and powerSubsystem doc the sensor collection should contain all sensors that are associated with that chassis. Link with: https://redfishforum.com/thread/190/sensorcollection-contain-all-sensors-chassis All things considered as "sensors" should be included in the Sensor collection. To make this transition as easy as possible for clients, create a new meson option, new-powersubsystem-thermalsubsystem. This "all sensors in the sensor collection" behavior as well as the new ThermalSubsystem, PowerSubsystem, Fans, and Power Supplies schemas will be under this option. This option is defaulted to disabled. At a later time, the default will move to enabled. Move Redfish SensorCollection to show all sensors from /xyz/openbmc_project/sensors with the "all_sensors" association for that chassis if this option is enabled. The SensorCollection is found at /redfish/v1/Chassis/<Id>/Sensors. Tested: 1. Enabled redfish-new-powersubsystem-thermalsubsystem and validator passes. 2. Performance testing (average of 5 times): a. Redfish validator time: without this patch: 71.375s with this patch: 71.763s b. Number of sensors tested: without this patch: 8 with this patch: 63 c. Run `https://${bmc}/redfish/v1/Chassis/chassis/Sensors`: without this patch: 0.197s with this patch: 0.228s Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I2bdddcf616dc72cf0683515c9ab8453bd35eee09
2021-08-10Add google service rootFeras Aldahlawi1-0/+1
This commit introduces the following => Service root for Google => compiler option for the Google Root of Trust specific functionalities Tested: curl -vvvv --insecure --user $user_pass https://${bmc}/google/v1 Desing Doc can be found here https://github.com/openbmc/docs/blob/master/designs/oem/google/root_of_trust.md Change-Id: I941b5cab55179279d0eff18aa29df62c3f226e47 Signed-off-by: Feras Aldahlawi <faldahlawi@gmail.com>
2021-06-21Add option to configure port numberVivekanand Veeracholan1-0/+1
Make the https port number configurable through meson option "https_port". It will have a default value of 443. Need the port to be configurable because on some setups the allowed ports for BMC's network are limited. 443 is not one of the open ports. Tested: Tested default option and also explicitly setting to a specific port. Signed-off-by: Vivekanand Veeracholan <vveerach@google.com> Change-Id: I8e9675865812da6f6ebcd121e87efab840b9dd33
2021-06-17Add compile flag to turn off the old Power/Thermalzhanghch051-0/+1
The compile flag should initially be enable(allowing the old Power/Thermal). At a later date,we can move this flag to defaulted off. At an even later date we can remove the old Power/Thermal implementation. Test: 1. Validator passed. 2.The default value is enable, so old Power/Thermal can be used normally.Use the curl commond, old Power/Thermal still exists. ~$ curl -i -k -H "X-Auth-Token: $token" -X GET "https://${bmc}/redfish/v1/Chassis/chassis" { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_15_0.Chassis", "Actions": { "#Chassis.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Chassis/chassis/ResetActionInfo", "target": "/redfish/v1/Chassis/chassis/Actions/Chassis.Reset" } }, "ChassisType": "RackMount", "Id": "chassis", "Links": { "ComputerSystems": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "Name": "chassis", "PCIeDevices": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices" }, "PCIeSlots": { "@odata.id": "/redfish/v1/Chassis/chassis/PCIeSlots" }, "Power": { "@odata.id": "/redfish/v1/Chassis/chassis/Power" }, "PowerState": "Off", "PowerSubsystem": { "@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem" }, "Sensors": { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors" }, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "StandbyOffline" }, "Thermal": { "@odata.id": "/redfish/v1/Chassis/chassis/Thermal" } } Signed-off-by: zhanghaicheng <zhanghch05@inspur.com> Change-Id: Id3556c18dc6aac95fd5aa02cdf2983378c01fb68
2021-06-04Remove checkAndDoSensorsOverride functionBruce Lee1-2/+0
Remove checkAndDoSensorsOverride function, this will be handled via dbus-sensor when the user set-value from external. This is unlikely to break any users because the Intel special mode function is no change, only move to dbus-sensor to handle, "busctl" command also belongs to the external setting, so move to dbus-sensor is more suitable, this will including users to set value use busctl command and Redfish from external. Dbus-sensor needs to be merged at the same time. Dbus-sensor changes are pushed to Gerrit: https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/42453 The mailing list discussion links: https://lists.ozlabs.org/pipermail/openbmc/2021-March/025597.html Signed-off-by: Bruce Lee <Bruce_Lee@quantatw.com> Change-Id: I74356f2b65e41cc0e9d8947c160f313334b78331
2021-04-03log_services: Remove raw PECI commandJason M. Bills1-1/+0
The raw PECI command is recommended not to include in a standard build, so removing it from the bmcweb to avoid accidental inclusion. Tested: Confirmed that the raw PECI command is gone. Change-Id: I2b52e0ede089da6df6ca3ad304194de8af27b709 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2021-03-16Force HostName property to be read-only per the schemaJohnathan Mantey1-0/+1
The ManagerNetworkProtocol schema defines the HostName entry to be read-only. Change the doPatch code to prevent updating the hostname attribute. The DMTF redfish/v1/Managers/bmc/NetworkProtocol is a read-only location. The DMTF approved location for changing the HostName is: redfish/v1/Managers/bmc/EthernetInterfaces/<str> This change does not impact phosphor-webui, as it uses D-Bus to perform all of its work. This change does not impact webui-vue, as it is using the DMTF approved API. This commit deprecates allowing Read/Write access to the Hostname in the ManagersNetworkProtocol URI. To reduce the impact to Redfish clients that rely upon Read/Write access a Meson compile time flag has been added to allow Read/Write access to be restored. The Meson build flag, redfish-allow-deprecated-hostname-patch, can be enabled to restore Read/Write access. The Meson build flag is slated to be removed in Q4 2021 enforcing the read-only state. Tested: Explicitly PATCH'd HostName to confirm it cannot be modified. Enabled the HostName feature, and confirmed the HostName accepted a PATCH command. Ran Redfish_Service_Validator (deprecated, and re-enabled). Change-Id: If7f2148d8bbb8a7b420c4abde086272c4320977a Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
2021-03-11Disable nbd proxy from the buildEd Tanous1-1/+8
The inline comment mostly describes this patchset. As far as OpenBMC is concerned, no platforms or distros implement a backend for this code, therefore this is dead "unused" code. Clearly the authors intended to use it, but haven't been able to upstream anything. For the moment, this patchset makes the nbd proxy option unenablable. This will have no impact to any OpenBMC platforms, as there are no implementations of this API in OpenBMC itself, only in downstream forks. It's not clear what the intentions are with this code, so hopefully this disabling and comment encourages those that care about it to interact and add some details around how this was designed, and the plans to upstream it into OpenBMC. If not, presumably the code can be deleted without any harm. For timelines, this was checked in Jul 12, 2019, so we're now 20 months past its initial entry. This seems like enough time for the dust to have settled on getting the appropriate things upstreamed. Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I217493b97d62282b8781608805bcfe319e6f7d85
2020-12-15Add meson options for all authentication methods.Alan Kuo1-0/+4
Add meson options to enabled/disabled authentication methods: - basic-auth : For enable basic authentication, default is enabled - session-auth : For enable session token authentication, default is enabled - xtoken-auth : For enable x-token authentication, default is enabled - cookie-auth : For enabled cookie authentication, default is enabled Signed-off-by: Alan Kuo <Alan_Kuo@quantatw.com> Change-Id: I52e636f2534a14897cb57d35e563ea8841cc68b9
2020-10-18Fix meson dump logService build optionRavi Teja1-1/+1
Currently 'redfish-sysdump-log' flag does not compiling Dump LogServices code. to fix compilation this commit uses 'BMCWEB_ENABLE_REDFISH_DUMP_LOG' Modified redfish-sysdump-log to redfish-dump-log as both BMC and System dump are enabled using this flag. Tested by: Compiled bmcweb with compilation flag with 'redfish-dump-log' Verfied Dump Logservices on bmc. Signed-off-by: Ravi Teja <raviteja28031990@gmail.com> Change-Id: Iaecad125d8a0acfda0b4357534a19580544b15e1
2020-10-07Allow a max payload size of 512MBEd Tanous1-1/+1
It's probably not a great idea to allow that big of a payload on the BMC, but it was supported before, so lets push that discussion to another time. Tested: code builds. Attempting to resolve CI, which will test itself. Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I1f9e489075857621f5295d4870dea9f5767666f0
2020-10-03Enable Meson Build System & remove cmake supportManojkiran Eda1-0/+34
- This commit enables the support for meson build system for bmcweb and also remove the cmake support - The inital thought of migrating to meson build system was based on [link](https://mesonbuild.com/Simple-comparison.html) - Other things to praise about meson are its simplicity and userfriendly ness. It also have native support for modern tools such as precompiled headers, coverage, Valgrind , unity builds e.t.c - This commit also support the automatic download and setup of dependencies if they are not found in usual places using meson wraps that are already available in [wrap db](https://wrapdb.mesonbuild.com/) - For few dependencies like boost, boost-url which does not have meson wrap support yet, i have misused the meson subproject command to download boost & boot-url and build against them if they are not found in usual places. - For boost & boost-url the subproject command will always fail as meson supports other meson projects as subprojects but it will always download the source, and since we dont actually build boost/boost-url but just use the the source headers this should not be a problem. - Cmake options removed: - BUILD_STATIC_LIBS has been removed as it is not being used any where as per the review comments. - By default the meson wraps are enabled and it downloads the dependencies if they are not found, and via bitbake this behaviour is disabled by default as download fallback feature is disabled. - This commit also adds the README, changes for bmcweb as well. - The meta-* layer changes are also pushed and marked as WIP under bmcweb_meson_port topic. Tested By : =========== 1. Compilation is passed without error or warning in both arm & x86 sdks that are populated by yocto. 2. The unittests are also passed on both x86 & arm machines. 3. Compilation passed with various build types supported by meson (debug,debugoptimized, relase) 4. modified the meta-phosphor & meta-ibm to leverage meson build for bmcweb, and loaded the resulted image on qemu & real machine, checked the bmcweb status and was also able to pull the web-gui on both. 5. Tested few common commands related to session service & network service manually on a real machine and also also had run a CT regression bucket, and it looked clean. The binary sizes when bmcweb is compiled via bitbake(using meta-ibm) are : cmake: 3100080 bytes approx (3 MB) meson: 2822596 bytes approx (2.7 MB) 1:1 equivalent hash is not possible due to couple of things: 1. The build types in meson does not have a 1:1 mapping with cmake build types. 2. Meson adds below mentioned compiler & linker flags than cmake as a part of warning_level & build types CXXFLAGS :' -O2 -pipe -g -feliminate-unused-debug-types -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Winvalid-pch -DNDEBUG' LDFLAGS : ' -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--no-undefined,-Wl,--end-group' Tried to match the compile commands in both cmake & meson as much as possible and this is what i could get.I have attached the compile_commands.json for both duing an yocto full build in the [link](https://gofile.io/d/gM80fw) for reference. Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ia65689fdacb8c398dd0a019258369b2442fad2f3