Do not print btrfs error in log

Btrfs error are pretty confusing while reading CI logs, while they
are pretty normal to have in case provided directories are not btrfs ones
While this won't be an issue for CentOS 8 which do not have btrfs binary
Ubuntu would claim that provided directories are not btrfs ones or even
do not exist.

Change-Id: I1b932877b1dc57d065e9eebc7cbd20712515efd5
Related-Bug: #1855754
This commit is contained in:
Dmitriy Rabotyagov 2020-12-03 14:09:25 +02:00
parent ce593d8252
commit cea6a459bb

View File

@ -369,13 +369,13 @@ function get_instance_info {
# Storage reports
for dir_name in lxc machines; do
if [ "$(which btrfs)" ]; then
btrfs filesystem usage /var/lib/${dir_name} > \
btrfs filesystem usage /var/lib/${dir_name} 2>/dev/null > \
"/openstack/log/instance-info/btrfs_${dir_name}_usage_${TS}.log" || true
btrfs filesystem show /var/lib/${dir_name} > \
btrfs filesystem show /var/lib/${dir_name} 2>/dev/null > \
"/openstack/log/instance-info/btrfs_${dir_name}_show_${TS}.log" || true
btrfs filesystem df /var/lib/${dir_name} > \
btrfs filesystem df /var/lib/${dir_name} 2>/dev/null > \
"/openstack/log/instance-info/btrfs_${dir_name}_df_${TS}.log" || true
btrfs qgroup show --human-readable -pcre --iec /var/lib/${dir_name} > \
btrfs qgroup show --human-readable -pcre --iec /var/lib/${dir_name} 2>/dev/null > \
"/openstack/log/instance-info/btrfs_${dir_name}_quotas_${TS}.log" || true
fi
done