Skip to content

Commit

Permalink
nirmata_test.sh updated to include tests for containerd. README.md up…
Browse files Browse the repository at this point in the history
…dated to demonstrate containerd and kafka-controller checks.

Signed-off-by: rootxrishabh <[email protected]>
  • Loading branch information
rootxrishabh committed Aug 21, 2024
1 parent 2b35266 commit 8353675
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nirmata_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Testing SELinux
ip_forward enabled
bridge-nf-call-iptables enabled
Docker is active
Containerd is active
Found nirmata-agent.service testing Nirmata agent
Test Nirmata Agent
Nirmata Agent is running
Expand All @@ -86,8 +87,11 @@ Testing Zookeeper pods
zk-0 is zookeeper standalone
Found One Zookeeper Pod.
Testing Kafka pods
Found Kafka Pod kafka-0 1/1 Running 2 3d17h
Found One Kafka Pod.
Found Kafka Pod kafka-0
Testing Kafka controller pods
kafka-0 API is healthy!
Found Kafka Controller Pod kafka-controller-0
kafka-controller-0 API is healthy!
Test completed with warnings.
return is 2
```
18 changes: 18 additions & 0 deletions nirmata_test/nirmata_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,24 @@ else
fi
fi

# tests for containerd
if ! systemctl is-active containerd &>/dev/null ; then
warn 'Containerd service is not active? Maybe you are using some other CRI??'
else
containerdVersion=$(containerd --version | awk '{print $3}')
if [[ $containerdVersion < 1.6.19 ]] ;then
warn 'Install containerd version 1.6.19 or later'
else
CONFIG_FILE="/etc/containerd/config.toml"
if grep -q 'SystemdCgroup = true' "$CONFIG_FILE"; then
good Containerd is active
else
warn "SystemdCgroup is not set to true in $CONFIG_FILE"
fi

fi
fi

#Customers often have time issues, which can cause cert issues. Ex:cert is in future.
if type chronyc &>/dev/null;then
if chronyc activity |grep -q "^0 sources online";then
Expand Down

0 comments on commit 8353675

Please sign in to comment.