Description
For vms with more than 150 history records, we have observed even the basic operations like vm start and stop fail with errors like
Internal error Argument list too long - /var/lib/one/remotes/hooks/vm_hook_power_off.sh
Additional Context
The error is due to the history records being high which increased the argument list which is defined by
ARG_MAX(maximum length of arguments to the exec function).
We can't increase the ARG_MAX as it's a limit applied by the OS, so the only solution we can opt for here is to clean up the history records. Please provide your recommendations and let us know a process to clean up the history records.
The currently available option of onedb purge-history deletes history records for all vms instead of just the concerned one, which is not a desirable option for multiple auditing reasons.
USAGE
purge-history
Deletes all but the last history records from non DONE VMs
**WARNING**: This action is done while OpenNebula is running. Make
a backup of the datasbase before executing.
valid options: end_time, start_time
An option should be provided where all the history records of a particular vm can be deleted or a sequence number of history records can be provided to delete some particular set of history records.
Description For vms with more than 150 history records, we have observed even the basic operations like vm start and stop fail with errors like Internal error Argument list too long - /var/lib/one/remotes/hooks/vm_hook_power_off.sh
Additional Context The error is due to the history records being high which increased the argument list which is defined by ARG_MAX(maximum length of arguments to the exec function). We can't increase the ARG_MAX as it's a limit applied by the OS, so the only solution we can opt for here is to clean up the history records. Please provide your recommendations and let us know a process to clean up the history records.
The currently available option of onedb purge-history deletes history records for all vms instead of just the concerned one, which is not a desirable option for multiple auditing reasons.
USAGE
purge-history Deletes all but the last history records from non DONE VMs
An option should be provided where all the history records of a particular vm can be deleted or a sequence number of history records can be provided to delete some particular set of history records.
We created a ticket for this some 3 years back as well https://support.opennebula.pro/hc/en-us/requests/29124
Progress Status