Error allocating new datastore

Hi all,

yesterday I created a federation of one existing zone and a new one. Just for explaining I’ll take the names “DATACENTER A”, which is the existing Opennebula, and “DATACENTER B”, wich is the new one. Now when I would like to create datastores in “DATACENTER B” I got this error below:


[DatastoreAllocate] Error allocating a new datastore. NAME is already taken by DATASTORE 100.


Also when I want to create new Datacenters I’ll get the following error:


Thu May 28 07:51:07 2015 [Z0][ReM][D]: Req:1728 UID:0 VdcAllocate invoked , “NAME=”#NAMEOFVDC#“…”
Thu May 28 07:51:07 2015 [Z0][ONE][E]: SQL command was: INSERT INTO vdc_pool (oid, name, body, uid, gid, owner_u, group_u, other_u) VALUES (100,‘#NAMEOFVDC#’,'100#NAMEOFVDC#</GROUPS

',0,0,1,0,0), error 1062 : Duplicate entry ‘100’ for key ‘PRIMARY’
Thu May 28 07:51:07 2015 [Z0][ReM][E]: Req:1728 UID:0 VdcAllocate result FAILURE [VdcAllocate] Error allocating a new VDC.

There seems to to be that the autoincrement isn’t working right now. The ID are already taken by other ressources.

How to fix?

Both Opennebula are running under version OpenNebula 4.12.1

Thanks in advance!

Patrick

Perhaps this is caused by the actual values in the “pool_control” table of OpenNebula?

For example:

mysql> select * from pool_control ;
+----------------+----------+
| tablename      | last_oid |
+----------------+----------+
| acl            |      212 |
| cluster_pool   |      100 |
| datastore_pool |       99 |
| group_pool     |      116 |
| host_pool      |        3 |
| secgroup_pool  |       99 |
| user_pool      |       21 |
| vdc_pool       |      100 |
| zone_pool      |      100 |
+----------------+----------+
9 rows in set (0.00 sec)

If the ID`s are already taken by “old” Objects there could be a pontential clash.

Question: Is it allowed to change the last_oid values manually by editing the table?

Best regards

Sebastian