]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
network: explain reason for bandwidth floor rejection
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 16 Apr 2019 16:39:12 +0000 (17:39 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 18 Apr 2019 10:18:43 +0000 (11:18 +0100)
Reword error messages to make it clear that the combined floor settings
of all NICs are exceeding the network inbound peak/average
settings. Including the actual values being checked helps to diagnose
what is actually wrong.

Reviewed-by: Laine Stump <laine@laine.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/network/bridge_driver.c

index 3008846074f6ecfdbfd711d977fdbf139177b156..6ed0bf1e8ebefaf965a85060eb2ad8bb71b75f3b 100644 (file)
@@ -5225,10 +5225,13 @@ networkCheckBandwidth(virNetworkObjPtr obj,
         tmp_new_rate = netBand->in->peak;
         if (tmp_floor_sum > netBand->in->peak) {
             virReportError(VIR_ERR_OPERATION_INVALID,
-                           _("Cannot plug '%s' interface into '%s' because it "
-                             "would overcommit 'peak' on network '%s'"),
+                           _("Cannot plug '%s' interface into '%s' because "
+                             "new combined inbound floor=%llu would overcommit "
+                             "peak=%llu on network '%s'"),
                            ifmac,
                            def->bridge,
+                           tmp_floor_sum,
+                           netBand->in->peak,
                            def->name);
             goto cleanup;
         }
@@ -5236,10 +5239,13 @@ networkCheckBandwidth(virNetworkObjPtr obj,
         /* tmp_floor_sum can be between 'average' and 'peak' iff 'peak' is set.
          * Otherwise, tmp_floor_sum must be below 'average'. */
         virReportError(VIR_ERR_OPERATION_INVALID,
-                       _("Cannot plug '%s' interface into '%s' because it "
-                         "would overcommit 'average' on network '%s'"),
+                       _("Cannot plug '%s' interface into '%s' because "
+                         "new combined inbound floor=%llu would overcommit "
+                         "average=%llu on network '%s'"),
                        ifmac,
                        def->bridge,
+                       tmp_floor_sum,
+                       netBand->in->average,
                        def->name);
         goto cleanup;
     }