Bug 1161027 - log SetupNetworks request on failed SetupNetworks
Summary: log SetupNetworks request on failed SetupNetworks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.0.0-alpha
: ---
Assignee: Dan Kenigsberg
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On: 1220838
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-06 08:21 UTC by Martin Pavlik
Modified: 2019-11-14 06:33 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-27 15:03:09 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:
nyechiel: Triaged+


Attachments (Terms of Use)

Description Martin Pavlik 2014-11-06 08:21:57 UTC
Description of problem:
at the moment only in case SetupNetworks runs successfully, the SetupNetworks request is logged into engine log

it would be useful to log also requests on failed SetupNetworks for debugging purposes 

Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Manager Version: 3.5.0-0.18.beta.el6ev

Comment 1 Lior Vernia 2014-11-06 10:19:27 UTC
Pushing back as there doesn't seem to be any specific urgency...

Comment 2 Lior Vernia 2015-03-18 15:35:20 UTC
This seems to work on the master branch towards 3.6 (I think I may have fixed it by accident as part of the Host Network QoS feature, when meddling with the serialization of Setup Networks command parameters to the log).

At least when there are certain types of failures (connectivity failure for me).

Please verify that this indeed satisfies what you meant.

Comment 3 Martin Pavlik 2015-03-18 15:43:00 UTC
VERIFIED, it seems to work

2015-03-18 11:55:02,364 WARN  [org.ovirt.engine.core.bll.network.host.SetupNetworksCommand] (ajp-/127.0.0.1:8702-14) [host_nics_syncAction_636f3987-406f-44cd] CanDoAction of action SetupNetworks failed for user vdcadmin.tlv.redhat.com. Reasons: VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS,$NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS_LIST golden_env_mixed_virtio_0,NETWORK_INTERFACES_ALREADY_SPECIFIED,$NETWORK_INTERFACES_ALREADY_SPECIFIED_LIST bond0, enp2s0f0, enp2s0f1, bond0, enp2s0f0, enp2s0f1
2015-03-18 11:55:02,370 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-14) Operation Failed: [Cannot setup Networks. The following VMs are actively using the Logical Network: golden_env_mixed_virtio_0. Please stop the VMs and try again., Cannot setup Networks. The following Network Interfaces were specified more than once: bond0, enp2s0f0, enp2s0f1, bond0, enp2s0f0, enp2s0f1.]

Comment 4 Lior Vernia 2015-03-19 18:54:24 UTC
Didn't you mean that the entire command sent to VDSM should be logged? In this snippet it seems like it still doesn't.

Comment 5 Martin Pavlik 2015-03-20 06:58:37 UTC
That would be nice, more information should be better in this case.

Comment 19 Michael Burman 2015-07-26 12:11:14 UTC
What is the final fix that has been done for this BZ?
What i should see in engine log when failing with setup networks command?
Entire VDSM command?

for example, if i'm trying to detach network that is in use by VM, in engine log i see:

"2015-07-26 15:04:41,983 WARN  [org.ovirt.engine.core.bll.network.host.SetupNetworksCommand] (default task-2) [4b48789b] CanDoAction of action 'SetupNetworks' failed for user admin@internal. Reasons: VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS,$NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS_LIST VM3"

Is that good enough? 

Thanks

Comment 20 Yaniv Lavi 2015-08-09 16:40:09 UTC
Oved, is this expected result of VDSM error?
Nothing more descriptive?

Comment 21 Oved Ourfali 2015-08-10 07:29:42 UTC
(In reply to Yaniv Dary from comment #20)
> Oved, is this expected result of VDSM error?
> Nothing more descriptive?

The above is an engine failure, and not a VDSM one.

Comment 22 Yaniv Lavi 2015-08-10 09:41:16 UTC
(In reply to Oved Ourfali from comment #21)
> (In reply to Yaniv Dary from comment #20)
> > Oved, is this expected result of VDSM error?
> > Nothing more descriptive?
> 
> The above is an engine failure, and not a VDSM one.

It should log messages received from vdsm, no?
So the setup networks failure should appear in the log?
Michael didn't dee this in the logs.

Comment 23 Oved Ourfali 2015-08-10 09:54:29 UTC
(In reply to Yaniv Dary from comment #22)
> (In reply to Oved Ourfali from comment #21)
> > (In reply to Yaniv Dary from comment #20)
> > > Oved, is this expected result of VDSM error?
> > > Nothing more descriptive?
> > 
> > The above is an engine failure, and not a VDSM one.
> 
> It should log messages received from vdsm, no?
> So the setup networks failure should appear in the log?
> Michael didn't dee this in the logs.

Again, the log above is on  can do action failure on the engine side. Not vdsm. I suggest to needinfo on network developers to check the flow, what will reach vdsm, and what would be printed.

Comment 24 Michael Burman 2015-08-18 04:59:51 UTC
Hi Dan,

Can you please reply on comment 19 above?
I'm not sure to what expect in case of Setup Networks failure call(in the log) and how to verify this bug. 
Is engine log should log message received from vdsm in case of failing to do Setup Networks call?

Comment 25 Dan Kenigsberg 2015-09-09 14:57:05 UTC
it should be possible for engine.log to include all args *sent* to Vdsm, not only the command name.

Comment 26 Michael Burman 2015-09-09 15:12:40 UTC
I didn't got any reply to my questions, i do not understand to what i should except. And i don't see any fix was done here.

Please decide what should be passed to the engine log. until then this report is failed qa.

Comment 27 Dan Kenigsberg 2015-09-17 07:01:22 UTC
(In reply to Michael Burman from comment #26)
> I didn't got any reply to my questions, i do not understand to what i should
> except. And i don't see any fix was done here.
> 
> Please decide what should be passed to the engine log. until then this
> report is failed qa.

All arguments of the setupNetworks command should be logged in engine.log (which networks are asked to be change, what is the requested change, etc). Are the args logged?

Comment 28 Michael Burman 2015-09-17 07:12:32 UTC
2015-09-17 10:09:48,569 WARN  [org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (ajp-/127.0.0.1:8702-15) [7421ea24] CanDoAction of action 'HostSetupNetworks' failed for user admin@internal. Reasons: VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS,$networkNames   n3,$networkNames_COUNTER 1,$NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS_LIST      golden_env_mixed_virtio_4,$NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS_LIST_COUNTER 1

This are the argument when trying to detach network that is in use by running VM.

Comment 29 Sandro Bonazzola 2015-10-26 12:49:54 UTC
this is an automated message. oVirt 3.6.0 RC3 has been released and GA is targeted to next week, Nov 4th 2015.
Please review this bug and if not a blocker, please postpone to a later release.
All bugs not postponed on GA release will be automatically re-targeted to

- 3.6.1 if severity >= high
- 4.0 if severity < high

Comment 30 Dan Kenigsberg 2016-03-27 15:03:09 UTC
(In reply to Lior Vernia from comment #4)
> Didn't you mean that the entire command sent to VDSM should be logged? In
> this snippet it seems like it still doesn't.

I do not see the debug use case for seeing the would-be Vdsm parameters if the command fails on CanDoAction.

I believe that the params for the setupNetworkVdsCommand should be logged in case that action has failed. Does it, Michael? If not, please open a fresh BZ for it.


Note You need to log in before you can comment on or make changes to this bug.