forked from yunify/qingstor-csi
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. support more parameters of neonsan create_volume
2. judge if device readable, before mount 3. keep idempotent of node operation 4. add correct parameters for clone 5. fix documents error 6. add install script of neonsan-plugin
- Loading branch information
Showing
17 changed files
with
318 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
status=$(systemctl is-active neonsan-plugin) | ||
if [[ ${status} = "active" ]]; then | ||
echo "neonsan-plugin is active, stop it " | ||
systemctl stop neonsan-plugin | ||
fi | ||
|
||
podName=$(kubectl -n kube-system get pod -l app=csi-neonsan,role=controller --field-selector=status.phase=Running -o name | head -1 | awk -F'/' '{print $2}') | ||
if test -z ${podName}; then | ||
echo "no controller pod, failed to start, please check" | ||
exit 1 | ||
fi | ||
|
||
kubectl -n kube-system -c csi-neonsan cp ${podName}:neonsan-csi-driver /usr/bin/neonsan-plugin | ||
chmod +x /usr/bin/neonsan-plugin | ||
|
||
cat > /etc/systemd/system/neonsan-plugin.service <<EOF | ||
[Unit] | ||
Description=NeonSAN CSI Plugin | ||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/neonsan-plugin --endpoint=unix:///var/lib/kubelet/plugins/neonsan.csi.qingstor.com/csi.sock | ||
Restart=on-failure | ||
StartLimitBurst=3 | ||
StartLimitInterval=60s | ||
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
|
||
systemctl daemon-reload | ||
systemctl enable neonsan-plugin | ||
systemctl start neonsan-plugin | ||
|
||
status=$(systemctl is-active neonsan-plugin) | ||
if [[ ${status} = "active" ]]; then | ||
echo "neonsan-plugin start successfully" | ||
else | ||
echo "neonsan-plugin failed to start, please check" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.