From bb8a6f45cbabb1db11fbcbfda5e2a3c97ffd0dd5 Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Wed, 2 Mar 2016 15:11:24 -0500 Subject: [PATCH] afsd: deprecate afsd -settime Print a warning message if -settime is given and update the afsd man page to declare that -settime is deprecated. Thanks to Stephan Wiesand for suggesting this change. This is a 1.6.x specific change. Change-Id: Iab3f9aa602552e88d74b04e4628c7af13e0439e3 Reviewed-on: https://gerrit.openafs.org/12207 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand --- doc/man-pages/pod8/afsd.pod | 28 +++++++++++----------------- src/afsd/afsd.c | 4 +++- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/doc/man-pages/pod8/afsd.pod b/doc/man-pages/pod8/afsd.pod index 3e90c355d..4add789c6 100644 --- a/doc/man-pages/pod8/afsd.pod +++ b/doc/man-pages/pod8/afsd.pod @@ -242,15 +242,6 @@ Sets the number of I entries available in machine memory for caching status information about cached AFS files. The default is based on the size of the cache. Use the B<-stat> argument to override the default. -=item * - -If the B<-settime> option is specified, then it randomly selects a file -server machine in the local cell as the source for the correct time. Every -five minutes thereafter, the local clock is adjusted (if necessary) to -match the file server machine's clock. This is not enabled by default. It -is recommended, instead, that the Network Time Protocol Daemon be used to -synchronize the time. - =back In addition to setting cache configuration parameters, the B program @@ -639,12 +630,8 @@ mounted in /Network/afs like other network file systems. =item B<-nosettime> -This is enabled by default. It prevents the Cache Manager from -synchronizing its clock with the clock on a server machine selected at -random by checking the time on the server machine every five minutes. -This is the recommended behavior; instead of the AFS Cache Manager, the -Network Time Protocol Daemon should be used to synchronize the system -time. +This option is obsolete and no longer has any effect. The operating system +provided time keeping services should be used to maintain the system time. =item B<-prealloc> > @@ -701,8 +688,15 @@ improve OpenAFS client performance in some circumstances. =item B<-settime> -Enable native AFS time synchronization. This option is the opposite of -B<-nosettime> and cannot be used with the B<-nosettime> option. +The B<-settime> option is deprecated and should no longer be specified. The +operating system provided time keeping services should be used to maintain the +system time. + +The B<-settime> option enables the native AFS time synchronization. If the +B<-settime> option is specified, then a randomly selected a file server machine +in the local cell is used as the source for the correct time. Every five minutes +thereafter, the local clock is adjusted (if necessary) to match the file server +machine's clock. =item B<-shutdown> diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 141dc6974..0d5f41354 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -30,7 +30,7 @@ * -mountdir The directory on which the AFS is to be mounted. * -confdir The configuration directory . * -nosettime Don't keep checking the time to avoid drift (default). - * -settime Keep checking the time to avoid drift. + * -settime Keep checking the time to avoid drift (deprecated). * -rxmaxmtu Set the max mtu to help with VPN issues. * -verbose Be chatty. * -disable-dynamic-vcaches Disable the use of -stat value as the starting size of @@ -1715,6 +1715,7 @@ mainproc(struct cmd_syndesc *as, void *arock) } if (as->parms[8].items) { /* -nosettime */ + printf("afsd: -nosettime is deprecated -- ignored\n"); cacheSetTime = 0; } if (as->parms[9].items) { @@ -1847,6 +1848,7 @@ mainproc(struct cmd_syndesc *as, void *arock) } if (as->parms[32].items) { /* -settime */ + printf("afsd: -settime is deprecated\n"); cacheSetTime = 1; } -- 2.39.5