Hi,

We’ve been experimenting  with the installation and upgrade of Cloudstack 4.18 
and got into this issue; where the database upgrade fail with “CALL 
`cloud`.`IDEMPOTENT_ADD_FOREIGN_KEY`('cloud.vm_template', 'user_data',

> 'id');“   resulting: Can't write; duplicate key in table '#sql-6679_5f'

Look like this issue is related to MySQL 5.7, we’ve been getting this error 
using CentOS7 + Percona-XtraDB-Cluster-57-5.7.42
But upgrading MySQL to 8.0.33 resolved the issue.

Would this mean that CloudStack 4.18.x would require MySQL 8 or later and does 
not support MySQL 5.7 ?

Regards,


From: Sanjay Kumar <[email protected]>
Date: Thursday, March 23, 2023 at 05:22
To: [email protected] <[email protected]>
Subject: Re: Getting DB error while installing fresh cloudstack-mangment on 
Rocky-Linux9
Hi Wei, Thank you so much I was using mysql 5. 7. 41 and now we've upgraded the 
mysql version and it's working now. On Thu, Mar 23, 2023 at 1: 46 PM Wei ZHOU 
<ustcweizhou@ gmail. com> wrote: > Hi, > > What's the mysql/mariadb version
ZjQcmQRYFpfptBannerStart
ATTENTION / CAUTION
Ce courriel provient de l'extérieur de l'organisation. Ne cliquez pas sur les 
liens et n'ouvrez pas les pièces jointes à moins de reconnaître l'expéditeur et 
de savoir que le contenu est sûr / This email originated from outside of your 
organization. Do not click links or open attachments unless you recognize the 
sender and know the content is safe.
ZjQcmQRYFpfptBannerEnd

Hi Wei,



Thank you so much



I was using mysql 5.7.41 and now we've upgraded the mysql version and it's

working now.





On Thu, Mar 23, 2023 at 1:46 PM Wei ZHOU <[email protected]> wrote:



> Hi,

>

> What's the mysql/mariadb version ?

>

> Can you execute the mysql statement manually ?

>

> CALL `cloud`.`IDEMPOTENT_ADD_FOREIGN_KEY`('cloud.vm_template', 'user_data',

> 'id')

>

>

> -Wei

>

> On Thu, 23 Mar 2023 at 08:19, Sanjay Kumar <[email protected]> wrote:

>

> > Hi All,

> >

> > I was installing fresh management server of new release apache cloudstack

> > 4.18 and getting db error. When I was installing apache cloudstack 4.17

> > then it is working but apache cloudstack 4.18 is not working. we are

> > suspecting, there could be db issue or version issue?

> >

> > Any help will be greatly appreciated.

> >

> > On Thu, Mar 23, 2023 at 9:06 AM Sanjay Kumar <[email protected]>

> > wrote:

> >

> > > Hi Wei,

> > >

> > > Thanks for your prompt response

> > >

> > > Please find the logs herewith.

> > >

> > >

> > >

> > > On Wed, Mar 22, 2023 at 1:07 PM Wei ZHOU <[email protected]>

> wrote:

> > >

> > >> Hi,

> > >>

> > >> Can you upload the full log ?

> > >>

> > >> -Wei

> > >>

> > >> On Wed, 22 Mar 2023 at 03:47, Sanjay Kumar <[email protected]>

> > wrote:

> > >>

> > >> > Hi All,

> > >> >

> > >> > I was trying to fresh installation of cloudstack 4.18 on rocky

> linux 9

> > >> and

> > >> > getting db error.

> > >> >

> > >> > Can't write; duplicate key in table '#sql-3bb_2870

> > >> >

> > >> > 2023-03-22 03:28:24,031 DEBUG [c.c.u.d.T.Transaction] (main:null)

> > >> (logid:)

> > >> > Rolling back the transaction: Time = 354 Name =  Upgrade; called by

> > >> >

> > >> >

> > >>

> >

> -TransactionLegacy.rollback:888-TransactionLegacy.removeUpTo:831-TransactionLegacy.close:655-DatabaseUpgradeChecker.upgrade:325-DatabaseUpgradeChecker.check:401-CloudStackExtendedLifeCycle.checkIntegrity:64-CloudStackExtendedLifeCycle.start:54-DefaultLifecycleProcessor.doStart:178-DefaultLifecycleProcessor.access$200:54-DefaultLifecycleProcessor$LifecycleGroup.start:356-Iterable.forEach:75-DefaultLifecycleProcessor.startBeans:155

> > >> >

> > >> > 1. ACS_Version: 4.18

> > >> > 2. MysqlDB: 5.7.41

> > >> >

> > >> > Any help would be really appreciated. Thank you!

> > >> >

> > >> >

> > >> > With Regards,

> > >> >

> > >> > Sanjay

> > >> >

> > >>

> > >

> >

>

Reply via email to