[libvirt] [PATCH] util: eliminate erroneous VIR_WARNs in (eb|ip)tables.c

2012-08-22 Thread Laine Stump
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 | 8 
 src/util/iptables.c | 8 
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/util/ebtables.c b/src/util/ebtables.c
index 1a78f89..3170ab0 100644
--- a/src/util/ebtables.c
+++ b/src/util/ebtables.c
@@ -55,19 +55,19 @@ virEbTablesOnceInit(void)
 {
 firewall_cmd_path = virFindFileInPath(firewall-cmd);
 if (!firewall_cmd_path) {
-VIR_WARN(firewall-cmd not found on system. 
- firewalld support disabled for ebtables.);
+VIR_INFO(firewall-cmd not found on system. 
+  firewalld support disabled for ebtables.);
 } else {
 virCommandPtr cmd = virCommandNew(firewall_cmd_path);
 int status;
 
 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);
 }
diff --git a/src/util/iptables.c b/src/util/iptables.c
index d8fdd3b..8a575c2 100644
--- a/src/util/iptables.c
+++ b/src/util/iptables.c
@@ -53,19 +53,19 @@ virIpTablesOnceInit(void)
 {
 firewall_cmd_path = virFindFileInPath(firewall-cmd);
 if (!firewall_cmd_path) {
-VIR_WARN(firewall-cmd not found on system. 
- firewalld support disabled for iptables.);
+VIR_INFO(firewall-cmd not found on system. 
+  firewalld support disabled for iptables.);
 } else {
 virCommandPtr cmd = virCommandNew(firewall_cmd_path);
 int status;
 
 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);
 }
-- 
1.7.11.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] util: eliminate erroneous VIR_WARNs in (eb|ip)tables.c

2012-08-22 Thread Eric Blake
On 08/22/2012 02:07 PM, Laine Stump wrote:
 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 | 8 
  src/util/iptables.c | 8 
  2 files changed, 8 insertions(+), 8 deletions(-)

ACK.

 
 diff --git a/src/util/ebtables.c b/src/util/ebtables.c
 index 1a78f89..3170ab0 100644
 --- a/src/util/ebtables.c
 +++ b/src/util/ebtables.c
 @@ -55,19 +55,19 @@ virEbTablesOnceInit(void)
  {
  firewall_cmd_path = virFindFileInPath(firewall-cmd);
  if (!firewall_cmd_path) {
 -VIR_WARN(firewall-cmd not found on system. 
 - firewalld support disabled for ebtables.);
 +VIR_INFO(firewall-cmd not found on system. 
 +  firewalld support disabled for ebtables.);

Indentation looks off.

 +++ b/src/util/iptables.c
 @@ -53,19 +53,19 @@ virIpTablesOnceInit(void)
  {
  firewall_cmd_path = virFindFileInPath(firewall-cmd);
  if (!firewall_cmd_path) {
 -VIR_WARN(firewall-cmd not found on system. 
 - firewalld support disabled for iptables.);
 +VIR_INFO(firewall-cmd not found on system. 
 +  firewalld support disabled for iptables.);

and again.

-- 
Eric Blake   ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] util: eliminate erroneous VIR_WARNs in (eb|ip)tables.c

2012-08-22 Thread Laine Stump
On 08/22/2012 05:18 PM, Eric Blake wrote:
 On 08/22/2012 02:07 PM, Laine Stump wrote:
 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 | 8 
  src/util/iptables.c | 8 
  2 files changed, 8 insertions(+), 8 deletions(-)
 ACK.

 diff --git a/src/util/ebtables.c b/src/util/ebtables.c
 index 1a78f89..3170ab0 100644
 --- a/src/util/ebtables.c
 +++ b/src/util/ebtables.c
 @@ -55,19 +55,19 @@ virEbTablesOnceInit(void)
  {
  firewall_cmd_path = virFindFileInPath(firewall-cmd);
  if (!firewall_cmd_path) {
 -VIR_WARN(firewall-cmd not found on system. 
 - firewalld support disabled for ebtables.);
 +VIR_INFO(firewall-cmd not found on system. 
 +  firewalld support disabled for ebtables.);
 Indentation looks off.

Right. Fixed and pushed. Thanks!

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list