The log indicates the column already existed. You need to check the logs
when it was added.
Please check management server logs, not the "journalctl" output which only
contains the recent logs.


-Wei

On Thu, 8 Feb 2024 at 09:21, Palash Biswas <palash...@gmail.com> wrote:

> Hi,
>
> Here you go.
>
> Feb 07 06:57:43 n2ncs-mgmt01 java[2020]: INFO
> [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) init = true Feb 07
> 06:57:43 n2ncs-mgmt01 java[2020]: INFO [c.c.u.DatabaseUpgradeChecker]
> (main:null) (logid:) DB version = 4.18.1.0 Code Version = 4.19.0.0 Feb 07
> 06:57:43 n2ncs-mgmt01 java[2020]: INFO [c.c.u.DatabaseUpgradeChecker]
> (main:null) (logid:) Database upgrade must be performed from 4.18.1.0 to
> 4.19.0.0 Feb 07 06:57:45 n2ncs-mgmt01 java[2020]: ERROR
> [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing: ALTER TABLE
> `cloud`.`roles` ADD COLUMN `public_role` tinyint(1) NOT NULL DEFAULT '1'
> COMMENT 'Indicates whether the role will be visible to all users (public)
> or only to root admins (private). If this parameter is not specified during
> the creation of the role its value will be defaulted to true (public).' Feb
> 07 06:57:45 n2ncs-mgmt01 java[2020]: ERROR [c.c.u.d.ScriptRunner]
> (main:null) (logid:) java.sql.SQLSyntaxErrorException: Duplicate column
> name 'public_role' Feb 07 06:57:45 n2ncs-mgmt01 java[2020]: ERROR
> [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to execute
> upgrade script Feb 07 06:57:45 n2ncs-mgmt01 java[2020]:
> java.sql.SQLSyntaxErrorException: Duplicate column name 'public_role' Feb
> 07 06:57:45 n2ncs-mgmt01 java[2020]: at
> com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185) Feb 07
> 06:57:45 n2ncs-mgmt01 java[2020]: at
> com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:87) Feb 07
> 06:57:45 n2ncs-mgmt01 java[2020]: at
> com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:234)
> Feb 07 06:57:45 n2ncs-mgmt01 java[2020]: at
> com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:318)
>
>
> For reference, I am attaching again complete logs.
>
> Regards,
> Palash
>
>
> On Thu, 8 Feb 2024 at 4:02 PM, Wei ZHOU <ustcweiz...@gmail.com> wrote:
>
>> Hi,
>>
>> can you search "public_role" in your management server logs
>>
>> zgrep "public_role" /var/log/cloudstack/management/management-server.log*
>>
>>
>> -Wei
>>
>> On Thu, 8 Feb 2024 at 01:33, Palash Biswas <palash...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > Yes we got errors, that database failed to upgrade.
>> >
>> > Feb 07 06:57:43 n2ncs-mgmt01 java[2020]: INFO
>> > [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) DB version =
>> 4.18.1.0
>> > Code Version = 4.19.0.0 Feb 07 06:57:43 n2ncs-mgmt01 java[2020]: INFO
>> > [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Database upgrade
>> must
>> > be performed from 4.18.1.0 to 4.19.0.0 Feb 07 06:57:45 n2ncs-mgmt01
>> > java[2020]: ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error
>> > executing: ALTER TABLE `cloud`.`roles` ADD COLUMN `public_role`
>> tinyint(1)
>> > NOT NULL DEFAULT '1' COMMENT 'Indicates whether the role will be
>> visible to
>> > all users (public) or only to root admins (private). If this parameter
>> is
>> > not specified during the creation of the role its value will be
>> defaulted
>> > to true (public).' Feb 07 06:57:45 n2ncs-mgmt01 java[2020]: ERROR
>> > [c.c.u.d.ScriptRunner] (main:null) (logid:)
>> > java.sql.SQLSyntaxErrorException: Duplicate column name 'public_role'
>> Feb
>> > 07 06:57:45 n2ncs-mgmt01 java[2020]: ERROR
>> [c.c.u.DatabaseUpgradeChecker]
>> > (main:null) (logid:) Unable to execute upgrade script
>> >
>> >
>> > Regards,
>> > Palash
>> >
>> > On Wed, 7 Feb 2024 at 10:12 PM, Wei ZHOU <ustcweiz...@gmail.com> wrote:
>> >
>> > > It looks like you have DB HA ?
>> > >
>> > > Can you check if there are other logs like below before the error ?
>> > > "Database upgrade must be performed from 4.18.1.0 to 4.19.0.0"
>> > >
>> > > -Wei
>> > >
>> > > On Wed, 7 Feb 2024 at 12:37, Palash Biswas <palash...@gmail.com>
>> wrote:
>> > >
>> > > > Hello,
>> > > >
>> > > > Upgrade official 4.18.1 to 4.19
>> > > >
>> > > >
>> > > >
>> > >
>> >
>> https://docs.cloudstack.apache.org/en/latest/upgrading/upgrade/upgrade-4.11.html
>> > > >
>> > > >
>> > > > On Wed, 7 Feb 2024 at 6:51 PM, Wei ZHOU <ustcweiz...@gmail.com>
>> wrote:
>> > > >
>> > > > > Do you upgrade from official 4.18.1.0 or 4.18.2.0-SNAPSHOT ?
>> > > > >
>> > > > > -Wei
>> > > > >
>> > > > > On Wed, 7 Feb 2024 at 11:23, Palash Biswas <palash...@gmail.com>
>> > > wrote:
>> > > > >
>> > > > > > Hi Community,
>> > > > > >
>> > > > > > May we know if anyone encounters similar issues that we are
>> facing
>> > > now
>> > > > > > after upgrading Cloudstack 4.18.1 to the 4.19.0 version?
>> > > > > >
>> > > > > > From the management logs, we found out that databases failed to
>> > > upgrade
>> > > > > > and all the CloudStack modules failed to start too.
>> > > > > >
>> > > > > > Our current setup environment:
>> > > > > >
>> > > > > > Management OS: Ubuntu 22.04 LTS
>> > > > > > Compute KVM OS: Ubuntu 22.04 LTS
>> > > > > > Database: MySQL 8
>> > > > > >
>> > > > > > Regards,
>> > > > > > Palash
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>

Reply via email to