Hey folks,
I’m running Rancher 1.1.2, and tried to run the rancher/cleanup-1-1:v0.1.2 bombs with the error below. Anybody know what I can do to fix it?
....
Updated/Deleted: 0 rows
Running: DELETE load_balancer_config FROM load_balancer_config
Updated/Deleted: 0 rows
Running for 1000/3715
Running: DELETE mount FROM mount JOIN volume ON volume.id = mount.volume_id JOIN instance ON instance.id = mount.instance_id WHERE instance.state = 'purged' AND mount.state = 'inactive' AND volume.uri like 'file://%' AND mount.id < 1000 AND mount.id >= 0
Updated/Deleted: 0 rows
Running for 2000/3715
Running: DELETE mount FROM mount JOIN volume ON volume.id = mount.volume_id JOIN instance ON instance.id = mount.instance_id WHERE instance.state = 'purged' AND mount.state = 'inactive' AND volume.uri like 'file://%' AND mount.id < 2000 AND mount.id >= 1000
Updated/Deleted: 0 rows
Running for 3000/3715
Running: DELETE mount FROM mount JOIN volume ON volume.id = mount.volume_id JOIN instance ON instance.id = mount.instance_id WHERE instance.state = 'purged' AND mount.state = 'inactive' AND volume.uri like 'file://%' AND mount.id < 3000 AND mount.id >= 2000
Updated/Deleted: 0 rows
Running for 4000/3715
Running: DELETE mount FROM mount JOIN volume ON volume.id = mount.volume_id JOIN instance ON instance.id = mount.instance_id WHERE instance.state = 'purged' AND mount.state = 'inactive' AND volume.uri like 'file://%' AND mount.id < 4000 AND mount.id >= 3000
Updated/Deleted: 0 rows
Running: DELETE mount FROM mount JOIN volume ON volume.id = mount.volume_id JOIN instance ON instance.id = mount.instance_id WHERE instance.state = 'purged' AND mount.state = 'inactive' AND volume.uri like 'file://%'
Updated/Deleted: 0 rows
Running for 1000/8443
Running: DELETE volume_storage_pool_map, volume FROM volume_storage_pool_map JOIN volume ON volume.id = volume_storage_pool_map.volume_id LEFT JOIN mount ON volume.id = mount.volume_id WHERE volume.state in ('inactive', 'active') AND mount.id IS NULL AND volume.uri LIKE 'file://%' AND volume_storage_pool_map.id < 1000 AND volume_storage_pool_map.id >= 0
java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`rancher`.`volume_storage_pool_map`, CONSTRAINT `fk_volume_storage_pool_map__volume_id` FOREIGN KEY (`volume_id`) REFERENCES `volume` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION)
at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:119)
at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69)
at org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:261)
at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:290)
at org.mariadb.jdbc.MariaDbStatement.executeUpdate(MariaDbStatement.java:474)
at org.mariadb.jdbc.MariaDbStatement.executeUpdate(MariaDbStatement.java:490)
at io.cattle.platform.core.cleanup.Main.runIncremental(Main.java:85)
at io.cattle.platform.core.cleanup.Main.run(Main.java:77)
at io.cattle.platform.core.cleanup.Main.runUp(Main.java:68)
at io.cattle.platform.core.cleanup.Main.mainWithError(Main.java:114)
at io.cattle.platform.core.cleanup.Main.main(Main.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:294)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Cannot delete or update a parent row: a foreign key constraint fails (`rancher`.`volume_storage_pool_map`, CONSTRAINT `fk_volume_storage_pool_map__volume_id` FOREIGN KEY (`volume_id`) REFERENCES `volume` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:475)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.result(AbstractQueryProtocol.java:396)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:378)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:334)
at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:280)
... 13 more