systemd-analyze verify /path/to/your/file.service
If set -e
is set, non-zero exit code during script run will terminate the execution.
To prevent immidient termination and add some logic to cleanup stuff, you may need to use trap
command:
#!/usr/bin/env bash
set -e
function cleanup {
echo "Removing $TMP_STUFF_DIR"
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
#!/usr/bin/env bash | |
function perform_backup(){ | |
echo -n "Copying some stuff on S3.." | |
echo "Done!" | |
} | |
perform_backup |
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
#!/usr/bin/env bash | |
CONSUL_ADDR="${CONSUL_ADDR:-http://127.0.0.1:8500}" | |
function create_session(){ | |
local session_id=$(curl -s -XPUT "${CONSUL_ADDR}/v1/session/create" \ | |
-d "{\"Name\": \"backup\"}" | jq -r '.ID' ) | |
echo ${session_id} | |
} |
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
from sklearn import datasets | |
from sklearn import metrics | |
from sklearn.naive_bayes import GaussianNB | |
def get_iris_dataset(): | |
""" | |
Get the iris data set using sklearn library | |
:return: Dictionary-like object | |
""" |
The kubelet
in Openshift is run using hyperkube
.
It is evaluated as a systemd service called origin-node
.
- To view the logs you can use:
$ journalctl -u origin-node
- To check the status simply run:
To inspect the strcut you can use the %+v
interpolation:
fmt.Println(fmt.Sprintf("%+v", myStruct))
$ vault status
Error checking seal status: Get https://172.16.4.117:8200/v1/sys/seal-status: x509: certificate signed by unknown authority
Solution: