Actions
Bug #63433
opendevicehealth: sqlite3.IntegrityError: UNIQUE constraint failed: DeviceHealthMetrics.time, DeviceHealthMetrics.devid
Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
devicehealth module
Target version:
% Done:
0%
Source:
Q/A
Tags:
backport_processed
Backport:
reef,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Description
/a/yuriw-2023-11-02_14:20:05-rados-wip-yuri6-testing-2023-11-01-0745-reef-distro-default-smithi/7444580
2023-11-02T15:07:19.668 INFO:tasks.ceph.mgr.x.smithi174.stderr:2023-11-02T15:07:19.666+0000 7fdfd8354700 -1 mgr handle_command module 'devicehealth' command handler threw exception: UNIQUE constraint failed: DeviceHealthMetrics.time, DeviceHealthMetrics.devid
2023-11-02T15:07:19.669 INFO:tasks.ceph.mgr.x.smithi174.stderr:2023-11-02T15:07:19.667+0000 7fdfd8354700 -1 mgr.server reply reply (22) Invalid argument Traceback (most recent call last):
2023-11-02T15:07:19.669 INFO:tasks.ceph.mgr.x.smithi174.stderr: File "/usr/share/ceph/mgr/mgr_module.py", line 1811, in _handle_command
2023-11-02T15:07:19.669 INFO:tasks.ceph.mgr.x.smithi174.stderr: return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
2023-11-02T15:07:19.669 INFO:tasks.ceph.mgr.x.smithi174.stderr: File "/usr/share/ceph/mgr/mgr_module.py", line 474, in call
2023-11-02T15:07:19.669 INFO:tasks.ceph.mgr.x.smithi174.stderr: return self.func(mgr, **kwargs)
2023-11-02T15:07:19.670 INFO:tasks.ceph.mgr.x.smithi174.stderr: File "/usr/share/ceph/mgr/mgr_module.py", line 524, in check
2023-11-02T15:07:19.670 INFO:tasks.ceph.mgr.x.smithi174.stderr: return func(self, *args, **kwargs)
2023-11-02T15:07:19.670 INFO:tasks.ceph.mgr.x.smithi174.stderr: File "/usr/share/ceph/mgr/devicehealth/module.py", line 203, in do_scrape_health_metrics
2023-11-02T15:07:19.670 INFO:tasks.ceph.mgr.x.smithi174.stderr: return self.scrape_all()
2023-11-02T15:07:19.671 INFO:tasks.ceph.mgr.x.smithi174.stderr: File "/usr/share/ceph/mgr/devicehealth/module.py", line 435, in scrape_all
2023-11-02T15:07:19.671 INFO:tasks.ceph.mgr.x.smithi174.stderr: self.put_device_metrics(device, data)
2023-11-02T15:07:19.671 INFO:tasks.ceph.mgr.x.smithi174.stderr: File "/usr/share/ceph/mgr/devicehealth/module.py", line 511, in put_device_metrics
2023-11-02T15:07:19.671 INFO:tasks.ceph.mgr.x.smithi174.stderr: self.db.execute(SQL, (devid, json.dumps(data)))
2023-11-02T15:07:19.672 INFO:tasks.ceph.mgr.x.smithi174.stderr:sqlite3.IntegrityError: UNIQUE constraint failed: DeviceHealthMetrics.time, DeviceHealthMetrics.devid
Updated by Laura Flores 6 months ago
Possibly introduced in https://github.com/ceph/ceph/commit/88acd303233ac32cc4c4f9961b21b88089027173?
Updated by Patrick Donnelly 6 months ago
- Project changed from cephsqlite to mgr
- Subject changed from sqlite3.IntegrityError: UNIQUE constraint failed: DeviceHealthMetrics.time, DeviceHealthMetrics.devid to devicehealth: sqlite3.IntegrityError: UNIQUE constraint failed: DeviceHealthMetrics.time, DeviceHealthMetrics.devid
Laura Flores wrote:
Possibly introduced in https://github.com/ceph/ceph/commit/88acd303233ac32cc4c4f9961b21b88089027173?
It's a different bug: two scrapes of a device at the same DATETIME (i.e. seconds since epoch) will cause this error.
Updated by Patrick Donnelly 6 months ago
- Category set to devicehealth module
- Status changed from New to Fix Under Review
- Assignee set to Patrick Donnelly
- Target version set to v19.0.0
- Source set to Q/A
- Backport set to reef,quincy
- Pull request ID set to 54337
Updated by Patrick Donnelly 5 months ago
- Status changed from Fix Under Review to Pending Backport
Updated by Backport Bot 5 months ago
- Copied to Backport #63796: reef: devicehealth: sqlite3.IntegrityError: UNIQUE constraint failed: DeviceHealthMetrics.time, DeviceHealthMetrics.devid added
Updated by Backport Bot 5 months ago
- Copied to Backport #63797: quincy: devicehealth: sqlite3.IntegrityError: UNIQUE constraint failed: DeviceHealthMetrics.time, DeviceHealthMetrics.devid added
Actions