bmc_monitor_app: Add retry for getting BMC boot time
Boot monotonic time might not be ready when this daemon tries to get
them. So we should add retry flow to ensure we can get the correct value
when it's ready.
Tested:
```
\# Before
bmc$ busctl call --verbose com.google.gbmc.boot_time_monitor /xyz/openbmc_project/time/boot/bmc xyz.openbmc_project.Time.Boot.Duration GetAdditionalDurations
MESSAGE "a(sx)" {
ARRAY "(sx)" {
STRUCT "sx" {
STRING "Firmware";
INT64 0;
};
STRUCT "sx" {
STRING "Loader";
INT64 0;
};
STRUCT "sx" {
STRING "Kernel";
INT64 6122;
};
STRUCT "sx" {
STRING "InitRD";
INT64 0;
};
STRUCT "sx" {
STRING "Userspace";
INT64 18446744073683234; <-- overflow
};
};
};
\# After
bmc$ busctl call --verbose com.google.gbmc.boot_time_monitor /xyz/openbmc_project/time/boot/bmc xyz.openbmc_project.Time.Boot.Duration GetAdditionalDurations
MESSAGE "a(sx)" {
ARRAY "(sx)" {
STRUCT "sx" {
STRING "Firmware";
INT64 0;
};
STRUCT "sx" {
STRING "Loader";
INT64 0;
};
STRUCT "sx" {
STRING "Kernel";
INT64 6409;
};
STRUCT "sx" {
STRING "InitRD";
INT64 0;
};
STRUCT "sx" {
STRING "Userspace";
INT64 339796; <-- no overflow
};
};
};
```
Google-Bug-Id: 296787899
Google-Bug-Id: 296791279
Change-Id: I174dfd453d8163225597ce1477b10e2da73fa280
Signed-off-by: Michael Shen <gpgpgp@google.com>
1 file changed