Question

I want to change the time to the past in cvm.

  • 25 November 2020
  • 3 replies
  • 157 views

Badge +1

As we moved the equipment and started the cluster, the cvm time was changed 1 day ahead. allssh '(/usr/bin/crontab -l &&echo "*/1 * * * * bash -lc /home/nutanix/serviceability/bin/fix_time_drift") | /usr/bin/crontab -' do this allsr/bin/crontab -' allsshrgrefs/'
allssh grep offset ~/data/logs/gencesis.out
================== 192.168.100.15 =================
2020-11-26 11:53:19 INFO time_manager_utils.py:49 NTP offset: 32399.235 seconds
2020-11-26 11:53:49 INFO time_manager_utils.py:49 NTP offset: 32399.235 seconds
2020-11-26 21:14:50 INFO time_manager_utils.py:49 NTP offset: -118793.575 seconds
2020-11-26 21:46:22 INFO time_manager_utils.py:49 NTP offset: -118793.583 seconds
2020-11-26 21:56:52 INFO time_manager_utils.py:49 NTP offset: -118793.586 seconds
2020-11-26 22:07:23 INFO time_manager_utils.py:49 NTP offset: -118793.590 seconds
2020-11-26 22:17:54 INFO time_manager_utils.py:49 NTP offset: -118793.591 seconds
2020-11-26 22:28:24 INFO time_manager_utils.py:49 NTP offset: -118793.594 seconds
2020-11-26 22:38:55 INFO time_manager_utils.py:49 NTP offset: -118793.595 seconds
2020-11-26 22:49:25 INFO time_manager_utils.py:49 NTP offset: -118793.598 seconds
2020-11-26 22:59:55 INFO time_manager_utils.py:49 NTP offset: -118793.601 seconds
2020-11-26 23:10:25 INFO time_manager_utils.py:49 NTP offset: -118792.603 seconds
2020-11-26 23:20:47 INFO time_manager_utils.py:49 NTP offset: -118783.604 seconds
2020-11-26 23:31:07 INFO time_manager_utils.py:49 NTP offset: -118773.606 seconds
2020-11-26 23:41:27 INFO time_manager_utils.py:49 NTP offset: -118763.608 seconds
2020-11-26 23:51:47 INFO time_manager_utils.py:49 NTP offset: -118752.610 seconds
2020-11-27 00:02:07 INFO time_manager_utils.py:49 NTP offset: -118742.612 seconds
2020-11-27 00:12:27 INFO time_manager_utils.py:49 NTP offset: -118732.614 seconds
2020-11-27 00:22:46 INFO time_manager_utils.py:49 NTP offset: -118721.616 seconds
2020-11-27 00:33:06 INFO time_manager_utils.py:49 NTP offset: -118711.618 seconds
2020-11-27 00:43:26 INFO time_manager_utils.py:49 NTP offset: -118701.620 seconds
2020-11-27 00:53:46 INFO time_manager_utils.py:49 NTP offset: -118690.621 seconds
2020-11-27 01:04:06 INFO time_manager_utils.py:49 NTP offset: -118680.623 seconds
2020-11-27 01:14:26 INFO time_manager_utils.py:49 NTP offset: -118670.625 seconds
2020-11-27 01:24:45 INFO time_manager_utils.py:49 NTP offset: -118660.627 seconds
2020-11-27 01:35:05 INFO time_manager_utils.py:49 NTP offset: -118649.629 seconds

1. Is there a way to turn the time back faster?
2. allssh '(/usr/bin/crontab -l &&echo "*/1 * * * * bash -lc /home/nutanix/serviceability/bin/fix_time_drift") | What if the command /usr/bin/crontab -' continues to run after time? Does the cvm time continue to be pushed back or is it stopped by what criteria?


3 replies

Userlevel 2
Badge +4

@hyoung ho Thank you for posting the query. I want to understand if this is a production cluster or a CE. 

If its a production cluster I would recommend please create a case and we do have a method by stopping the cluster setting time correctly. 

If its a CE you can perform the cluster stop and use the date command to set the time correctly and then start the cluster once the time matches to current time. 

Badge +1

We are using a production cluster. I want to change the time to the past without opening the case. Can you figure out how? I asked a question because I wanted to test it with the test equipment first.

Userlevel 2
Badge +4

@hyoung ho 

KB-1656 have the steps, it will be better to test it first on non-production. 

 

Reply