Le 30/01/2019 à 16:45, Emmanuel Fusté a écrit : > Le 30/01/2019 à 14:42, Miroslav Lichvar a écrit : >> On Wed, Jan 30, 2019 at 12:02:28PM +0000, FUSTE Emmanuel wrote: >>> Hello, >>> >>> When I lost communication with my grandmaster clock, my local ptp clock >>> is free running and becoming local grandmaster (the port is still slave >>> because of the "slaveOnly" option). >> That doesn't sound right. If the port is configured with the slaveOnly >> option, it should switch to the listening state when the grandmaster >> stops announcing. Without slaveOnly, it should switch to the master >> state. > That is what I expected. But not what I saw with some older versions > of ptp4l (see below). >> >>> In this case, I would like phc2sys stop feeding the ntpshm to allow the >>> ntp daemon (chrony in this case) to select another ntp source, or stop >>> announcing time/pretending serving stratum 0 time. >> It should stop updating the SHM segment when the port is not in the >> slave state. >> >> How exactly do you start phc2sys? With -a -r or -a -r -r? >> > phc2sys in my case started by timemaster with -a -r. > I just do a test on a fresh install (latest git master) and it seems > to work. > > Jan 30 15:56:41 testhost ptp4l: [98619.476] [0:eno2] port 1: SLAVE to > LISTENING on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES > Jan 30 15:56:41 testhost ptp4l: [98619.476] [0:eno2] selected local > clock xxxxxx.xxxx.xxxxxx as best master > Jan 30 15:56:47 testhost ptp4l: [98625.752] [0:eno2] selected local > clock xxxxxx.xxxx.xxxxxx as best master > Jan 30 15:56:54 testhost ptp4l: [98632.252] [0:eno2] selected local > clock xxxxxx.xxxx.xxxxxx as best master > Jan 30 15:57:01 testhost ptp4l: [98639.548] [0:eno2] selected local > clock xxxxxx.xxxx.xxxxxx as best master > Jan 30 15:57:01 testhost ptp4l: [98640.009] [0:eno2] selected best > master clock yyyyyy.yyyy.yyyyyy > Jan 30 15:57:01 testhost ptp4l: [98640.009] [0:eno2] port 1: LISTENING > to UNCALIBRATED on RS_SLAVE > Jan 30 15:57:05 testhost ptp4l: [98644.186] [0:eno2] port 1: > UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED > Jan 30 15:58:27 testhost ptp4l: [98725.328] [0:eno2] port 1: SLAVE to > LISTENING on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES > Jan 30 15:58:27 testhost ptp4l: [98725.328] [0:eno2] selected local > clock xxxxxx.xxxx.xxxxxx as best master > Jan 30 15:58:33 testhost ptp4l: [98731.900] [0:eno2] selected local > clock xxxxxx.xxxx.xxxxxx as best master > Jan 30 15:58:40 testhost ptp4l: [98738.820] [0:eno2] selected local > clock xxxxxx.xxxx.xxxxxx as best master > Jan 30 15:58:45 testhost ptp4l: [98744.023] [0:eno2] selected best > master clock yyyyyy.yyyy.yyyyyy > Jan 30 15:58:45 testhost ptp4l: [98744.023] [0:eno2] port 1: LISTENING > to UNCALIBRATED on RS_SLAVE > Jan 30 15:58:49 testhost ptp4l: [98747.200] [0:eno2] port 1: > UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED > > The logs show "selected local clock xxxxxx.xxxx.xxxxxx as best master" > but as you said, phc2sys seems to have stopped the SHM segment update > (as seen with chronyc). > That was not the case on a older install. > > The actual test was a very quick one. > Before the end of the week, I have a bigger maintenance to do on the > grandmaster with a cut of several minutes. > I will check that the SHM is not updated and that chrony eject the > refclok and get the opportunity to switch to another source. Hello,
I confirm : all is ok. phc2sys correctly stop updating the shm segment when the grand master stop responding. Sorry for the false alarm. Thank you. Emmanuel. _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel