From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EB12C433ED for ; Thu, 8 Apr 2021 17:12:16 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0BC5610CB for ; Thu, 8 Apr 2021 17:12:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0BC5610CB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FGSVk2mfJz309c for ; Fri, 9 Apr 2021 03:12:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=F6Fq8vw8; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=google.com (client-ip=2a00:1450:4864:20::536; helo=mail-ed1-x536.google.com; envelope-from=nanzhou@google.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=F6Fq8vw8; dkim-atps=neutral Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FGSVF3CnCz304Y for ; Fri, 9 Apr 2021 03:11:47 +1000 (AEST) Received: by mail-ed1-x536.google.com with SMTP id h10so3288246edt.13 for ; Thu, 08 Apr 2021 10:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=len5q6ftWHFznSCVqncq2BhfbayA9/gtOL1GEOwrEWQ=; b=F6Fq8vw8avHv5sulDkJu+HLVzDl0b2EQnVdZaqVJ47XzmWZaOu2IGkQOUjpBw7UPgZ BHYM7xawyl0wiautqXILY5+q+vlofVXD5AsgaCwLj4JBg583Xl/Sic+eie8c9tokGYu1 oytHwUAyFrXIywzBb7c9RKIo9kTdDrakFT9AJ1pkAGpxZz4WK7ipIfH6RT4JdyNW+MKc zrkGNX0WMD4B5hsqQVm6NfNX1KF723ip4AQLuTmkWzs0lfyzYdv9OLkbNufEnuWRNjkI AXuHh2r/wRXRC5VaQx19NWIankzlz9FpnBH0tB+3DM1JtMlXipSSBPAKGzUzzZTH6IAA pL8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=len5q6ftWHFznSCVqncq2BhfbayA9/gtOL1GEOwrEWQ=; b=je1ZRLzwbEFbeaqU3TtaYafyShcXkXDR5GmdOJx1ea+hyHNIH4POSc6pdeSAHir4BQ MFV8SKU5WN+ISgpV+CFNkewySx/T714LDnwOrBM3BA3z0CQ9xgo/5T5L9T7SWzSC5+Qs +DVf2U4GovvdbMf1cd3vM7WXyQm/qF77Qhhv5ejaH7W0j4e+poviGRGZ1x8VBle5XEGB UR31TjQ2RplozU1pgxaE6gG0WkhlSz8MWqzOufgtLJ16ciCJzBD65jVGe/5iKfnQjgcA pu1X4iPYwrX9ypODHyGBoGuQFRnJ8Bj0oP1TDcpO/ht+CRPTcO9IL15HNkyO63VQw9qt Ijdw== X-Gm-Message-State: AOAM532mOyV0okYvKeYgwHHtYX1L8fS/ec8lxZY0OJw0ot5zPa4ea508 VGqYY2aHtqf8YblabPd2FJrD431Jq6Icg/wTdOUeQg== X-Google-Smtp-Source: ABdhPJx17W9OQvitQ++dvul/yP5l/V92x3BhUCNDoGT3h393CJkuTSx5tlor3Mgue71nxpOQFuD79QXGNLwp2zPjm7M= X-Received: by 2002:aa7:de8b:: with SMTP id j11mr12881199edv.363.1617901898240; Thu, 08 Apr 2021 10:11:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nan Zhou Date: Thu, 8 Apr 2021 10:11:27 -0700 Message-ID: Subject: Re: [phosphor-virtual-sensor] get sensor service fail To: Ed Tanous Content-Type: multipart/alternative; boundary="000000000000ed817b05bf7923e0" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?B?QWxhbiBLdW8gKOmDreaMr+e2rSk=?= , "openbmc@lists.ozlabs.org" , "edtanous@google.com" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" --000000000000ed817b05bf7923e0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =E2=80=9CEventTimestamp=E2=80=9D will be more suita= ble than > =E2=80=9CCreated=E2=80=9D 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 wrote: > On Thu, Apr 8, 2021 at 7:01 AM Alan Kuo (=E9=83=AD=E6=8C=AF=E7=B6=AD) > 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 no= t > 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 =E2=80=9CEventTimestamp=E2=80=9D will be more suita= ble than > =E2=80=9CCreated=E2=80=9D 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", <=3D 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 > On Behalf Of Harvey Wu (=E5=90=B3=E5=B4=87=E7=B6=AD) > > Sent: Monday, March 29, 2021 5:14 PM > > To: openbmc@lists.ozlabs.org > > Cc: Duke Du (=E6=9D=9C=E7=A5=A5=E5=98=89) ; Fran = Hsu (=E5=BE=90=E8=AA=8C=E8=AC=99) < > Fran.Hsu@quantatw.com>; George Hung (=E6=B4=AA=E5=BF=A0=E6=95=AC) > > Subject: [phosphor-virtual-sensor] get sensor service fail > > > > > > > > Hi All, > > > > > > > > In current phosphor-virtual-sensor, the function getService wil= l > return empty string only when catch error name =3D > =E2=80=9Cxyz.openbmc_project.Common.Error.ResourceNotFound=E2=80=9D ( > https://github.com/openbmc/phosphor-virtual-sensor/blob/master/dbusUtils.= hpp#L37 > ). > > > > But in my system, when bus call didn=E2=80=99t get sensor servi= ce, the > exception name will be =E2=80=9Corg.freedesktop.DBus.Error.FileNotFound= =E2=80=9D, 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 > > > > > --000000000000ed817b05bf7923e0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ed,=C2=A0

Thanks for your reply.=C2= =A0

Alan and I were talking about what attribute w= e 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=C2=A0was that= "Created" is when the LogEntry gets created in the LogEntryColle= ction in the web server (BmcWeb); IIUC, in BmcWeb, new Log Entries=C2=A0are= not created until they get queried; "EventTimestamp" on the othe= r hand is when an event originally occurred.=C2=A0

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.=C2=A0 In the PUSH model, the web server will send = an array of "Event", in which there is an "EventTimestamp&qu= ot; attribute that we can use for each event. In the PULL model, we will qu= ery the LogEntryCollection in LogService, and currently, there is only &quo= t;Created" but not "EventTimestamp" in BmcWeb. So we are sen= ding this email to ask for comments.=C2=A0=C2=A0

>
> We think that using =E2=80=9CEventTimestamp=E2=80= =9D will be more suitable than =E2=80=9CCreated=E2=80=9D in LogServices.
Why?= =C2=A0 Can you give more details here on what you're trying to accompli= sh?
We are talking about the following three options,

1. change all the current "Created" attribut= es in BmcWeb LogService to "EventTimestamp"=C2=A0
2. ke= ep "Created" as is; add a new attribute=C2=A0"EventTimestamp= "
3. keep everything as is; use "Created"=C2=A0to = represent=C2=A0"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.=C2=A0=C2=A0

<= /div>
Thanks,
Nan

<= div dir=3D"ltr" class=3D"gmail_attr">On Thu, Apr 8, 2021 at 9:36 AM Ed Tano= us <ed@tanous.net> wrote:
On Thu, Apr 8, 2021 at= 7:01 AM Alan Kuo (=E9=83=AD=E6=8C=AF=E7=B6=AD) <Alan_Kuo@quantatw.com> wrote: >
> Hi all,
>
>
>
> In the current implementation of bmcweb LogServices, the time of the &= quot;Created" property is the time when the event is generated, which = does not match the description of the redfish schema. The "Created&quo= t; 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.=C2=A0 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.=C2=A0 Based on t= he
description, the two would be identical on an OpenBMC system, the
LogEntry is "Created" at the same time it occurs.

>
> We think that using =E2=80=9CEventTimestamp=E2=80=9D will be more suit= able than =E2=80=9CCreated=E2=80=9D in LogServices.

Why?=C2=A0 Can you give more details here on what you're trying to acco= mplish?

>
>
>
> Could you give me some suggestion ? Or am I misunderstanding the defin= ition 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:
>
> {
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"@odata.id": "/redfish/v1/Systems/s= ystem/LogServices/PostCodes/Entries/B5-83",
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"@odata.type": "#LogEntry.v1_= 4_0.LogEntry",
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"Created": "1970-01-01T00:01:= 43+00:00",=C2=A0 =C2=A0 <=3D=C2=A0 It should be EventTimestamp
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"EntryType": "Event", >
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"Id": "B5-83",
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"Message": "Boot Count: 1: TS= Offset: 65.4769; POST Code: 0x01",
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"MessageArgs": [
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"1",
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"65.4769",
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"0x01"
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0],
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"MessageId": "OpenBMC.0.1.BIO= SPOSTCode",
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"Name": "POST Code Log Entry&= quot;,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"Severity": "OK"
>
> }
>
>
>
> Thanks,
>
> Alan
>
>
>
> From: openbmc <openbmc-bounces+alan_kuo=3Dquantatw.com@lists.ozlabs.org= > On Behalf Of Harvey Wu (=E5=90=B3=E5=B4=87=E7=B6=AD)
> Sent: Monday, March 29, 2021 5:14 PM
> To: open= bmc@lists.ozlabs.org
> Cc: Duke Du (=E6=9D=9C=E7=A5=A5=E5=98=89) <Duke.Du@quantatw.com>; Fran Hsu (= =E5=BE=90=E8=AA=8C=E8=AC=99) <Fran.Hsu@quantatw.com>; George Hung (=E6=B4=AA=E5= =BF=A0=E6=95=AC) <George.Hung@quantatw.com>
> Subject: [phosphor-virtual-sensor] get sensor service fail
>
>
>
> Hi All,
>
>
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0In current phosphor-virtual-sensor, t= he function getService will return empty string only when catch error name = =3D =E2=80=9Cxyz.openbmc_project.Common.Error.ResourceNotFound=E2=80=9D (https://github.com/ope= nbmc/phosphor-virtual-sensor/blob/master/dbusUtils.hpp#L37).
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0But in my system, when bus call didn= =E2=80=99t get sensor service, the exception name will be =E2=80=9Corg.free= desktop.DBus.Error.FileNotFound=E2=80=9D, and then service will be get fail= ed.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0It seems need to modified the origin = condition or add another elseif condition. Do I misunderstand something? >
>
>
>
>
> Thanks.
>
>
>
> Harvey Wu
>
> Email: Har= vey.Wu@quantatw.com
>
> Ext: 17408
>
>
--000000000000ed817b05bf7923e0--