GitHub user RyanAccuWebCloud added a comment to the discussion: Error During 
Installation of Management server Apache Cloudstack 4.23

Hi @arpanbht ,

The first thing I'd check here is whether the database already contains the 
`uc_hypervisor` index before CloudStack attempts to create it.

A couple of things stood out in your command history. You ran 
`cloudstack-setup-databases` more than once, with different arguments. Was this 
a completely fresh installation with a newly created database, or was the 
database previously used with CloudStack 4.22?

I'd suggest checking a few things before making any database changes.

**1. Confirm which database server you're running:**

```bash
mysql --version
```

Also run this inside MySQL:

```sql
SELECT VERSION(), @@version_comment;
```

Are you using Oracle MySQL 8.0 or MariaDB? This distinction is worth checking. 
I've seen a similar CloudStack error reported previously where switching from 
MariaDB to MySQL resolved it.

**2. Check whether the index already exists:**

```sql
SHOW INDEX FROM cloud.hypervisor_capabilities;
```

You can also check the complete table definition:

```sql
SHOW CREATE TABLE cloud.hypervisor_capabilities\G
```

Look for `uc_hypervisor` and check whether it already covers `hypervisor_type` 
and `hypervisor_version`.

**3. A few more details would help:**

- Which Ubuntu version are you using?
- Is this a completely fresh CloudStack 4.23 installation, or an upgrade from 
4.22?
- Did you use MariaDB at any point before installing MySQL?
- Did the initial `cloudstack-setup-databases` command complete successfully?
- Could you share the output of `apt policy mysql-server cloudstack-management`?

I'd also check whether the CloudStack APT repository is pointing specifically 
to the 4.23 repository rather than mixing packages from different releases.

I wouldn't drop the existing index or recreate the database just yet. First, 
let's understand why the upgrade script is trying to create an index that MySQL 
says is already present.

I've also been working with Apache CloudStack deployments and testing 
management server configurations in cloud environments, so I'm interested in 
understanding what combination of database and package versions is causing this.

If you can share the outputs above, we can narrow it down without risking 
unnecessary database changes.

Regards,
Ryan P.

GitHub link: 
https://github.com/apache/cloudstack/discussions/14539#discussioncomment-19297479

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to