Error parsing oned.conf

Hi!
I just updated to OpenNebula 7.0 from 6.0

I encountered some config errors, but from the backup files I was able to recover everything so far!

However, I have a concern: While all the services appear to be running propperly, it seems that onecfg is unable to track changes from oned.conf

As the issues I had when upgrading were due to some untracked changes, I want to avoid this issue for the future:

Do you guys know if there is any straightforward way to debug what the parsing issue is?
I guess this forum is not the place to upload the oned.conf file to see what went wrong

Thanks!

Álvaro

Hello @Alvaro

Apologies for the delayed reply. From what I could investigate, the team recommends checking parsing issues with the CLI using:

onecfg validate --debug

If parsing still fails, place the problematic oned.conf in the common path (/etc/one/oned.conf) and then run:

augtool

The logs should include a line pointing to the exact error.

Hope this helps!

Cheers

Hi Francisco, thanks for you answer

I had already run `onecfg validate –debug`, with the output being the expected

...
DEBUG : Load ‘/etc/one/oned.conf’ with OneCfg::Config::Type::Augeas::
ONEERROR : Unable to process file ‘/etc/one/oned.conf’ - Failed to parse file
...

I was unfamiliar with the augtool utility. From what I could read it requires to have installed some kind of “lens” for OpenNebula configuration files.

Is there any intended one to use?

BR
Álvaro

There is a chance some configuration wasn’t handled properly. Since you are not getting a good error from the –debug. Try comparing your oned.conf to a stock 7.0 oned.conf. There is probably some malformed configuration breaking the validator.

Hi Daniel, thank you for joining the duscussion
Yes, I’ve tried comparing the configs between mine and the official one. Here are the changes I’ve made, but I still can’t tell which one is breaking the parsing (=:

root@uma-one-fe-02:/etc/one# onecfg validate
ERROR : Unable to process file '/etc/one/oned.conf' - Failed to parse file
root@uma-one-fe-02:/etc/one# diff oned.conf oned.conf.base 
74c74
< MONITORING_INTERVAL_MARKET    = 60
---
> MONITORING_INTERVAL_MARKET    = 600
80,81c80,81
< # DB = [ BACKEND = "sqlite",
< #        TIMEOUT = 2500 ]
---
> DB = [ BACKEND = "sqlite",
>        TIMEOUT = 2500 ]
93,101d92
< DB = [ BACKEND = "mysql",
<        SERVER  = "localhost",
<        PORT    = 3306,
<        USER    = "oneadmin",
<        PASSWD  = "opennebula",
<        DB_NAME = "opennebula",
<        CONNECTIONS = 25,
<        COMPARE_BINARY = "no" ]
< 
104,105c95
<     RESERVED = "6800:7300, 9869, 32768:65536"
<     # RESERVED = "32768:65536"
---
>     RESERVED = "32768:65536"
195c185
<     SERVER_ID     = 1,
---
>     SERVER_ID     = -1,
214,218d203
< RAFT_LEADER_HOOK = [
<      COMMAND = "raft/vip.sh",
<      ARGUMENTS = "leader ens3 10.11.32.103"
< ]
< 
225,229d209
< RAFT_FOLLOWER_HOOK = [
<      COMMAND = "raft/vip.sh",
<      ARGUMENTS = "follower ens3 10.11.32.103"
< ]
< 
239,241c219,221
<     CPU_COST    = 0.00721,
<     MEMORY_COST = 0.000003018,
<     DISK_COST   = 0.00000013377568493164062
---
>     CPU_COST    = 0,
>     MEMORY_COST = 0,
>     DISK_COST   = 0
767c747
< #ONEGATE_ENDPOINT = "http://10.11.32.103:5030"
---
> #ONEGATE_ENDPOINT = "http://169.254.16.9:5030"
1445c1425
< ]
---
> ]
\ No newline at end of file

Thanks!
BR,

Álvaro

Can you post your oned.conf file so we can test it ?

Hi Daniel,
Sure! Here it is.
We have a High Available setup, with a mysql database, and custom hooks for leader selection, in order to use netplan to asign the Virtual IP.

oned.conf (55.1 KB)

BR,

Álvaro

Hi alvaro, the problem is likely the VNC_PORTS configuration, you have to remove the comments within VNC_PORTS. You have to comment the whole section. We have opened an issue to provide more helpful error messages.

Hi Daniel!
Thank you so much, deleting the comments fixed the validation error.

I’ll follow the GH issue. We can close this thread.

BR,

ÁLvaro

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.