]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: eliminate erroneous VIR_WARNs in (eb|ip)tables.c
authorLaine Stump <laine@laine.org>
Wed, 22 Aug 2012 20:00:28 +0000 (16:00 -0400)
committerLaine Stump <laine@laine.org>
Thu, 23 Aug 2012 02:44:17 +0000 (22:44 -0400)
Several VIR_DEBUG()'s were changed to VIR_WARN() while I was testing
the firewalld support patch, and I neglected to change them back
before I pushed.

In the meantime I've decided that it would be useful to have them be
VIR_INFO(), just so there will be logged evidence of which method is
being used (firewall-cmd vs. (eb|ip)tables) without needing to crank
logging to 11. (at most this adds 2 lines to libvirtd's logs per
libvirtd start).

src/util/ebtables.c
src/util/iptables.c

index 1a78f891ffcd5ae12a8dd5a59b84299d603f1b0a..3e27bb6f443efdfcf9258b3012881a7cb57b6af0 100644 (file)
@@ -55,7 +55,7 @@ virEbTablesOnceInit(void)
 {
     firewall_cmd_path = virFindFileInPath("firewall-cmd");
     if (!firewall_cmd_path) {
-        VIR_WARN("firewall-cmd not found on system. "
+        VIR_INFO("firewall-cmd not found on system. "
                  "firewalld support disabled for ebtables.");
     } else {
         virCommandPtr cmd = virCommandNew(firewall_cmd_path);
@@ -63,11 +63,11 @@ virEbTablesOnceInit(void)
 
         virCommandAddArgList(cmd, "--state", NULL);
         if (virCommandRun(cmd, &status) < 0 || status != 0) {
-            VIR_WARN("firewall-cmd found but disabled for ebtables");
+            VIR_INFO("firewall-cmd found but disabled for ebtables");
             VIR_FREE(firewall_cmd_path);
             firewall_cmd_path = NULL;
         } else {
-            VIR_WARN("using firewalld for ebtables commands");
+            VIR_INFO("using firewalld for ebtables commands");
         }
         virCommandFree(cmd);
     }
index d8fdd3b425241b353fec606c3f1cdfc94264ee19..dee1d26c0d2ef125cb7402c3b47a9c291a59ee16 100644 (file)
@@ -53,7 +53,7 @@ virIpTablesOnceInit(void)
 {
     firewall_cmd_path = virFindFileInPath("firewall-cmd");
     if (!firewall_cmd_path) {
-        VIR_WARN("firewall-cmd not found on system. "
+        VIR_INFO("firewall-cmd not found on system. "
                  "firewalld support disabled for iptables.");
     } else {
         virCommandPtr cmd = virCommandNew(firewall_cmd_path);
@@ -61,11 +61,11 @@ virIpTablesOnceInit(void)
 
         virCommandAddArgList(cmd, "--state", NULL);
         if (virCommandRun(cmd, &status) < 0 || status != 0) {
-            VIR_WARN("firewall-cmd found but disabled for iptables");
+            VIR_INFO("firewall-cmd found but disabled for iptables");
             VIR_FREE(firewall_cmd_path);
             firewall_cmd_path = NULL;
         } else {
-            VIR_WARN("using firewalld for iptables commands");
+            VIR_INFO("using firewalld for iptables commands");
         }
         virCommandFree(cmd);
     }