Opennebula.service won't start, uninitialized sqlite DB

Hi,

I have a 3 node setup with sunstnoe HA. Those three nodes are working fine. I want to add a fourth node to the cluster, but I don’t want sunstone there. That new fourth node would just run the VMs.
So I installed everything as described here. From what I see it’s basically just “install packages and add the node on frontend”, but I can’t start the opennebula service once the packages are installed.
On the frontend nodes I use mysql. I don’t see a reason for using it on the fourth node, so I’d prefer to just use sqlite. When I start the opennebula service on the new node, the service fails with this in the logs:

Fri May 10 13:22:47 2019 [Z0][ONE][I]: sqlite has enabled: SQLITE_ENABLE_UPDATE_DELETE_LIMIT
Fri May 10 13:22:47 2019 [Z0][ONE][I]: Checking database version.
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT version FROM local_db_versioning WHERE oid=(SELECT MAX(oid) FROM local_db_versioning), error: no such table: local_db_versioning
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT version FROM db_versioning WHERE oid=(SELECT MAX(oid) FROM db_versioning), error: no such table: db_versioning
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT c.log_index, c.term, c.sqlcmd, c.timestamp, c.fed_index, p.log_index, p.term FROM logdb c, logdb p WHERE c.log_index = 0 AND p.log_index = 0, error: no such table: logdb
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: INSERT INTO logdb (log_index, term, sqlcmd, timestamp, fed_index, applied) VALUES (0,0,'eJwzNDU1N7EwNzYzBwALYgIW',1557487367,-1,1), error: no such table: logdb
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT c.log_index, c.term, c.sqlcmd, c.timestamp, c.fed_index, p.log_index, p.term FROM logdb c, logdb p WHERE c.log_index = 0 AND p.log_index = 0, error: no such table: logdb
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT MAX(log_index) FROM logdb, error: no such table: logdb
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT MAX(log_index) FROM logdb WHERE applied = 1, error: no such table: logdb
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT c.log_index, c.term, c.sqlcmd, c.timestamp, c.fed_index, p.log_index, p.term FROM logdb c, logdb p WHERE c.log_index = 4294967295 AND p.log_index = 4294967294, error: no such table: logdb
Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT fed_index FROM logdb WHERE fed_index != -1 , error: no such table: logdb

So it looks like that oned does not initialize the sqlite db on startup. I tried switching to mysql and importing a db backup from a frontend node, but that just wrecks the HA (forces elections).

Is there any way to clean/initialize an empty sqlite db just for the opennebula service to start? Or am I missing something? Do I even need to enable/start these services on the node if I don’t want a frontend there?

Hello @Pimplek,

OpenNebula daemon must run only in frontend nodes, in hypervisors nodes you just need to install opennebula-node-kvm package and add this node as a host in OpenNebula (http://docs.opennebula.org/5.8/deployment/node_installation/kvm_node_installation.html#step-7-adding-a-host-to-opennebula).

Maybe you can take a look here for clarifying concepts: http://docs.opennebula.org/5.8/deployment/cloud_design/open_cloud_architecture.html#architectural-overview

Hi @cgonzalez,

You are right. Initially when I added the new host I had a “INIT” or “ERROR” state on sunstone and in “onehost list” output for that host. I guess thats why I assumed that the service needs to run.
After a host reboot I see a successful “ON” state for the new node. Opennebula service is disabled on that host. Not sure what my exact issue was, but neverheless thank you very much for clarifying.

Br