server: bkctld-rm: Add Begining/end log message and invert logging priorities
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
Progress messages are now notice Start/stop messages are info
This commit is contained in:
parent
981b8978e3
commit
ab9327b8b2
2 changed files with 11 additions and 4 deletions
|
@ -19,6 +19,8 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
|||
|
||||
* bkctld-inc: Add log message at begining/end of operations (with the inc name)
|
||||
* bkctld-inc: Inverted log message priorities (progress messages are notice, and start/finish are info)
|
||||
* bkctld-rm: Add log message at begining/end of operations
|
||||
* bkctld-rm: Inverted log message priorities (progress messages are notice, and start/finish are info)
|
||||
* bkctld-status: Disable padding for the last column [#54](https://gitea.evolix.org/evolix/evobackup/pulls/54)
|
||||
|
||||
### Deprecated
|
||||
|
|
|
@ -118,6 +118,8 @@ jails_list=$(jails_with_incs_list)
|
|||
jails_total=$(echo "$jails_list" | wc -w)
|
||||
jails_count=0
|
||||
|
||||
notice "Begining deleting incs for ${jails_total} jails"
|
||||
|
||||
for jail_name in ${jails_list}; do
|
||||
jails_count=$((jails_count+1))
|
||||
incs_policy_file=$(current_jail_incs_policy_file "${jail_name}")
|
||||
|
@ -132,8 +134,8 @@ for jail_name in ${jails_list}; do
|
|||
debug "Incs to be deleted for '${jail_name}' : $(echo "${incs_to_delete}" | tr '\n', ',' | sed 's/,$//')."
|
||||
for inc_name in ${incs_to_delete}; do
|
||||
incs_count=$((incs_count+1))
|
||||
info "Progress: jail ${jails_count} out of ${jails_total} - inc ${incs_count} out of ${incs_total}"
|
||||
notice "Delete inc '${inc_name}' for jail '${jail_name}' : start"
|
||||
notice "Progress: jail ${jails_count} out of ${jails_total} - inc ${incs_count} out of ${incs_total}"
|
||||
info "Delete inc '${inc_name}' for jail '${jail_name}' : start"
|
||||
|
||||
inc_path=$(inc_path "${jail_name}" "${inc_name}")
|
||||
|
||||
|
@ -143,10 +145,10 @@ for jail_name in ${jails_list}; do
|
|||
delete_inc_ext4 "${jail_name}" "${inc_name}"
|
||||
fi
|
||||
|
||||
notice "Delete inc '${inc_name}' for jail '${jail_name}' : finish"
|
||||
info "Delete inc '${inc_name}' for jail '${jail_name}' : finish"
|
||||
done
|
||||
else
|
||||
notice "Skip jail '${jail_name}' : no inc to delete"
|
||||
info "Skip jail '${jail_name}' : no inc to delete"
|
||||
fi
|
||||
else
|
||||
notice "Skip jail '${jail_name}' : incs policy is missing"
|
||||
|
@ -155,6 +157,9 @@ for jail_name in ${jails_list}; do
|
|||
delete_empty_inc "${jail_name}"
|
||||
done
|
||||
|
||||
notice "Finished deleting incs for ${jails_total} jails"
|
||||
|
||||
|
||||
# Remove the lock file and cleanup tmp files
|
||||
rm -f "${lock_file}"
|
||||
cleanup_tmp
|
||||
|
|
Loading…
Add table
Reference in a new issue