manager cli: output more info when transforming prune jobs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-01 15:09:20 +02:00
parent 6d89534929
commit 3dc8783af7

View File

@ -198,7 +198,7 @@ pub(crate) fn update_to_prune_jobs_config() -> Result<(), Error> {
"dropping prune job without schedule from datastore '{store}' in datastore.cfg"
);
} else {
eprintln!("ignoring empty prune job of datastore {store} in datastore.cfg");
eprintln!("ignoring empty prune job of datastore '{store}' in datastore.cfg");
}
continue;
}
@ -207,12 +207,12 @@ pub(crate) fn update_to_prune_jobs_config() -> Result<(), Error> {
let mut id = format!("storeconfig-{store}");
id.truncate(32);
if data.sections.contains_key(&id) {
eprintln!("skipping existing converted prune job for datastore {store}: {id}");
eprintln!("skipping existing converted prune job for datastore '{store}': {id}");
continue;
}
if !options.keeps_something() {
eprintln!("dropping empty prune job of datastore {store} in datastore.cfg");
eprintln!("dropping empty prune job of datastore '{store}' in datastore.cfg");
continue;
}
@ -229,6 +229,10 @@ pub(crate) fn update_to_prune_jobs_config() -> Result<(), Error> {
data.sections
.insert(id, ("prune".to_string(), prune_config));
eprintln!(
"migrating prune job of datastore '{store}' from datastore.cfg to prune.cfg jobs"
);
}
prune::save_config(&data)?;