Remove volume handling

This commit is contained in:
Daniel Berteaud 2023-08-17 13:48:34 +02:00
parent 92a01638f1
commit b38d15e4c4
2 changed files with 2 additions and 21 deletions

View File

@ -3,7 +3,7 @@ _ctctl(){
_init_completion || return
case $prev in
auth|disconnect|render|current|tokens|list|build|build-no-cache|volumes|logs|conf)
auth|disconnect|render|current|tokens|list|build|build-no-cache|logs|conf)
return
;;
switch)
@ -12,7 +12,7 @@ _ctctl(){
;;
esac
COMPREPLY=($(compgen -W 'auth switch current disconnect render prep tokens list build build-no-cache volumes logs conf' -- "$cur"))
COMPREPLY=($(compgen -W 'auth switch current disconnect render prep tokens list build build-no-cache logs conf' -- "$cur"))
} &&
complete -F _ctctl ctctl

19
ctctl
View File

@ -448,21 +448,6 @@ print_tokens(){
fi
}
# Handle CSI volumes definition
handle_volumes(){
if [ -d ./volumes ]; then
for FILE in $(ls ./volumes/*.hcl 2>/dev/null); do
echo "Handling volume definition ${FILE}"
# Linstor volumes are just registered, while the other are created
if [[ "$FILE" =~ ^linstor-.* ]]; then
replace_conf_var ${FILE} | nomad volume register -
else
replace_conf_var ${FILE} | nomad volume create -
fi
done
fi
}
# Follow current jobs logs
job_logs(){
# Remove the first arg passed to ctctl, which is logs
@ -579,10 +564,6 @@ case $1 in
build_required_images
renew_leases
;;
volumes)
handle_volumes
renew_leases
;;
build)
build_selected_images
renew_leases