openbmc / phosphor-time-manager

Local time policy and emulated host RTC manager
Apache License 2.0
6 stars 10 forks source link

Host can't set the time by default #2

Closed mikey closed 7 years ago

mikey commented 7 years ago

By default, the time owner is 'BMC' which according to this: https://github.com/openbmc/phosphor-time-manager/blob/master/time-config.hpp#L20 Means that the host can't set the time.

In skiboot we see this in the logs

[658087.142960288,7] BT: seq 0x7e netfn 0x0a cmd 0x49: Message sent to host [658087.160466736,7] BT: seq 0x7e netfn 0x0a cmd 0x49: IPMI MSG done [658087.160469712,7] IPMI: Got error response 0xff

Which I believe is skiboot trying to send an IPMI SET_SEL_TIME command and it failing.

Host uses expect to be able to set the time without having to do BMC specific commands. Redhat have already reported a bug against witherspoon.

Please change the default settings so that the host is able to set the time.

vishwabmc commented 7 years ago

@mikey and I talked over Slack and I see its reasonable to make SPLIT a default one.

mikey commented 7 years ago

Just so it's documented, to switch to SPLIT currently, you need to:

  1. power off the host
  2. on the BMC do busctl call org.openbmc.settings.Host /org/openbmc/settings/host0 org.freedesktop.DBus.Properties Set ssv org.openbmc.settings.Host time_owner s SPLIT
  3. power on the host

then the host can set the time.

williamspatrick commented 7 years ago

Should 'split' or 'host' be the default? I suspect it depends on the target user for the machine.

mikey commented 7 years ago

Sorry for the slow response... I think 'split' but 'host' would probably be ok.

vishwabmc commented 7 years ago

We plan to make BOTH as the default owner

fnovak commented 7 years ago

Is this in a firmware build yet? If so, what build?

vishwabmc commented 5 years ago

For my reference : I was asked to see bug 179399 and this is what I put there.

Please refer to : https://github.com/openbmc/phosphor-time-manager

section: To change owner

### With busctl on BMC
busctl set-property xyz.openbmc_project.Settings \
    /xyz/openbmc_project/time/owner xyz.openbmc_project.Time.Owner \
    TimeOwner s xyz.openbmc_project.Time.Owner.Owners.SPLIT

### With REST API on remote host
curl -c cjar -b cjar -k -H "Content-Type: application/json" -X  PUT  -d \
    '{"data": "xyz.openbmc_project.Time.Owner.Owners.SPLIT" }' \
    https://${BMC_IP}/xyz/openbmc_project/time/owner/attr/TimeOwner