Bug 1702494
| Summary: | Overcloud deployment fails because nova_cellv2_discover_hosts fails on one of the compute nodes: "Duplicate entry 'compute-1.localdomain' for key 'uniq_host_mappings0host' | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Marius Cornea <mcornea> |
| Component: | rhosp-director | Assignee: | RHOS Maint <rhos-maint> |
| Status: | CLOSED DUPLICATE | QA Contact: | Sasha Smolyak <ssmolyak> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15.0 (Stein) | CC: | dbecker, lyarwood, mbooth, mburns, morazi, mschuppe |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-04-24 11:24:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This is same as BZ1698630 , closing as duplicate. Upstream fix: https://review.opendev.org/#/c/655135/ *** This bug has been marked as a duplicate of bug 1698630 *** |
Description of problem: Overcloud deployment fails because nova_cellv2_discover_hosts fails on one of the compute nodes: oslo_db.exception.DBDuplicateEntry: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'compute-1.localdomain' for key 'uniq_host_mappings0host'") [SQL: 'INSERT INTO host_mappings (created_at, updated_at, cell_id, host) VALUES (%(created_at)s, %(updated_at)s, %(cell_id)s, %(host)s)'] [parameters: {'created_at': datetime.datetime(2019, 4, 23, 22, 8, 52, 281643), 'updated_at': None, 'cell_id': 8, 'host': 'compute-1.localdomain'}] (Background on this error at: http://sqlalche.me/e/gkpj) Version-Release number of selected component (if applicable): 15 -p RHOS_TRUNK-15.0-RHEL-8-20190423.n.1 How reproducible: not always Steps to Reproduce: 1. Deploy overcloud with 3 controllers + 3 computes + 3 ceph nodes Actual results: nova_cellv2_discover_hosts container exits with exit code 1 Expected results: Additional info: [root@compute-1 heat-admin]# podman logs nova_cellv2_discover_hosts + command -v python3 + python3 /container-config-scripts/nova_cell_v2_discover_host.py DEBUG:nova_cell_v2_discover_host:Running with parameter insecure = True DEBUG:stevedore.extension:found extension EntryPoint.parse('v1password = swiftclient.authv1:PasswordLoader') DEBUG:stevedore.extension:found extension EntryPoint.parse('token_endpoint = openstackclient.api.auth_plugin:TokenEndpoint') DEBUG:stevedore.extension:found extension EntryPoint.parse('noauth = cinderclient.contrib.noauth:CinderNoAuthLoader') DEBUG:stevedore.extension:found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken') DEBUG:stevedore.extension:found extension EntryPoint.parse('none = keystoneauth1.loading._plugins.noauth:NoAuth') DEBUG:stevedore.extension:found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password') DEBUG:stevedore.extension:found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token') DEBUG:stevedore.extension:found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password') DEBUG:stevedore.extension:found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3adfspassword = keystoneauth1.extras._saml2._loading:ADFSPassword') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3applicationcredential = keystoneauth1.loading._plugins.identity.v3:ApplicationCredential') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3fedkerb = keystoneauth1.extras.kerberos._loading:MappedKerberos') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth') DEBUG:stevedore.extension:found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v3:TOTP') DEBUG:stevedore.extension:found extension EntryPoint.parse('gnocchi-basic = gnocchiclient.auth:GnocchiBasicLoader') DEBUG:stevedore.extension:found extension EntryPoint.parse('gnocchi-noauth = gnocchiclient.auth:GnocchiNoAuthLoader') DEBUG:stevedore.extension:found extension EntryPoint.parse('aodh-noauth = aodhclient.noauth:AodhNoAuthLoader') DEBUG:keystoneauth.session:REQ: curl -g -i -X GET http://172.17.1.50:5000/v3 -H "Accept: application/json" -H "User-Agent: nova_cell_v2_discover_host.py keystoneauth1/3.13.1 python-requests/2.20.0 CPython/3.6.8" DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 172.17.1.50:5000 DEBUG:urllib3.connectionpool:http://172.17.1.50:5000 "GET /v3 HTTP/1.1" 200 None DEBUG:keystoneauth.session:RESP: [200] Content-Encoding: gzip Content-Type: application/json Date: Tue, 23 Apr 2019 22:08:46 GMT Server: Apache Transfer-Encoding: chunked Vary: X-Auth-Token,Accept-Encoding x-openstack-request-id: req-81a4e6d4-199a-405a-9396-3a5fcc071897 DEBUG:keystoneauth.session:RESP BODY: {"version": {"id": "v3.12", "status": "stable", "updated": "2019-01-22T00:00:00Z", "links": [{"rel": "self", "href": "http://172.17.1.50:5000/v3/"}], "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}]}} DEBUG:keystoneauth.session:GET call to http://172.17.1.50:5000/v3 used request id req-81a4e6d4-199a-405a-9396-3a5fcc071897 DEBUG:keystoneauth.identity.v3.base:Making authentication request to http://172.17.1.50:5000/v3/auth/tokens DEBUG:urllib3.connectionpool:http://172.17.1.50:5000 "POST /v3/auth/tokens HTTP/1.1" 201 8355 DEBUG:keystoneauth.identity.v3.base:{"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "c2fa6bb46de34f679961a80b22dbb2c6", "name": "neutron", "password_expires_at": null}, "audit_ids": ["-v_5AnNiRhO093LhWykcXA"], "expires_at": "2019-04-23T23:08:46.000000Z", "issued_at": "2019-04-23T22:08:46.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "090d41b150a84cb48fbf7cf85b8ba3dd", "name": "service"}, "is_domain": false, "roles": [{"id": "dd08bf4f31f746dc96801b77d4734aaf", "name": "reader"}, {"id": "d6df98aa58474b618d8365c80ff909aa", "name": "member"}, {"id": "aeee20a787294edfb48447fb4f78b9bd", "name": "admin"}], "catalog": [{"endpoints": [{"id": "359479e531af4acd8eab3f0cf29e174f", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8776/v2/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}, {"id": "e6087d7b88a347438f882348af9cf3e3", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8776/v2/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}, {"id": "fdbd0e3c100b4321a669c40486ecc3ee", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8776/v2/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}], "id": "00f9b1403ed548288228961f278d099c", "type": "volumev2", "name": "cinderv2"}, {"endpoints": [{"id": "2c9c868a1d5a4bef9e559491295ecf75", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8977", "region": "regionOne"}, {"id": "87b3b3a2283a4781a9d5633eec3daab6", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8977", "region": "regionOne"}, {"id": "e9ce0684b4f044e1b842b6a6b2db221d", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8977", "region": "regionOne"}], "id": "01a2d6de08594e21b55972d86e074cfb", "type": "event", "name": "panko"}, {"endpoints": [{"id": "39402e081b4f41c08ba5ad170bbadf13", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.3.128:8080", "region": "regionOne"}, {"id": "3b87d61cf87749f4a144624ae1c9a5c2", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8080/v1/AUTH_090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}, {"id": "da6621ef22754a7f93b7323e0cbcd8c4", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.3.128:8080/v1/AUTH_090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}], "id": "0c58bc28753e4ce4b0d829ff1c842324", "type": "object-store", "name": "swift"}, {"endpoints": [{"id": "5e808d1c317048a4b721b785c7df05d0", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8042", "region": "regionOne"}, {"id": "88a7521046a94e1f8b41cec765fb7d0f", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8042", "region": "regionOne"}, {"id": "eb07278cacd745e6aad51bb6a4729cf2", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8042", "region": "regionOne"}], "id": "130064f8915f4c9facea6182e6857eea", "type": "alarming", "name": "aodh"}, {"endpoints": [{"id": "1cbfce87e83f4bdca43610093e570026", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:5000", "region": "regionOne"}, {"id": "5c7c1ce2ad2b44adba1e65eeb5ee3471", "interface": "admin", "region_id": "regionOne", "url": "http://192.168.24.12:35357", "region": "regionOne"}, {"id": "6dc60c099c6a492a95da82d7c6ffa3d6", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:5000", "region": "regionOne"}], "id": "136233b012cf456d8cf7bcf8c32c37af", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "3cc66a024ef6426c8d20118058e55c2f", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8000/v1", "region": "regionOne"}, {"id": "5118c1f1f0094d79a3c2deeff06ce068", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8000/v1", "region": "regionOne"}, {"id": "fc37a139b6fd44639d277dbc098db77a", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8000/v1", "region": "regionOne"}], "id": "3dc3f2c8da7040009288ac1e8e4a7cb2", "type": "cloudformation", "name": "heat-cfn"}, {"endpoints": [{"id": "1b7403c3b76e4cef8b5e1ca4de0ae3c9", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8774/v2.1", "region": "regionOne"}, {"id": "b238c23d0f0a4a8bb4b43c7945016d3d", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8774/v2.1", "region": "regionOne"}, {"id": "ca9759f3a012453082a16295d66305b3", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8774/v2.1", "region": "regionOne"}], "id": "655d36260d2644169970625b44f98209", "type": "compute", "name": "nova"}, {"endpoints": [], "id": "67cf5d91649f4bb2866963665907e5b5", "type": "metering", "name": "ceilometer"}, {"endpoints": [{"id": "344b603ca0214ebdbc9d0ff53a80c023", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8778/placement", "region": "regionOne"}, {"id": "ae991d9eb0704dd1a87b0a86f3351882", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8778/placement", "region": "regionOne"}, {"id": "b3ff4df81f684c009f556b898df02079", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8778/placement", "region": "regionOne"}], "id": "76ae66bba50c45f49922bea486c12e95", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "66b64afd9a0e4d40b4bf3c62608693e0", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8041", "region": "regionOne"}, {"id": "9e4db8760db54a0fa1c3562e429851c8", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8041", "region": "regionOne"}, {"id": "ae814a022cf64f48a9348a7bc0f4393b", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8041", "region": "regionOne"}], "id": "ad69c92270274e8e9114427dd5e5d396", "type": "metric", "name": "gnocchi"}, {"endpoints": [{"id": "668122cccaa94d12a795db5f8e64dfff", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8776/v3/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}, {"id": "c5f9212b699347d99a382267cc4cf5b7", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8776/v3/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}, {"id": "e1b352fe4d714f5eba5cef5e9575c4c2", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8776/v3/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}], "id": "ce4cb5e802c0479d842aefa6dce1faca", "type": "volumev3", "name": "cinderv3"}, {"endpoints": [{"id": "2362ccf7cab74100b7cfa3bafd678c4f", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:9292", "region": "regionOne"}, {"id": "b4a39288c56149538226175740d9c818", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:9292", "region": "regionOne"}, {"id": "c9de49ebd0124c1ea60e6ddbecc75468", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:9292", "region": "regionOne"}], "id": "ed73751fda05402cb27869329178d662", "type": "image", "name": "glance"}, {"endpoints": [{"id": "4fd6c9fdc6fb479e851bc44e55b12e78", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:9696", "region": "regionOne"}, {"id": "5855120f856842c29e570c45d39d9148", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:9696", "region": "regionOne"}, {"id": "b065045715ce43788bd6b47dc4f25ac8", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:9696", "region": "regionOne"}], "id": "f99bd0d678894461b53b26af5d3398e8", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "2cacc8f114a64572a06765d6fec7991b", "interface": "internal", "region_id": "regionOne", "url": "http://172.17.1.50:8004/v1/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}, {"id": "7a70031573c344c9bb34a7f4c9e535ea", "interface": "admin", "region_id": "regionOne", "url": "http://172.17.1.50:8004/v1/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}, {"id": "a83680f303de4500a4a7d682975c970f", "interface": "public", "region_id": "regionOne", "url": "http://10.0.0.140:8004/v1/090d41b150a84cb48fbf7cf85b8ba3dd", "region": "regionOne"}], "id": "fd5da17268374ca8aefa2d8ec3a69ae9", "type": "orchestration", "name": "heat"}]}} DEBUG:keystoneauth.session:REQ: curl -g -i -X GET http://172.17.1.50:8774/v2.1/os-services?binary=nova-compute -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA256}e32e34bdbd21359c7b23d91241cc2ddb6cee92c5fd539342c42337c6f3b93413" -H "X-OpenStack-Nova-API-Version: 2.11" DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 172.17.1.50:8774 DEBUG:urllib3.connectionpool:http://172.17.1.50:8774 "GET /v2.1/os-services?binary=nova-compute HTTP/1.1" 200 None DEBUG:keystoneauth.session:RESP: [200] Content-Encoding: gzip Content-Type: application/json Date: Tue, 23 Apr 2019 22:08:46 GMT OpenStack-API-Version: compute 2.11 Server: Apache Transfer-Encoding: chunked Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version,Accept-Encoding X-OpenStack-Nova-API-Version: 2.11 x-compute-request-id: req-c123de84-8699-478f-90ad-3d9027e83171 x-openstack-request-id: req-c123de84-8699-478f-90ad-3d9027e83171 DEBUG:keystoneauth.session:RESP BODY: {"services": [{"binary": "nova-compute", "host": "compute-1.localdomain", "id": 62, "zone": "nova", "status": "enabled", "state": "up", "updated_at": "2019-04-23T22:08:40.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-compute", "host": "compute-2.localdomain", "id": 65, "zone": "nova", "status": "enabled", "state": "up", "updated_at": "2019-04-23T22:08:38.000000", "disabled_reason": null, "forced_down": false}, {"binary": "nova-compute", "host": "compute-0.localdomain", "id": 83, "zone": "nova", "status": "enabled", "state": "up", "updated_at": "2019-04-23T22:08:38.000000", "disabled_reason": null, "forced_down": false}]} DEBUG:keystoneauth.session:GET call to compute for http://172.17.1.50:8774/v2.1/os-services?binary=nova-compute used request id req-c123de84-8699-478f-90ad-3d9027e83171 INFO:nova_cell_v2_discover_host:(cellv2) Service registered, running discovery Found 2 cell mappings. Skipping cell0 since it does not contain hosts. Getting computes from cell 'default': a8519bd3-553c-457c-8f7f-d3be2e410ba4 Creating host mapping for service compute-1.localdomain An error has occurred: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 204, in _check_and_create_service_host_mappings HostMapping.get_by_host(ctxt, service.host) File "/usr/lib/python3.6/site-packages/oslo_versionedobjects/base.py", line 184, in wrapper result = fn(cls, context, *args, **kwargs) File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 100, in get_by_host db_mapping = cls._get_by_host_from_db(context, host) File "/usr/lib/python3.6/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 1012, in wrapper return fn(*args, **kwargs) File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 95, in _get_by_host_from_db raise exception.HostMappingNotFound(name=host) nova.exception.HostMappingNotFound: Host 'compute-1.localdomain' is not mapped to any cell During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context context) File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 508, in do_execute cursor.execute(statement, parameters) File "/usr/lib/python3.6/site-packages/pymysql/cursors.py", line 165, in execute result = self._query(query) File "/usr/lib/python3.6/site-packages/pymysql/cursors.py", line 321, in _query conn.query(q) File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 860, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1061, in _read_query_result result.read() File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1349, in read first_packet = self.connection._read_packet() File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1018, in _read_packet packet.check_error() File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 384, in check_error err.raise_mysql_exception(self._data) File "/usr/lib/python3.6/site-packages/pymysql/err.py", line 107, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.IntegrityError: (1062, "Duplicate entry 'compute-1.localdomain' for key 'uniq_host_mappings0host'") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/nova/cmd/manage.py", line 2371, in main ret = fn(*fn_args, **fn_kwargs) File "/usr/lib/python3.6/site-packages/nova/cmd/manage.py", line 1473, in discover_hosts by_service) File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 265, in discover_hosts by_service) File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 224, in _check_and_create_host_mappings status_fn) File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 211, in _check_and_create_service_host_mappings host_mapping.create() File "/usr/lib/python3.6/site-packages/oslo_versionedobjects/base.py", line 226, in wrapper return fn(self, *args, **kwargs) File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 114, in create db_mapping = self._create_in_db(self._context, changes) File "/usr/lib/python3.6/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 1012, in wrapper return fn(*args, **kwargs) File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 107, in _create_in_db return _apply_updates(context, db_mapping, updates) File "/usr/lib/python3.6/site-packages/nova/objects/host_mapping.py", line 33, in _apply_updates db_mapping.save(context.session) File "/usr/lib/python3.6/site-packages/oslo_db/sqlalchemy/models.py", line 50, in save session.flush() File "/usr/lib64/python3.6/site-packages/sqlalchemy/orm/session.py", line 2254, in flush self._flush(objects) File "/usr/lib64/python3.6/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush transaction.rollback(_capture_exception=True) File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 187, in reraise raise value File "/usr/lib64/python3.6/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush flush_context.execute() File "/usr/lib64/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute rec.execute(self) File "/usr/lib64/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute uow File "/usr/lib64/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj mapper, table, insert) File "/usr/lib64/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 866, in _emit_insert_statements execute(statement, params) File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 948, in execute return meth(self, multiparams, params) File "/usr/lib64/python3.6/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement compiled_sql, distilled_params File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context context) File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1409, in _handle_dbapi_exception util.raise_from_cause(newraise, exc_info) File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 186, in reraise raise value.with_traceback(tb) File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context context) File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 508, in do_execute cursor.execute(statement, parameters) File "/usr/lib/python3.6/site-packages/pymysql/cursors.py", line 165, in execute result = self._query(query) File "/usr/lib/python3.6/site-packages/pymysql/cursors.py", line 321, in _query conn.query(q) File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 860, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1061, in _read_query_result result.read() File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1349, in read first_packet = self.connection._read_packet() File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1018, in _read_packet packet.check_error() File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 384, in check_error err.raise_mysql_exception(self._data) File "/usr/lib/python3.6/site-packages/pymysql/err.py", line 107, in raise_mysql_exception raise errorclass(errno, errval) oslo_db.exception.DBDuplicateEntry: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'compute-1.localdomain' for key 'uniq_host_mappings0host'") [SQL: 'INSERT INTO host_mappings (created_at, updated_at, cell_id, host) VALUES (%(created_at)s, %(updated_at)s, %(cell_id)s, %(host)s)'] [parameters: {'created_at': datetime.datetime(2019, 4, 23, 22, 8, 52, 281643), 'updated_at': None, 'cell_id': 8, 'host': 'compute-1.localdomain'}] (Background on this error at: http://sqlalche.me/e/gkpj)