Created attachment 665298 [details] engine logs Description of problem: --------------------------------------- When a volume is deleted from gluster CLI, and another volume having the same name is created immediately, the Console fails to display the changes correctly. Version-Release number of selected component (if applicable): Red Hat Storage Console Version: 2.1-qa18.el6ev How reproducible: Always Steps to Reproduce: 1. For an existing volume, run the following command from gluster CLI - gluster volume delete <vol-name>;gluster volume create <vol-name> <new-brick> (vol-name for both deletion and creation have to be the same) Actual results: The Events tab displays a message which indicates that the bricks that were part of the volume (before its deletion from CLI) were removed from CLI. It fails to add the new bricks and show changes in volume options (after creation of the new volume). If the newly created volume is started from the CLI, that change is seen in the GUI. The following is seen in the engine logs - --------------------------------------- 2012-02-01 22:01:53,413 INFO [org.ovirt.engine.core.bll.gluster.GlusterManager] (QuartzScheduler_Worker-99) Brick 10.70.35.196:/opt/gluster/bricks/testBrick removed from volume test from CLI. Removing it from engine DB as well. 2012-02-01 22:01:53,418 INFO [org.ovirt.engine.core.bll.gluster.GlusterManager] (QuartzScheduler_Worker-99) New brick 10.70.35.196:/opt/gluster/bricks/brick added to volume test from gluster CLI. Updating engine DB accordingly. 2012-02-01 22:01:53,419 ERROR [org.ovirt.engine.core.bll.gluster.GlusterManager] (QuartzScheduler_Worker-99) Error while updating Volume test!: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertglustervolumebrick(?, ?, ?, ?, ?, ?)}]; ERROR: insert or update on table "gluster_volume_bricks" violates foreign key constraint "gluster_volume_bricks_volume_id_fkey" Detail: Key (volume_id)=(f7f96176-41be-4191-9a1a-00386fdce5c4) is not present in table "gluster_volumes". Where: SQL statement "INSERT INTO gluster_volume_bricks (id, volume_id, server_id, brick_dir, brick_order, status) VALUES ( $1 , $2 , $3 , $4 , $5 , $6 )" PL/pgSQL function "insertglustervolumebrick" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: insert or update on table "gluster_volume_bricks" violates foreign key constraint "gluster_volume_bricks_volume_id_fkey" Detail: Key (volume_id)=(f7f96176-41be-4191-9a1a-00386fdce5c4) is not present in table "gluster_volumes". Where: SQL statement "INSERT INTO gluster_volume_bricks (id, volume_id, server_id, brick_dir, brick_order, status) VALUES ( $1 , $2 , $3 , $4 , $5 , $6 )" PL/pgSQL function "insertglustervolumebrick" line 2 at SQL statement at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1030) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1064) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:388) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:351) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:124) [engine-dal.jar:] at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:37) [engine-dal.jar:] at org.ovirt.engine.core.dao.gluster.GlusterBrickDaoDbFacadeImpl.save(GlusterBrickDaoDbFacadeImpl.java:30) [engine-dal.jar:] at org.ovirt.engine.core.bll.gluster.GlusterManager.updateExistingAndNewBricks(GlusterManager.java:610) [engine-bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterManager.updateBricks(GlusterManager.java:573) [engine-bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterManager.updateVolume(GlusterManager.java:531) [engine-bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterManager.updateExistingAndNewVolumes(GlusterManager.java:447) [engine-bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterManager.refreshVolumeData(GlusterManager.java:374) [engine-bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterManager.refreshClusterData(GlusterManager.java:154) [engine-bll.jar:] at org.ovirt.engine.core.bll.gluster.GlusterManager.refreshLightWeightData(GlusterManager.java:133) [engine-bll.jar:] at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source) [:1.7.0_09-icedtea] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09-icedtea] at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09-icedtea] at org.ovirt.engine.core.utils.timer.JobWrapper.execute(JobWrapper.java:60) [engine-scheduler.jar:] at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-2.1.2.jar:] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-2.1.2.jar:] Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "gluster_volume_bricks" violates foreign key constraint "gluster_volume_bricks_volume_id_fkey" Detail: Key (volume_id)=(f7f96176-41be-4191-9a1a-00386fdce5c4) is not present in table "gluster_volumes". Where: SQL statement "INSERT INTO gluster_volume_bricks (id, volume_id, server_id, brick_dir, brick_order, status) VALUES ( $1 , $2 , $3 , $4 , $5 , $6 )" PL/pgSQL function "insertglustervolumebrick" line 2 at SQL statement at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360) at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.execute(CachedPreparedStatement.java:297) at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:404) at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1066) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1014) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] ... 20 more Expected results: The Console should first say that the volume was removed and then say that a volume has been created and display the correct volume details (corresponding to the new volume). Additional info:
Upstream patch http://gerrit.ovirt.org/#/c/10429/
Verified in Red Hat Storage Console Version: 2.1.0-0.qa5.el6rhs.
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/RHBA-2013-1262.html