Skip to content

Recurrent insert errors in database on vm schedules #11564

@KuasarCloud

Description

@KuasarCloud

problem

After creating a schedule to start/stop vm_instances, a recurrent error appears in logs

025-07-17 11:29:19,383 ERROR [o.a.c.v.s.d.VMScheduledJobDaoImpl] (VMSchedulerPollTask:[ctx-d11d1302]) (logid:c3157b08) DB Exception on: HikariProxyPreparedStatement@614529765 wrapping com.mysql.cj.jdbc.ServerPreparedStatement[6379]: INSERT INTO vm_scheduled_job (vm_scheduled_job.uuid, vm_scheduled_job.vm_id, vm_scheduled_job.vm_schedule_id, vm_scheduled_job.async_job_id, vm_scheduled_job.action, vm_scheduled_job.scheduled_timestamp) VALUES (x'65396330306236652d626463622d346430612d396162332d663466636136343536356130', 293, 120, NULL, 'STOP', '2025-07-18 04:00:00') java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '120-2025-07-18 04:00:00' for key 'vm_schedule_id'

I have two management host running with ACS 4.20.1 with KVM Hypervisors. Any clue what is trying to insert it again in the database?

versions

Version

ACS 4.20.1
KVM Hyps
Ceph Storage
VPC Tiers

The steps to reproduce the bug

  1. Have 2 ACS management server running
  2. Create a VM
  3. Schedule START / STOP

What to do about it?

It appears to be a race condition error caused by multiple scheduler instances running concurrently. We have two ACS Server Manager nodes, and when a scheduled task is created on one node, the other node throws an error — and the same happens in reverse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions