Dear all

On a Yoga installation I see a problem with the ec2-api:

[sgaravat@lxsgaravat ~]$ euca-describe-images -I ${EC2_ACCESS_KEY} -S ${EC2_SECRET_KEY}
euca-describe-images: error (DBDuplicateEntry): Unknown error occurred.
[sgaravat@lxsgaravat ~]$

In the log I see a duplicate entry errore [*]
It's not fully clear to me what the problem is and why this query should add an entry in that table ...

Any help is appreciated

Thanks, Massimo

PS: yes, I am aware that the ec2-api project is "dead" and not part of recent OpenStack distributions



[*]
 2024-07-25 14:49:11.052 37118 ERROR ec2api.api oslo_db.exception.DBDuplicateEntry: (pymysql.err.IntegrityError) (1062, "Duplicate entry '4ae7a803-d7cd-4725-8b2e-65797a64ef94' for key 'items.items_os_id_idx'")
2024-07-25 14:49:11.052 37118 ERROR ec2api.api [SQL: INSERT INTO items (id, project_id, vpc_id, os_id, data) VALUES (%(id)s, %(project_id)s, %(vpc_id)s, %(os_id)s, %(data)s)]
2024-07-25 14:49:11.052 37118 ERROR ec2api.api [parameters: {'id': 'ami-e561c280', 'project_id': '56c3f5c047e74a78a71438c4412e6e13', 'vpc_id': None, 'os_id': '4ae7a803-d7cd-4725-8b2e-65797a64ef94', 'data': '{"is_public": true}'}]
2024-07-25 14:49:11.052 37118 ERROR ec2api.api (Background on this error at: https://sqlalche.me/e/14/gkpj)
2024-07-25 14:49:11.052 37118 ERROR ec2api.api
2024-07-25 14:49:11.055 37118 ERROR ec2api.api [req-cda08c1a-009c-4c7d-b019-c30bce32baa4 9bd03f63fa9d4beb8de31e6c2f2c8d12 56c3f5c047e74a78a71438c4412e6e13 - - -] Environment: {"wsgi.url_scheme": "http", "REQUEST_METHOD": "POST", "SCRIPT_NAME": "", "RAW_PATH_INFO": "/services/Cloud", "PATH_INFO": "/services/Cloud", "CONTENT_TYPE": "application/x-www-form-urlencoded", "CONTENT_LENGTH": "53", "SERVER_PROTOCOL": "HTTP/1.0", "SERVER_NAME": "192.168.60.42", "SERVER_PORT": "8788", "REMOTE_ADDR": "192.168.60.229", "REMOTE_PORT": "33840", "GATEWAY_INTERFACE": "CGI/1.1", "HTTP_ACCEPT_ENCODING": "gzip, deflate", "HTTP_ACCEPT": "*/*", "HTTP_USER_AGENT": "euca2ools/3.4.1 (CPython 2.7.5; Linux 3.10.0-1160.92.1.el7.x86_64; x86_64) requestbuilder/0.7.1 requests/2.19.1", "HTTP_HOST": "cloud-areapd-test.pd.infn.it:8788", "HTTP_X_AMZ_CONTENT_SHA256": "afe617936fea90d9c62d9f87dd3e9d18e1fc5178d08aeebfb8737f32042a0b6d", "HTTP_X_AMZ_DATE": "20240725T124910Z", "HTTP_AUTHORIZATION": "AWS4-HMAC-SHA256 Credential=220cd4ffe5aa435cb56adfd5a9a3b234/20240725/undefined-15030/ec2/aws4_request, SignedHeaders=accept;accept-encoding;content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=c0cc81d64a4477db4dc8be0d478b8746bb013f7273b6460f411d95a5d6efe946", "HTTP_X_FORWARDED_PROTO": "https", "HTTP_X_FORWARDED_FOR": "193.205.157.174", "HTTP_CONNECTION": "close"}: oslo_db.exception.DBDuplicateEntry: (pymysql.err.IntegrityError) (1062, "Duplicate entry '4ae7a803-d7cd-4725-8b2e-65797a64ef94' for key 'items.items_os_id_idx'")
2024-07-25 14:49:11.055 37118 INFO ec2api.api [req-cda08c1a-009c-4c7d-b019-c30bce32baa4 9bd03f63fa9d4beb8de31e6c2f2c8d12 56c3f5c047e74a78a71438c4412e6e13 - - -] 0.811724s 192.168.60.229 POST /services/Cloud DescribeImages 500 [euca2ools/3.4.1 (CPython 2.7.5; Linux 3.10.0-1160.92.1.el7.x86_64; x86_64) requestbuilder/0.7.1 requests/2.19.1] application/x-www-form-urlencoded text/xml
2024-07-25 14:49:11.056 37118 INFO ec2api.wsgi.server [req-cda08c1a-009c-4c7d-b019-c30bce32baa4 9bd03f63fa9d4beb8de31e6c2f2c8d12 56c3f5c047e74a78a71438c4412e6e13 - - -] 193.205.157.174,192.168.60.229 "POST /services/Cloud HTTP/1.1" status: 500 len: 348 time: 0.8139334
2024-07-25 14:49:14.391 37119 INFO ec2api.api [req-417ab595-646d-4468-9464-f19c7392c201 9bd03f63fa9d4beb8de31e6c2f2c8d12 56c3f5c047e74a78a71438c4412e6e13 - - -] 4.822310s 192.168.60.229 POST /services/Cloud DescribeInstances 200 [euca2ools/3.4.1 (CPython 2.7.5; Linux 3.10.0-1062.9.1.el7.x86_64; x86_64) requestbuilder/0.7.1 requests/2.19.1] application/x-www-form-urlencoded text/xml
2024-07-25 14:49:14.392 37119 INFO ec2api.wsgi.server [req-417ab595-646d-4468-9464-f19c7392c201 9bd03f63fa9d4beb8de31e6c2f2c8d12 56c3f5c047e74a78a71438c4412e6e13 - - -] 193.206.210.240,192.168.60.229 "POST /services/Cloud HTTP/1.1" status: 200 len: 11274 time: 4.8234410