* [phosphor-virtual-sensor] get sensor service fail @ 2021-03-29 9:13 Harvey Wu (吳崇維) 2021-03-29 18:53 ` Matt Spinler 2021-04-08 14:00 ` Alan Kuo (郭振維) 0 siblings, 2 replies; 6+ messages in thread From: Harvey Wu (吳崇維) @ 2021-03-29 9:13 UTC (permalink / raw) To: openbmc Cc: Duke Du (杜祥嘉), Fran Hsu (徐誌謙), George Hung (洪忠敬) [-- Attachment #1: Type: text/plain, Size: 671 bytes --] Hi All, In current phosphor-virtual-sensor, the function getService will return empty string only when catch error name = “xyz.openbmc_project.Common.Error.ResourceNotFound” (https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37). But in my system, when bus call didn’t get sensor service, the exception name will be “org.freedesktop.DBus.Error.FileNotFound”, and then service will be get failed. It seems need to modified the origin condition or add another elseif condition. Do I misunderstand something? Thanks. Harvey Wu Email: Harvey.Wu@quantatw.com<mailto:Harvey.Wu@quantatw.com> Ext: 17408 [-- Attachment #2: Type: text/html, Size: 3545 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [phosphor-virtual-sensor] get sensor service fail 2021-03-29 9:13 [phosphor-virtual-sensor] get sensor service fail Harvey Wu (吳崇維) @ 2021-03-29 18:53 ` Matt Spinler 2021-04-08 14:00 ` Alan Kuo (郭振維) 1 sibling, 0 replies; 6+ messages in thread From: Matt Spinler @ 2021-03-29 18:53 UTC (permalink / raw) To: Harvey Wu (吳崇維), openbmc Cc: Duke Du (杜祥嘉), Fran Hsu (徐誌謙), George Hung (洪忠敬) On 3/29/2021 4:13 AM, Harvey Wu (吳崇維) wrote: > Hi All, In current phosphor-virtual-sensor, the function getService > will return empty string only when catch error name = > “xyz.openbmc_project.Common.Error.ResourceNotFound” > (https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37 > ZjQcmQRYFpfptBannerStart > This Message Is From an External Sender > This message came from outside your organization. > ZjQcmQRYFpfptBannerEnd > > Hi All, > > In current phosphor-virtual-sensor, the function getService > will return empty string only when catch error name = > “xyz.openbmc_project.Common.Error.ResourceNotFound” > (https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37 > <https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37>). > > But in my system, when bus call didn’t get sensor service, the > exception name will be “org.freedesktop.DBus.Error.FileNotFound”, and > then service will be get failed. > > It seems need to modified the origin condition or add another > elseif condition. Do I misunderstand something? > You seem to just be missing the mapper commit https://github.com/openbmc/phosphor-objmgr/commit/3735ea2ee546b2436895cf956daf0090a6d2d406 which will return ResourceNotFound. > Thanks. > > Harvey Wu > > Email: Harvey.Wu@quantatw.com <mailto:Harvey.Wu@quantatw.com> > > Ext: 17408 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [phosphor-virtual-sensor] get sensor service fail 2021-03-29 9:13 [phosphor-virtual-sensor] get sensor service fail Harvey Wu (吳崇維) 2021-03-29 18:53 ` Matt Spinler @ 2021-04-08 14:00 ` Alan Kuo (郭振維) 2021-04-08 16:36 ` Ed Tanous 1 sibling, 1 reply; 6+ messages in thread From: Alan Kuo (郭振維) @ 2021-04-08 14:00 UTC (permalink / raw) To: openbmc; +Cc: edtanous, nanzhou [-- Attachment #1: Type: text/plain, Size: 2551 bytes --] Hi all, In the current implementation of bmcweb LogServices, the time of the "Created" property is the time when the event is generated, which does not match the description of the redfish schema. The "Created" property means the date and time when the log entry was created. We think that using “EventTimestamp” will be more suitable than “Created” in LogServices. Could you give me some suggestion ? Or am I misunderstanding the definition of schema? Here is an example: { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B5-83", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:01:43+00:00", <= It should be EventTimestamp "EntryType": "Event", "Id": "B5-83", "Message": "Boot Count: 1: TS Offset: 65.4769; POST Code: 0x01", "MessageArgs": [ "1", "65.4769", "0x01" ], "MessageId": "OpenBMC.0.1.BIOSPOSTCode", "Name": "POST Code Log Entry", "Severity": "OK" } Thanks, Alan From: openbmc <openbmc-bounces+alan_kuo=quantatw.com@lists.ozlabs.org> On Behalf Of Harvey Wu (吳崇維) Sent: Monday, March 29, 2021 5:14 PM To: openbmc@lists.ozlabs.org Cc: Duke Du (杜祥嘉) <Duke.Du@quantatw.com>; Fran Hsu (徐誌謙) <Fran.Hsu@quantatw.com>; George Hung (洪忠敬) <George.Hung@quantatw.com> Subject: [phosphor-virtual-sensor] get sensor service fail Hi All, In current phosphor-virtual-sensor, the function getService will return empty string only when catch error name = “xyz.openbmc_project.Common.Error.ResourceNotFound” (https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fphosphor-virtual-sensor%2Fblob%2Fmaster%2FdbusUtils.hpp%23L37&data=04%7C01%7CAlan_Kuo%40quantatw.com%7Ccde1ecb7b4fe46832a9608d8f2932ad4%7C179b032707fc4973ac738de7313561b2%7C1%7C0%7C637526061215310813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5J%2FUr5bZvLFr%2FrFOih%2Bh8QufHoy8wcXmEn8yU6K%2FcOM%3D&reserved=0>). But in my system, when bus call didn’t get sensor service, the exception name will be “org.freedesktop.DBus.Error.FileNotFound”, and then service will be get failed. It seems need to modified the origin condition or add another elseif condition. Do I misunderstand something? Thanks. Harvey Wu Email: Harvey.Wu@quantatw.com<mailto:Harvey.Wu@quantatw.com> Ext: 17408 [-- Attachment #2: Type: text/html, Size: 9218 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [phosphor-virtual-sensor] get sensor service fail 2021-04-08 14:00 ` Alan Kuo (郭振維) @ 2021-04-08 16:36 ` Ed Tanous 2021-04-08 17:11 ` Nan Zhou 0 siblings, 1 reply; 6+ messages in thread From: Ed Tanous @ 2021-04-08 16:36 UTC (permalink / raw) To: Alan Kuo (郭振維); +Cc: openbmc, edtanous, nanzhou On Thu, Apr 8, 2021 at 7:01 AM Alan Kuo (郭振維) <Alan_Kuo@quantatw.com> wrote: > > Hi all, > > > > In the current implementation of bmcweb LogServices, the time of the "Created" property is the time when the event is generated, which does not match the description of the redfish schema. The "Created" property means the date and time when the log entry was created. It should be noted, Created has been present since 1.0.0 of LogEntry, EventTimestamp was added in LogEntry v1.1.0. Based on the descriptions, it's not clear to me what the intended difference is, seeing as how they're both of type Edm.DateTimeOffset. Based on the description, the two would be identical on an OpenBMC system, the LogEntry is "Created" at the same time it occurs. > > We think that using “EventTimestamp” will be more suitable than “Created” in LogServices. Why? Can you give more details here on what you're trying to accomplish? > > > > Could you give me some suggestion ? Or am I misunderstanding the definition of schema? This is probably a better question for the Redfish forum, unless there's documentation on what the intended difference between those two parameters are. > > > > Here is an example: > > { > > "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B5-83", > > "@odata.type": "#LogEntry.v1_4_0.LogEntry", > > "Created": "1970-01-01T00:01:43+00:00", <= It should be EventTimestamp > > "EntryType": "Event", > > "Id": "B5-83", > > "Message": "Boot Count: 1: TS Offset: 65.4769; POST Code: 0x01", > > "MessageArgs": [ > > "1", > > "65.4769", > > "0x01" > > ], > > "MessageId": "OpenBMC.0.1.BIOSPOSTCode", > > "Name": "POST Code Log Entry", > > "Severity": "OK" > > } > > > > Thanks, > > Alan > > > > From: openbmc <openbmc-bounces+alan_kuo=quantatw.com@lists.ozlabs.org> On Behalf Of Harvey Wu (吳崇維) > Sent: Monday, March 29, 2021 5:14 PM > To: openbmc@lists.ozlabs.org > Cc: Duke Du (杜祥嘉) <Duke.Du@quantatw.com>; Fran Hsu (徐誌謙) <Fran.Hsu@quantatw.com>; George Hung (洪忠敬) <George.Hung@quantatw.com> > Subject: [phosphor-virtual-sensor] get sensor service fail > > > > Hi All, > > > > In current phosphor-virtual-sensor, the function getService will return empty string only when catch error name = “xyz.openbmc_project.Common.Error.ResourceNotFound” (https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37). > > But in my system, when bus call didn’t get sensor service, the exception name will be “org.freedesktop.DBus.Error.FileNotFound”, and then service will be get failed. > > It seems need to modified the origin condition or add another elseif condition. Do I misunderstand something? > > > > > > Thanks. > > > > Harvey Wu > > Email: Harvey.Wu@quantatw.com > > Ext: 17408 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [phosphor-virtual-sensor] get sensor service fail 2021-04-08 16:36 ` Ed Tanous @ 2021-04-08 17:11 ` Nan Zhou 2021-04-08 19:28 ` Ed Tanous 0 siblings, 1 reply; 6+ messages in thread From: Nan Zhou @ 2021-04-08 17:11 UTC (permalink / raw) To: Ed Tanous; +Cc: Alan Kuo (郭振維), openbmc, edtanous [-- Attachment #1: Type: text/plain, Size: 5011 bytes --] Hi Ed, Thanks for your reply. Alan and I were talking about what attribute we should use for "the time that an event occurred", "Created" or "EventTimestamp". Both attributes in the Redfish schema are optional, my understanding after reading the description was that "Created" is when the LogEntry gets created in the LogEntryCollection in the web server (BmcWeb); IIUC, in BmcWeb, new Log Entries are not created until they get queried; "EventTimestamp" on the other hand is when an event originally occurred. The context is that we are implementing both the PULL model and PUSH model of Redfish POST codes and Host Serial Logs, and we care about when events occurred in both models. In the PUSH model, the web server will send an array of "Event", in which there is an "EventTimestamp" attribute that we can use for each event. In the PULL model, we will query the LogEntryCollection in LogService, and currently, there is only "Created" but not "EventTimestamp" in BmcWeb. So we are sending this email to ask for comments. > > > We think that using “EventTimestamp” will be more suitable than > “Created” in LogServices. > Why? Can you give more details here on what you're trying to accomplish? We are talking about the following three options, 1. change all the current "Created" attributes in BmcWeb LogService to "EventTimestamp" 2. keep "Created" as is; add a new attribute "EventTimestamp" 3. keep everything as is; use "Created" to represent "the time that an event occurred" We are fine with either of the three options. The email is to ask the upstream and look for opinions from people. Thanks, Nan On Thu, Apr 8, 2021 at 9:36 AM Ed Tanous <ed@tanous.net> wrote: > On Thu, Apr 8, 2021 at 7:01 AM Alan Kuo (郭振維) <Alan_Kuo@quantatw.com> > wrote: > > > > Hi all, > > > > > > > > In the current implementation of bmcweb LogServices, the time of the > "Created" property is the time when the event is generated, which does not > match the description of the redfish schema. The "Created" property means > the date and time when the log entry was created. > > It should be noted, Created has been present since 1.0.0 of LogEntry, > EventTimestamp was added in LogEntry v1.1.0. Based on the > descriptions, it's not clear to me what the intended difference is, > seeing as how they're both of type Edm.DateTimeOffset. Based on the > description, the two would be identical on an OpenBMC system, the > LogEntry is "Created" at the same time it occurs. > > > > > We think that using “EventTimestamp” will be more suitable than > “Created” in LogServices. > > Why? Can you give more details here on what you're trying to accomplish? > > > > > > > > > Could you give me some suggestion ? Or am I misunderstanding the > definition of schema? > > This is probably a better question for the Redfish forum, unless > there's documentation on what the intended difference between those > two parameters are. > > > > > > > > > Here is an example: > > > > { > > > > "@odata.id": > "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B5-83", > > > > "@odata.type": "#LogEntry.v1_4_0.LogEntry", > > > > "Created": "1970-01-01T00:01:43+00:00", <= It should be > EventTimestamp > > > > "EntryType": "Event", > > > > "Id": "B5-83", > > > > "Message": "Boot Count: 1: TS Offset: 65.4769; POST Code: 0x01", > > > > "MessageArgs": [ > > > > "1", > > > > "65.4769", > > > > "0x01" > > > > ], > > > > "MessageId": "OpenBMC.0.1.BIOSPOSTCode", > > > > "Name": "POST Code Log Entry", > > > > "Severity": "OK" > > > > } > > > > > > > > Thanks, > > > > Alan > > > > > > > > From: openbmc <openbmc-bounces+alan_kuo=quantatw.com@lists.ozlabs.org> > On Behalf Of Harvey Wu (吳崇維) > > Sent: Monday, March 29, 2021 5:14 PM > > To: openbmc@lists.ozlabs.org > > Cc: Duke Du (杜祥嘉) <Duke.Du@quantatw.com>; Fran Hsu (徐誌謙) < > Fran.Hsu@quantatw.com>; George Hung (洪忠敬) <George.Hung@quantatw.com> > > Subject: [phosphor-virtual-sensor] get sensor service fail > > > > > > > > Hi All, > > > > > > > > In current phosphor-virtual-sensor, the function getService will > return empty string only when catch error name = > “xyz.openbmc_project.Common.Error.ResourceNotFound” ( > https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37 > ). > > > > But in my system, when bus call didn’t get sensor service, the > exception name will be “org.freedesktop.DBus.Error.FileNotFound”, and then > service will be get failed. > > > > It seems need to modified the origin condition or add another > elseif condition. Do I misunderstand something? > > > > > > > > > > > > Thanks. > > > > > > > > Harvey Wu > > > > Email: Harvey.Wu@quantatw.com > > > > Ext: 17408 > > > > > [-- Attachment #2: Type: text/html, Size: 7360 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [phosphor-virtual-sensor] get sensor service fail 2021-04-08 17:11 ` Nan Zhou @ 2021-04-08 19:28 ` Ed Tanous 0 siblings, 0 replies; 6+ messages in thread From: Ed Tanous @ 2021-04-08 19:28 UTC (permalink / raw) To: Nan Zhou; +Cc: Alan Kuo (郭振維), openbmc, edtanous On Thu, Apr 8, 2021 at 10:11 AM Nan Zhou <nanzhou@google.com> wrote: > > Hi Ed, > > Thanks for your reply. > > Alan and I were talking about what attribute we should use for "the time that an event occurred", "Created" or "EventTimestamp". Both attributes in the Redfish schema are optional, my understanding after reading the description was that "Created" is when the LogEntry gets created in the LogEntryCollection in the web server (BmcWeb); This is one interpretation, but considering the history that "Created" came first in the schema history, I question that a little. Regardless, in that interpretation, on OpenBMC, "Created" and "EventTimestamp" are identical, as we create the log entry when the event happens. > IIUC, in BmcWeb, new Log Entries are not created until they get queried; "EventTimestamp" on the other hand is when an event originally occurred. > > The context is that we are implementing both the PULL model and PUSH model of Redfish POST codes and Host Serial Logs, and we care about when events occurred in both models. In the PUSH model, the web server will send an array of "Event", in which there is an "EventTimestamp" attribute that we can use for each event. In the PULL model, we will query the LogEntryCollection in LogService, and currently, there is only "Created" but not "EventTimestamp" in BmcWeb. So we are sending this email to ask for comments. This might make sense to have Created and Timestamp be different by some amount of skid (ie, the time it takes to persist the data), but does it actually matter in practice? Let's say for a second that those two timestamps were 5 minutes apart; As a client reading the data what would that convey and what would we do with that information? > >> > >> > We think that using “EventTimestamp” will be more suitable than “Created” in LogServices. >> Why? Can you give more details here on what you're trying to accomplish? > > We are talking about the following three options, > > 1. change all the current "Created" attributes in BmcWeb LogService to "EventTimestamp" This breaks backward compatibility with services that expect Created to be there, so this option is right out. > 2. keep "Created" as is; add a new attribute "EventTimestamp" If we went down this road, I'd really like to get some sort of Redfish forum discussion that clarifies what the difference between these two are, hopefully in the schema description itself. I don't feel like we have enough background from just reading the spec. > 3. keep everything as is; use "Created" to represent "the time that an event occurred" I think for your use case, this is probably fine too, but I'd still like to get clarification. > > We are fine with either of the three options. The email is to ask the upstream and look for opinions from people. Just FYI, you've already included upstream, this is a good thing, no need to email me privately before going straight to the OpenBMC mailing list. Having context on discussions like this helps other people a lot, and gives faster turnarounds on things that affect everyone. > > Thanks, > Nan > > On Thu, Apr 8, 2021 at 9:36 AM Ed Tanous <ed@tanous.net> wrote: >> >> On Thu, Apr 8, 2021 at 7:01 AM Alan Kuo (郭振維) <Alan_Kuo@quantatw.com> wrote: >> > >> > Hi all, >> > >> > >> > >> > In the current implementation of bmcweb LogServices, the time of the "Created" property is the time when the event is generated, which does not match the description of the redfish schema. The "Created" property means the date and time when the log entry was created. >> >> It should be noted, Created has been present since 1.0.0 of LogEntry, >> EventTimestamp was added in LogEntry v1.1.0. Based on the >> descriptions, it's not clear to me what the intended difference is, >> seeing as how they're both of type Edm.DateTimeOffset. Based on the >> description, the two would be identical on an OpenBMC system, the >> LogEntry is "Created" at the same time it occurs. >> >> > >> > We think that using “EventTimestamp” will be more suitable than “Created” in LogServices. >> >> Why? Can you give more details here on what you're trying to accomplish? >> >> > >> > >> > >> > Could you give me some suggestion ? Or am I misunderstanding the definition of schema? >> >> This is probably a better question for the Redfish forum, unless >> there's documentation on what the intended difference between those >> two parameters are. >> >> > >> > >> > >> > Here is an example: >> > >> > { >> > >> > "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B5-83", >> > >> > "@odata.type": "#LogEntry.v1_4_0.LogEntry", >> > >> > "Created": "1970-01-01T00:01:43+00:00", <= It should be EventTimestamp >> > >> > "EntryType": "Event", >> > >> > "Id": "B5-83", >> > >> > "Message": "Boot Count: 1: TS Offset: 65.4769; POST Code: 0x01", >> > >> > "MessageArgs": [ >> > >> > "1", >> > >> > "65.4769", >> > >> > "0x01" >> > >> > ], >> > >> > "MessageId": "OpenBMC.0.1.BIOSPOSTCode", >> > >> > "Name": "POST Code Log Entry", >> > >> > "Severity": "OK" >> > >> > } >> > >> > >> > >> > Thanks, >> > >> > Alan >> > >> > >> > >> > From: openbmc <openbmc-bounces+alan_kuo=quantatw.com@lists.ozlabs.org> On Behalf Of Harvey Wu (吳崇維) >> > Sent: Monday, March 29, 2021 5:14 PM >> > To: openbmc@lists.ozlabs.org >> > Cc: Duke Du (杜祥嘉) <Duke.Du@quantatw.com>; Fran Hsu (徐誌謙) <Fran.Hsu@quantatw.com>; George Hung (洪忠敬) <George.Hung@quantatw.com> >> > Subject: [phosphor-virtual-sensor] get sensor service fail >> > >> > >> > >> > Hi All, >> > >> > >> > >> > In current phosphor-virtual-sensor, the function getService will return empty string only when catch error name = “xyz.openbmc_project.Common.Error.ResourceNotFound” (https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37). >> > >> > But in my system, when bus call didn’t get sensor service, the exception name will be “org.freedesktop.DBus.Error.FileNotFound”, and then service will be get failed. >> > >> > It seems need to modified the origin condition or add another elseif condition. Do I misunderstand something? >> > >> > >> > >> > >> > >> > Thanks. >> > >> > >> > >> > Harvey Wu >> > >> > Email: Harvey.Wu@quantatw.com >> > >> > Ext: 17408 >> > >> > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-04-08 19:29 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-29 9:13 [phosphor-virtual-sensor] get sensor service fail Harvey Wu (吳崇維) 2021-03-29 18:53 ` Matt Spinler 2021-04-08 14:00 ` Alan Kuo (郭振維) 2021-04-08 16:36 ` Ed Tanous 2021-04-08 17:11 ` Nan Zhou 2021-04-08 19:28 ` Ed Tanous
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).