Search VM by MAC has failed

Hi,

The following error has appeared after running the search command:

$ onevm list --search MAC=00:1a:64:2b:c7:b0
[one.vmpool.info] Full text search is not supported by the SQL backend

MariaDB used as SQL backend:

$ mysql -V
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1

Could you help solve the problem?

brg.,
Serhiy.

Hello @gray380,

In order to be able to use the --search option you need you use a MySQL backed with version equal or higher than 5.6. As said in the docs http://docs.opennebula.org/5.8/operation/vm_management/vm_instances.html?highlight=search#searching-vm-instances

This is due to MySQL FTS indexes are not supported in previous MySQL versions.

Hi,

In other words the real version shown after ‘Distrib’ (I belived it should be ‘Ver’).
So in my case I have version 5.5.60 wich is less then 5.6.

Thank you.

BTW, is it real to use mysql 5.6 under centos 7?

Okay, I’ve updated MariaDB version to:

mysql Ver 15.1 Distrib 10.4.6-MariaDB, for Linux (x86_64) using readline 5.1

And faced the internal error:

$ onevm list --search MAC=00:1a:64:2b:c7:b0
[one.vmpool.info] Internal error

Do I have to reindex DB or something else?
Something like this:

mysql> Alter table vm_pool ADD FULLTEXT (ETH0_MAC);

UPDATE: To turn on FTS run the following command:

MariaDB [opennebula]> alter table vm_pool add fulltext index ftidx (search_token);

As you said, after updating the DB it’s necessary to add the FTS index as it wasn’t added during DB bootstrapping.

I’ve open an issue for creating a command which make it easier (https://github.com/OpenNebula/one/issues/3530) .

Thanks for the feedback!

1 Like