Bug 1062438

Summary: RHEV 3.3 adding new host causes error logging for an attempt to remove host
Product: Red Hat Enterprise Virtualization Manager Reporter: Dave Sullivan <dsulliva>
Component: ovirt-engineAssignee: Liran Zelkha <lzelkha>
Status: CLOSED ERRATA QA Contact: Tareq Alayan <talayan>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: aberezin, acathrow, adahms, bazulay, dsulliva, emesika, iheim, lpeer, pstehlik, Rhev-m-bugs, wdaniel, yeylon, yzaslavs
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: av3 Doc Type: Bug Fix
Doc Text:
With this update, errors are no longer raised by the RemoveVdsCommand when an operation to add a host fails and the changes made up to that failure are rolled back by the Red Hat Enterprise Virtualization Manager.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-09 15:03:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1078909, 1142926    

Description Dave Sullivan 2014-02-06 23:20:44 UTC
Description of problem:

When adding a new host / hypervisor to RHEV-M 3.3.0 there are error level log entries for an attempt to pre-remove the new host. I assume RHEV knows that I am not adding a duplicate, so it doesn't seem correct to generate ERROR level logs for trying to remove the host before proceeding with adding it. Also, is it expected to get the multi-page stack trace out for the ssh check that's highly likely to fail for the same reason?

engine.log snippet from the addition of a new host:

2014-01-26 20:26:10,236 ERROR [org.ovirt.engine.core.vdsbroker.ResourceManager] (ajp-/127.0.0.1:8702-6) [14fc80d4] Cannot get vdsManager for vdsid=66d17679-3c
88-44c6-92ca-44a7cf4af365
2014-01-26 20:26:10,291 INFO  [org.ovirt.engine.core.vdsbroker.RemoveVdsVDSCommand] (ajp-/127.0.0.1:8702-6) [14fc80d4] START, RemoveVdsVDSCommand(HostName = v
zlb1014, HostId = 66d17679-3c88-44c6-92ca-44a7cf4af365), log id: dd11719
2014-01-26 20:26:10,291 ERROR [org.ovirt.engine.core.vdsbroker.ResourceManager] (ajp-/127.0.0.1:8702-6) [14fc80d4] Cannot get vdsManager for vdsid=66d17679-3c
88-44c6-92ca-44a7cf4af365
2014-01-26 20:26:10,291 INFO  [org.ovirt.engine.core.vdsbroker.RemoveVdsVDSCommand] (ajp-/127.0.0.1:8702-6) [14fc80d4] FINISH, RemoveVdsVDSCommand, log id: dd
11719
2014-01-26 20:26:10,291 ERROR [org.ovirt.engine.core.vdsbroker.ResourceManager] (ajp-/127.0.0.1:8702-6) [14fc80d4] Cannot get vdsManager for vdsid=66d17679-3c
88-44c6-92ca-44a7cf4af365
2014-01-26 20:26:10,307 WARN  [org.ovirt.engine.core.bll.AddVdsCommand] (ajp-/127.0.0.1:8702-11) [1c09ad59] Failed to initiate vdsm-id request on host: java.i
o.IOException: Command returned failure code 127 during SSH session 'root.com'
        at org.ovirt.engine.core.utils.ssh.SSHClient.executeCommand(SSHClient.java:508) [utils.jar:]
        at org.ovirt.engine.core.bll.AddVdsCommand.getInstalledVdsIdIfExists(AddVdsCommand.java:404) [bll.jar:]
        at org.ovirt.engine.core.bll.AddVdsCommand.canConnect(AddVdsCommand.java:426) [bll.jar:]
        at org.ovirt.engine.core.bll.AddVdsCommand.canDoAction(AddVdsCommand.java:342) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.internalCanDoAction(CommandBase.java:741) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:356) [bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:416) [bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:395) [bll.jar:]
        at org.ovirt.engine.core.bll.Backend.RunAction(Backend.java:353) [bll.jar:]
        at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source) [:1.7.0_45]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
        at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterc
eptorFactory.java:72) [jboss-as-ee.jar:7.3.0.Final-redhat-14]
<snip>
2014-01-26 20:26:10,329 INFO  [org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand] (ajp-/127.0.0.1:8702-6) [14fc80d4] START, AddVdsVDSCommand(HostName = vzlb1014, HostId = 66d17679-3c88-44c6-92ca-44a7cf4af365), log id: 6ab751a8
2014-01-26 20:26:10,329 INFO  [org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand] (ajp-/127.0.0.1:8702-6) [14fc80d4] AddVds - entered , starting logic to add VDS 66d17679-3c88-44c6-92ca-44a7cf4af365
2014-01-26 20:26:10,343 INFO  [org.ovirt.engine.core.bll.AddVdsCommand] (ajp-/127.0.0.1:8702-11) [1c09ad59] Running command: AddVdsCommand internal: false. Entities affected :  ID: 8ad3f67e-1e40-46d2-9c42-5583e604206c Type: VdsGroups
2014-01-26 20:26:10,375 INFO  [org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand] (ajp-/127.0.0.1:8702-6) [14fc80d4] AddVds - VDS 66d17679-3c88-44c6-92ca-44a7cf4af365 was added, will try to add it to the resource manager
2014-01-26 20:26:10,375 INFO  [org.ovirt.engine.core.vdsbroker.VdsManager] (ajp-/127.0.0.1:8702-6) [14fc80d4] Entered VdsManager constructor
2014-01-26 20:26:10,389 INFO  [org.ovirt.engine.core.vdsbroker.VdsManager] (ajp-/127.0.0.1:8702-6) [14fc80d4] Initialize vdsBroker (vzlb1014-rh1.acme.com,54,321)
2014-01-26 20:26:10,391 INFO  [org.ovirt.engine.core.vdsbroker.ResourceManager] (ajp-/127.0.0.1:8702-6) [14fc80d4] VDS 66d17679-3c88-44c6-92ca-44a7cf4af365 was added to the Resource Manager
2014-01-26 20:26:10,391 INFO  [org.ovirt.engine.core.vdsbroker.AddVdsVDSCommand] (ajp-/127.0.0.1:8702-6) [14fc80d4] FINISH, AddVdsVDSCommand, log id: 6ab751a8


Version-Release number of selected component (if applicable):

3.3.0 GA


How reproducible:

see above

Actual results:



Expected results:

Shouldn't see error messages


Additional info:

Comment 1 Eli Mesika 2014-02-09 10:27:44 UTC
From the log this is what I see

1) You are trying to add a Host 
2) It is first added to the database 
3) The Add AddVdsCommand canDoAction failed because it can not SSH to the Host
4) The compensation mechanism performs a rollback operation , thus it calls the RemoveVdsCommand
5) We are getting the ERROR of "Cannot get vdsManager" during the RemoveVdsCommand 

Is the Bug only request that in t6he case that the Host failed to been added we will skip the "Cannot get vdsManager" logging error ???

Comment 2 Dave Sullivan 2014-02-11 00:52:20 UTC
Eli, correct.

The idea is to to tightly watch logs for errors.   So if it's not critical then don't show it.  Otherwise customers may have false alarms thinking something is wrong when in reality it is not.

Make sense?

Comment 3 Eli Mesika 2014-02-11 09:15:56 UTC
(In reply to Dave Sullivan from comment #2)
> Eli, correct.
> 
> The idea is to to tightly watch logs for errors.   So if it's not critical
> then don't show it.  Otherwise customers may have false alarms thinking
> something is wrong when in reality it is not.
> 
> Make sense?

Yes

Comment 4 Tareq Alayan 2014-03-18 12:24:03 UTC
verified on rhevm-3.4.0-0.5.master.el6ev.noarch


- Attempt to add host 
- put incorrect password
- check in engine log for  "Cannot get vdsManager"  ... i found none.

Comment 5 errata-xmlrpc 2014-06-09 15:03:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-0506.html

Comment 6 Oved Ourfali 2014-08-11 07:40:52 UTC
*** Bug 1127345 has been marked as a duplicate of this bug. ***