Description of problem: ------------------------ There are 2 geo-rep sessions created for the gluster volume from backend and those gluster nodes are managed in oVirt manager in a virt+gluster service enabled cluster. When refreshing geo-rep session sync from manager UI, the operation failed, when checking the engine.log found the trace of exception Version-Release number of selected component (if applicable): -------------------------------------------------------------- RHV 4.2.4 How reproducible: ------------------ Always Steps to Reproduce: ------------------- 1. Manage gluster node in oVirt Manager 2. Create gluster volume 3. Create 2 geo-rep session for that volume with 2 slave gluster volumes 4. From the oVirt Manager UI, click on 'sync' on that gluster volume under geo-replication tab Actual results: --------------- Failed to sync the available geo-rep sessions Expected results: ----------------- All the geo-rep session should have been synced Additional info:
2018-06-26 13:53:42,894+05 ERROR [org.ovirt.engine.core.bll.gluster.RefreshGeoRepSessionsCommand] (default task-51) [8199f9e8-703f-45d7-b98d-286323da02bf] Exception: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(ArrayList.java:657) [rt.jar:1.8.0_171] at java.util.ArrayList.get(ArrayList.java:433) [rt.jar:1.8.0_171] at org.ovirt.engine.core.bll.gluster.GlusterGeoRepSyncJob.updateGeoRepStatus(GlusterGeoRepSyncJob.java:370) [bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterGeoRepSyncJob.updateDiscoveredSessions(GlusterGeoRepSyncJob.java:171) [bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterGeoRepSyncJob.discoverGeoRepDataInCluster(GlusterGeoRepSyncJob.java:154) [bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterGeoRepSyncJob.refreshGeoRepDataForVolume(GlusterGeoRepSyncJob.java:103) [bll.jar:] at org.ovirt.engine.core.bll.gluster.RefreshGeoRepSessionsCommand.executeCommand(RefreshGeoRepSessionsCommand.java:45) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1133) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1285) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1934) [bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:164) [utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:103) [utils.jar:] at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1345) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:400) [bll.jar:] at org.ovirt.engine.core.bll.executor.DefaultBackendActionExecutor.execute(DefaultBackendActionExecutor.java:13) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:468) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:450) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:403) [bll.jar:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_171] at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) From the stacktrace, the IndexOutOfBoundsException is due to the volume not syncing all the bricks - as one of the hosts was not yet added to the HC setup While this is partly a setup error, we do need to handle this situation gracefully by validating the bricks available before updating status
Tested with RHV 4.2.6-4 and glusterfs-3.8.4-54.15 While trying to sync the geo-rep session created from gluster CLI, it got synced successfully with RHV Manager UI. There are no exceptions