* How to deal with incorrect firmware image in phosphor-bmc-code-mgmt? @ 2019-05-08 8:35 Troy Lee 2019-05-08 8:56 ` Lei YU 0 siblings, 1 reply; 4+ messages in thread From: Troy Lee @ 2019-05-08 8:35 UTC (permalink / raw) To: OpenBMC Maillist Greeting, With the method xyz.openbmc_project.Common.TFTP.DownloadViaTFTP, does OpenBMC have a way to know that TFTP download status(completed) and the downloaded image is incorrect? It would not be a problem if the image is correct, since we'll have an InterfacesAdded signal. But if the image is incorrect (untar failure/signature mismatch), we'll only have an error log entry generated. Or if the image has the same version id with currently running image, the behavior will become unexpected. Because we have another service wants to integrate with firmware update service, having a way to confirm the image file is nice to have. Thanks, Troy Lee -- Yu-Ting Lee (Troy Lee) <LeeTroy@gmail.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to deal with incorrect firmware image in phosphor-bmc-code-mgmt? 2019-05-08 8:35 How to deal with incorrect firmware image in phosphor-bmc-code-mgmt? Troy Lee @ 2019-05-08 8:56 ` Lei YU 2019-05-13 16:32 ` Adriana Kobylak 0 siblings, 1 reply; 4+ messages in thread From: Lei YU @ 2019-05-08 8:56 UTC (permalink / raw) To: Troy Lee; +Cc: OpenBMC Maillist On Wed, May 8, 2019 at 4:37 PM Troy Lee <leetroy@gmail.com> wrote: > > Greeting, > > With the method xyz.openbmc_project.Common.TFTP.DownloadViaTFTP, > does OpenBMC have a way to know that TFTP download status(completed) > and the downloaded image is incorrect? > > It would not be a problem if the image is correct, since we'll have an > InterfacesAdded signal. > But if the image is incorrect (untar failure/signature mismatch), > we'll only have an error log entry generated. What is the expected behavior if the image is incorrect? > Or if the image has the same version id with currently running image, > the behavior will become unexpected. I met this problem before, and I think we may discuss the expected behavior, and fix this case. > > Because we have another service wants to integrate with firmware > update service, having a way to confirm the image file is nice to > have. > > Thanks, > Troy Lee > -- > Yu-Ting Lee (Troy Lee) <LeeTroy@gmail.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to deal with incorrect firmware image in phosphor-bmc-code-mgmt? 2019-05-08 8:56 ` Lei YU @ 2019-05-13 16:32 ` Adriana Kobylak 2019-05-14 9:26 ` Troy Lee 0 siblings, 1 reply; 4+ messages in thread From: Adriana Kobylak @ 2019-05-13 16:32 UTC (permalink / raw) To: Lei YU; +Cc: Troy Lee, OpenBMC Maillist, openbmc On 2019-05-08 03:56, Lei YU wrote: > On Wed, May 8, 2019 at 4:37 PM Troy Lee <leetroy@gmail.com> wrote: >> >> Greeting, >> >> With the method xyz.openbmc_project.Common.TFTP.DownloadViaTFTP, >> does OpenBMC have a way to know that TFTP download status(completed) >> and the downloaded image is incorrect? The challenge is the time that takes to perform the TFTP transfer. A transfer from a remote server can take minutes to complete, which would cause timeouts on the REST server. If we can solve this, then we could return a download status. See issue for reference : https://github.com/openbmc/openbmc/issues/1691 >> >> It would not be a problem if the image is correct, since we'll have an >> InterfacesAdded signal. >> But if the image is incorrect (untar failure/signature mismatch), >> we'll only have an error log entry generated. > > What is the expected behavior if the image is incorrect? > >> Or if the image has the same version id with currently running image, >> the behavior will become unexpected. > > I met this problem before, and I think we may discuss the expected > behavior, > and fix this case. > The current behavior is that a new Version D-Bus object is not created because one already exists. If this is unexpected, what should the expected behavior be? >> >> Because we have another service wants to integrate with firmware >> update service, having a way to confirm the image file is nice to >> have. >> >> Thanks, >> Troy Lee >> -- >> Yu-Ting Lee (Troy Lee) <LeeTroy@gmail.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to deal with incorrect firmware image in phosphor-bmc-code-mgmt? 2019-05-13 16:32 ` Adriana Kobylak @ 2019-05-14 9:26 ` Troy Lee 0 siblings, 0 replies; 4+ messages in thread From: Troy Lee @ 2019-05-14 9:26 UTC (permalink / raw) To: Adriana Kobylak; +Cc: Lei YU, OpenBMC Maillist, openbmc Greeting, Apologize for delayed reply. Since it would not be possible to obtain the percentage of TFTP transmission. It would be nice to know when does TFTP transmission completed. The current behavior, we observed, has slightly different. Before we upload the image, the BMC.Update has the entry of current activated software, but not the Software.Version. After we upload the image into /tmp/images, the entry of Software.Version is generated, and BMC.Update remain the same as before. - We're not able to activate the version from BMC.Updater, because it is already activated. (Expected) - We're not able to deleted the version from Software.Version and /tmp/images, because the delete method is not working if the version is currently activated. Then the image is laying in /tmp/images until next reboot. (Unexpected) https://github.com/openbmc/phosphor-bmc-code-mgmt/blob/991af7ecfb579e72613b6c2ab5036a4dc7834636/item_updater.cpp#L233-L246 ## Before uploading the image ``` root@romulus:~# busctl tree xyz.openbmc_project.Software.BMC.Updater --no-page └─/xyz └─/xyz/openbmc_project └─/xyz/openbmc_project/software └─/xyz/openbmc_project/software/02faf2c1 root@romulus:~# busctl tree xyz.openbmc_project.Software.Version --no-page └─/xyz └─/xyz/openbmc_project └─/xyz/openbmc_project/software ``` ## After uploading the image has the same version ID ``` root@romulus:~# busctl tree xyz.openbmc_project.Software.BMC.Updater --no-page └─/xyz └─/xyz/openbmc_project └─/xyz/openbmc_project/software └─/xyz/openbmc_project/software/02faf2c1 root@romulus:~# busctl tree xyz.openbmc_project.Software.Version --no-page └─/xyz └─/xyz/openbmc_project └─/xyz/openbmc_project/software └─/xyz/openbmc_project/software/02faf2c1 root@romulus:~# busctl call xyz.openbmc_project.Software.Version /xyz/openbmc_project/software/02faf2c1 xyz.openbmc_project.Object.Delete Delete May 14 17:10:06 romulus phosphor-version-software-manager[1180]: Error: Version 02faf2c1 is currently running on the BMC. Unable to remove. root@romulus:~# busctl tree xyz.openbmc_project.Software.Version --no-page └─/xyz └─/xyz/openbmc_project └─/xyz/openbmc_project/software └─/xyz/openbmc_project/software/02faf2c1 root@romulus:~# ls /tmp/images 02faf2c1 root@romulus:~# ls /tmp/images/02faf2c1/ MANIFEST image-kernel image-rofs image-rwfs image-u-boot publickey MANIFEST.sig image-kernel.sig image-rofs.sig image-rwfs.sig image-u-boot.sig publickey.sig ``` Thanks, Yu-Ting Lee (Troy Lee) <LeeTroy@gmail.com> Adriana Kobylak <anoo@linux.ibm.com> 於 2019年5月14日 週二 上午12:32寫道: > > On 2019-05-08 03:56, Lei YU wrote: > > On Wed, May 8, 2019 at 4:37 PM Troy Lee <leetroy@gmail.com> wrote: > >> > >> Greeting, > >> > >> With the method xyz.openbmc_project.Common.TFTP.DownloadViaTFTP, > >> does OpenBMC have a way to know that TFTP download status(completed) > >> and the downloaded image is incorrect? > > The challenge is the time that takes to perform the TFTP transfer. A > transfer from a remote server can take minutes to complete, which would > cause timeouts on the REST server. If we can solve this, then we could > return a download status. > See issue for reference : https://github.com/openbmc/openbmc/issues/1691 > > >> > >> It would not be a problem if the image is correct, since we'll have an > >> InterfacesAdded signal. > >> But if the image is incorrect (untar failure/signature mismatch), > >> we'll only have an error log entry generated. > > > > What is the expected behavior if the image is incorrect? > > > >> Or if the image has the same version id with currently running image, > >> the behavior will become unexpected. > > > > I met this problem before, and I think we may discuss the expected > > behavior, > > and fix this case. > > > > The current behavior is that a new Version D-Bus object is not created > because one already exists. If this is unexpected, what should the > expected > behavior be? > > >> > >> Because we have another service wants to integrate with firmware > >> update service, having a way to confirm the image file is nice to > >> have. > >> > >> Thanks, > >> Troy Lee > >> -- > >> Yu-Ting Lee (Troy Lee) <LeeTroy@gmail.com> > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-14 9:26 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-05-08 8:35 How to deal with incorrect firmware image in phosphor-bmc-code-mgmt? Troy Lee 2019-05-08 8:56 ` Lei YU 2019-05-13 16:32 ` Adriana Kobylak 2019-05-14 9:26 ` Troy Lee
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.