> Hello,
> Yes, I'd like to have timeshift by some number of
> seconds, why ?
> The main reason is that developers need to know how
> software will run in 
> particular time (end of month, end of year). So they
> can write and test 
> new software.
> I know, there are other way to test software, but
> this is, I think, most 
> easy way and there is no impact to this software.
> Containers are very good for such environments
> (test&developer) so 
> timeshift it's, I think,  important.

Maybe changes could be made to make that possible, but except for
testing timezone or Y2K/Y2038/whatever transition issues, it might actually
be a bad thing - more overhead for system calls that need to be fast,
more opportunities for people to do something Really Stupid, and that
code would probably get exercised less that would be the case with the
code that leaves the time alone in the non-global zones, so it would tend
to have problems not be discovered/fixed so quickly.

I would suppose there would always be some ways in which a zone was
less flexible (esp. for certain types of testing) than a separate OS
instance.  If a zone could do _everything_ a separate OS instance could do,
it would be no lighter weight, no more efficient, than a virtualized
OS instance.  OTOH, a zone is quicker to set up, and can divide resources
finer than either hardware domains or LDOMs.  If it weren't that you were
running on SPARC, I'd say that virtualization via xen or the like would be
your best bet.  Maybe that will exist there one day, but AFAIK it doesn't now...

For most (esp. in Solaris 10 and later, given that static linking is no longer
supported) software, one could create an LD_PRELOADable wrapper
for various calls that deal with times that allows an environment variable
to contain an offset for them.  I did that just for the heck of it for
Y2K testing, although I don't think anyone used it.  I even posted it
on Usenet, and if you looked you could find it, although I've done that
for you:
http://groups.google.com/group/comp.unix.programmer/msg/e2e19c170232611c?dmode=source&output=gplain

The only problem is that you need to have the same setting
of that environment variable for all processes that need to have a consistent
view of the time via the functions that are wrapped (not to mention
whether you want to also offset stuff like file timestamps and so on).
Still, I suppose there are other examples of that sort of thing available
if you scrounge a little...maybe one of them would do the trick for you.
 
 
This message posted from opensolaris.org

Reply via email to