<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div><div><div><div>Hello.<br>I have some LXC containers on two servers, each container placed in personal glusterfs replication node. Gluster used as failover: when one server is down i have possibility run container on second server without loosing data.<br>In one of containers I have a Atlassian Confluence software, that using mysql 5.6, and when I try to update my Confluence to last version I got the error that updater failed to execute mysql query &quot;alter table CONTENTPROPERTIES add constraint FK984C5E4C8DD41734 foreign key (CONTENTID) references CONTENT (CONTENTID)&quot;.<br>From error log I see that the alter query fails because foreign key already been in DB, but updater don&#39;t get information about this. I have a long discussion with Atlassian support, and we found the solution: updater get information from &quot;show create table&quot; and when updater can&#39;t get that information they try to create new foreign key.<br></div>Using this information go to mysql console in Confluence container and execute &quot;show create table&quot; for one of confluence DB table and have no foreign_keys from result, but when I execute queries for look foreign_keys in information_schema i got the foreigh_keys info:<br><b>mysql&gt; show create table confluence.CONTENTPROPERTIES;</b><br>CONTENTPROPERTIES | CREATE TABLE `CONTENTPROPERTIES` (<br>  `PROPERTYID` bigint(20) NOT NULL,<br>  `PROPERTYNAME` varchar(255) COLLATE utf8_bin NOT NULL,<br>  `STRINGVAL` varchar(255) COLLATE utf8_bin DEFAULT NULL,<br>  `LONGVAL` bigint(20) DEFAULT NULL,<br>  `DATEVAL` datetime DEFAULT NULL,<br>  `CONTENTID` bigint(20) DEFAULT NULL,<br>  PRIMARY KEY (`PROPERTYID`),<br>  KEY `content_prop_str_idx` (`STRINGVAL`),<br>  KEY `content_prop_long_idx` (`LONGVAL`),<br>  KEY `c_contentproperties_idx` (`CONTENTID`),<br>  KEY `content_prop_name_idx` (`PROPERTYNAME`),<br>  KEY `content_prop_date_idx` (`DATEVAL`)<br>) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin<br><br><b>mysql&gt; SELECT * FROM information_schema.TABLE_<wbr>CONSTRAINTS  WHERE information_schema.TABLE_<wbr>CONSTRAINTS.CONSTRAINT_TYPE = &#39;FOREIGN KEY&#39; AND information_schema.TABLE_<wbr>CONSTRAINTS.TABLE_NAME = &#39;CONTENTPROPERTIES&#39;\G</b><br>CONSTRAINT_CATALOG: def<br> CONSTRAINT_SCHEMA: confluence<br>   CONSTRAINT_NAME: FK984C5E4C8DD41734<br>      TABLE_SCHEMA: confluence<br>        TABLE_NAME: CONTENTPROPERTIES<br>   CONSTRAINT_TYPE: FOREIGN KEY<br><br></div>So, when i don&#39;t use glusterFS for container error not ocured and update proceed successfully and &quot;show create table&quot; shows a fireign_keys info<br><br></div>Do you have same error or do you know how to fix that problem with mysql when using GlusterFS?<br><br></div>PS:<br></div>OS Debian 8<br></div>GlusterFS version 3.7.18-1<br><div><div><div><div><div><div><b><br>gluster volume info GFSconfluence</b><br>Volume Name: GFSconfluence<br>Type: Replicate<br>Volume ID: fda9cd44-2439-4ab2-9e2e-<wbr>34b2f54dd14a<br>Status: Started<br>Number of Bricks: 1 x 2 = 2<br>Transport-type: tcp<br>Bricks:<br>Brick1: 192.168.255.3:/lxc/confluence/<wbr>glusterfs<br>Brick2: 192.168.255.4:/lxc/confluence/<wbr>glusterfs<br></div></div></div></div></div></div></div>
</div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div><div><i>С уважением,<br></i></div><i><b>Сторчевой Илья</b>,<br></i></div><i>системный администратор</i><br>--------------------------------------------<br></div><i>skype <b>i.storchevoy-lm</b><br></i></div><i>тел. <b>8-952-530-4151</b></i><br></div></div>
</div>