Hi All,
I’m having a bizarre authentication issue on a new OpenNebula installation. I’ve set up a new MySQL cluster using Galera. As best as I can tell, all the MySQL backend components are properly set up. I can connect to mysql without any problems. The onedb tool also seems to be connecting properly (although OpenNebula hasn’t bootstrapped yet). Here’s what I can do:
[oneadmin@nebula-1 ~]$ mysql -u oneadmin --password=onepass -h localhost
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 835
Server version: 10.0.17-MariaDB-wsrep MariaDB Server, wsrep_25.10.r4144
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show grants;
+-----------------------------------------------------------------------------------------------------------------+
| Grants for oneadmin@localhost |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'oneadmin'@'localhost' IDENTIFIED BY PASSWORD '*B9D675ADDE4D3F7E65CBE4FCD51687EA46413DF0' |
| GRANT ALL PRIVILEGES ON `opennebula`.* TO 'oneadmin'@'localhost' |
+-----------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
MariaDB [(none)]>
Of course, the opennebula database is currently empty, because it hasn’t bootstrapped yet:
MariaDB [(none)]> use opennebula;
Database changed
MariaDB [opennebula]> show tables;
Empty set (0.00 sec)
Similarly, it appears that the onedb tool is connecting to the database and successfully searching for the user_pool table:
[oneadmin@nebula-1 ~]$ onedb fsck -v -S localhost -u oneadmin -p onepass -d opennebula
Database schema does not look to be created by OpenNebula: table user_pool is missing or empty.
Here’s the relevant section from my oned.conf
file:
[oneadmin@nebula-1 ~]$ grep "^DB" -A8 /etc/one/oned.conf
DB = [
backend = "mysql",
server = "localhost",
port = 0,
user = "oneadmin",
password = "onepass",
db_name = "opennebula"
]
However, oned fails to start:
[oneadmin@nebula-1 ~]$ one start
Could not open connect to database server.
oned failed to start
/bin/one: line 117: 231915 Terminated $ONE_SCHEDULER
I can’t find anything suspicious in the logfile, either (snipped):
Thu Mar 19 22:59:01 2015 [Z0][ONE][I]: Starting OpenNebula 4.12.0
----------------------------------------
OpenNebula Configuration File
----------------------------------------
AUTH_MAD=AUTHN=ssh,x509,ldap,server_cipher,server_x509,EXECUTABLE=one_auth_mad
DATASTORE_BASE_PATH=/var/lib/one//datastores
DATASTORE_CAPACITY_CHECK=yes
DATASTORE_LOCATION=/var/lib/one//datastores
DATASTORE_MAD=ARGUMENTS=-t 15 -d dummy,fs,vmfs,lvm,ceph,dev,EXECUTABLE=one_datastore
DB=BACKEND=mysql,DB_NAME=opennebula,PASSWORD=onepass,PORT=0,SERVER=localhost,USER=oneadmin
...
----------------------------------------
Thu Mar 19 22:59:01 2015 [Z0][ONE][I]: Log level:3 [0=ERROR,1=WARNING,2=INFO,3=DEBUG]
Thu Mar 19 22:59:01 2015 [Z0][ONE][I]: Support for xmlrpc-c > 1.31: yes
I’ve put an strace
on the oned
process. I can see that it is accessing the MySQL socket. So, I tried setting the hostname to a network address (to force TCP a connection to MySQL instead of socket connection). I also GRANTed the appropriate privileges in MySQL. No luck. I was able to start up successfully by switching back to sqlite, but that’s no good for our HA setup.
I was trying this with OpenNebula version 4.10 all week. Today I upgraded to 4.12, but no change.
What could I possibly be doing wrong? What should I try next?
Thanks!