Linux time chaos
Linux time chaos injects chaos to change the time of the Linux machine.
Use cases
- Induces time chaos to change the system time on the target Linux machines.
- Determines the resiliency of the underlying application components when subjected to a change in the system time.
note
- This fault can be executed on Ubuntu 16 or higher, Debian 10 or higher, CentOS 7 or higher, RHEL 7 or higher, Fedora 30 or higher, and openSUSE LEAP 15.4 or higher.
- The
linux-chaos-infrastructure
systemd service should be in an active state, and the infrastructure should be inCONNECTED
state.
Fault permissions
The fault uses the root
Linux user and root
user group.
Fault tunables
Optional tunables
Tunable | Description | Notes |
---|---|---|
offset | Time offset to increment or decrement the system time. Should be provided in (+/-)[numeric-hours]h[numeric-minutes]m[numeric-seconds]s format. | For example: +24h , -13h12m , -3h12m16s |
disableNTP | Set it to disable the NTP server. | Defaults to true |
duration | Duration through which chaos is injected into the target resource (in seconds). | Default: 30s |
rampTime | Period to wait before and after injecting chaos (in seconds). | Default: 0s |
Offset
The offset
input variable increments and decrements the system time using time offset. It is specified in (+/-)[numeric-hours]h[numeric-minutes]m[numeric-seconds]s format.
The following YAML snippet illustrates the use of this environment variable:
# time offset
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-time-chaos
labels:
name: time-chaos
spec:
timeChaos/inputs:
offset: '+1h30m'
DisableNTP
The disableNTP
input variable prevents the fault from disabling the NTP server.
The following YAML snippet illustrates the use of this environment variable:
# disable the ntp server
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-time-chaos
labels:
name: time-chaos
spec:
timeChaos/inputs:
disableNTP: 'true'