Onedb purge-done does not work on one of our servers

Hello,

I am newbie for using OpenNebula and I have strange problem one of our OpenNebula Servers. For every staging area we have one OpenNebula server for managing our VMs in these staging areas.
As we have a big history for VMs in done state, we want to setup a cron job that automatically purges all VMs older than 90 days in the done state:

onedb purge-done --end `date “+%Y/%m/%d” --date=“90 days ago”`

This command works on all OpenNebula servers accept on one server, that is the most important one… See the error message below. My guess here is that something is wrong with the data in the MySQL database?
I hope someone can help and explain what this error message means. And how to further debug the problem.


Versions of the related components and OS (frontend, hypervisors, VMs):
CentOS 7.6.1810
OpenNebula 5.6.1 (it was updated from version 4.2.0 -> version 4.4.1 -> version 4.6.0 -> version 4.11.80 -> version 5.6.0)
Ruby 2.0.0p648
MySQL 5.7.24-1

All server use the same versions and had the same DB version update cycle.

Steps to reproduce:
It is specific to the one node that is failing.

Current results:
on the failing server I get this output:

[oneadmin@one-stg2 ~]$ onedb purge-done --end `date “+%Y/%m/%d” --date=“90 days ago”`
xpath
["/usr/lib/one/ruby/opennebula/xml_element.rb:87:in []'", "/usr/lib/one/ruby/onedb/onedb_live.rb:223:inpurge_done_vm’",
“/bin/onedb:506:in block (2 levels) in <main>'", "/usr/lib/one/ruby/cli/command_parser.rb:457:incall’”,
“/usr/lib/one/ruby/cli/command_parser.rb:457:in run'", "/usr/lib/one/ruby/cli/command_parser.rb:84:ininitialize’”,
“/bin/onedb:294:in new'", "/bin/onedb:294:in'”]

Expected results:
on every other server I see a counter go up to 100% and no error message.

Regards,
Michael

Hello @michaz

The command you are using is wrong, in date you should put a valid format date.

Hi Alejandro,

actually the command is correct. It is just a problem with the editor here. Seems it interpret the ` in a special way and needs a \ before it… I changed it now.
And as said this command really works on all other servers we have with OpenNebula. It just do not work on one of them.

Sorry the editor here seems to mess up quotation marks. You need to change the " quotes in the command above…

Hello @michaz

Take a look on this, maybe it helps you.