the semantics of time-independent zones
Well, after spending a day sifting through Solaris timekeeping code and a few hours hacking (eg. waiting for builds to finish), I managed to get a zone that really couldn't care less about the system time. Great... what?? In all my fervor to get things done, I never stopped to think about some important semantic questions related to having processes running in disparate "times" on the same machine.
- First, it's pretty clear that when the time is changed in a time-independent non-global zone (here abbreviated TWZ as a tribute to my love of the nickname "timewarp zone"), the system time should not be changed, but rather the stored time offset of the TWZ should be altered such that system time + offset = requested TWZ time. However, what about if the global zone time is changed? If I add two hours to the global zone time, do I want my TWZs to also be 2 hours in the future? If they're truly independent, probably not--which means going through all the TWZs and again modifying their offsets accordingly. Is there any reason to not keep them independent (aside from avoiding the overhead of zone offsets)?
- Second, the TWZ shares a filesystem with the global zone. More specifically, the global zone can see the TWZ's files, though not vice-versa. If the TWZ is a year ahead and touches a file, what is the access time as perceived in the global zone? Clearly, the action actually happened right now in the global zone--not a year from now. But, creating this dual-time view of the filesystem is difficult. Consider the case of a TWZ being a year ahead, touching a file, then going yet another year ahead. The TWZ should see that it was created a year ago, while the global zone should see that it was created just then. What information do we need to store this? It's not enough to store the file in "real" system time and then just apply the TWZ offset--if we did that, we'd think that the file was created at the two-year offset. So it seems the only way to maintain the dual-time filesystem illusion is to store yet more information: what zone created it, and at what time offset. And we might not have to just worry about two different times: in the case of shared mounts (NFS), there could be an arbitrary number of different TWZs sharing a filesystem. Suddenly multi-time FS (MTFS?) doesn't seem very viable. If you've made it this far, I'll keep the next ramble shorter:
- Third, and most administratively, is there any need to be able to change the time of a zone from without? Clearly it should be alterable from within; but should there be a facility (eg. zone property) for changing it from the outside? Keep in mind that this could always be solved by use of zlogin [command].
Posted by Brian Utterback on June 20, 2007 at 08:50 AM PDT #
Posted by dan kuebrich on June 20, 2007 at 01:57 PM PDT #
Posted by Adam on June 28, 2007 at 08:19 AM PDT #
Posted by Adam on June 28, 2007 at 08:37 AM PDT #