Bug 1996816
Summary: | Cluster upgrade fails with: 'OAuthException invalid_grant: The provided authorization grant for the auth code has expired. | ||
---|---|---|---|
Product: | [oVirt] ovirt-ansible-collection | Reporter: | Lorenzo Sartoratti <lorenzo.sartoratti> |
Component: | General | Assignee: | Martin Necas <mnecas> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Lukas Svaty <lsvaty> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | unspecified | CC: | bugs, jean-louis, lleistne, michal.skrivanek, mnecas, mperina |
Target Milestone: | ovirt-4.4.8-1 | Keywords: | Regression |
Target Release: | 1.6.1 | Flags: | sbonazzo:
ovirt-4.4?
michal.skrivanek: blocker+ sbonazzo: planning_ack? pm-rhel: devel_ack+ pm-rhel: testing_ack+ |
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | ovirt-ansible-collection-1.6.1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-09-24 09:27:42 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Lorenzo Sartoratti
2021-08-23 18:07:56 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again. Please attach the full log file - /var/log/ovirt-engine/ansible/ansible-20210823165938-ovirt-cluster-upgrade_yml.log 2021-08-23 16:59:41 CEST - 2021-08-23 16:59:41 CEST - PLAY [oVirt cluster upgrade wizard target] ************************************* 2021-08-23 16:59:41 CEST - TASK [ovirt.ovirt.cluster_upgrade : Initialize variables] ********************** 2021-08-23 16:59:41 CEST - 2021-08-23 16:59:41 CEST - ok: [localhost] 2021-08-23 16:59:41 CEST - { "status" : "OK", "msg" : "", "data" : { "uuid" : "4db4b354-ab3d-45fa-aaba-381c9244ae98", "counter" : 5, "stdout" : "ok: [localhost]", "start_line" : 4, "end_line" : 5, "runner_ident" : "bca07b9a-0422-11ec-b999-00163e4e8aba", "event" : "runner_on_ok", "pid" : 8233, "created" : "2021-08-23T14:59:39.054669", "parent_uuid" : "00163e4e-8aba-6f50-17c2-000000000011", "event_data" : { "playbook" : "ovirt-cluster-upgrade.yml", "playbook_uuid" : "46b70a9d-6673-4a8a-b283-299a08e677c2", "play" : "oVirt cluster upgrade wizard target", "play_uuid" : "00163e4e-8aba-6f50-17c2-00000000000c", "play_pattern" : "localhost", "task" : "Initialize variables", "task_uuid" : "00163e4e-8aba-6f50-17c2-000000000011", "task_action" : "set_fact", "task_args" : "", "task_path" : "/usr/share/ansible/collections/ansible_collections/ovirt/ovirt/roles/cluster_upgrade/tasks/main.yml:5", "role" : "cluster_upgrade", "host" : "localhost", "remote_addr" : "127.0.0.1", "res" : { "changed" : false, "ansible_facts" : { "stop_non_migratable_vms" : true, "provided_token" : "lUXEkJJgi7emCB1YGjLmgwUQTk85_lmIRwhFjuJDMcUTE6c59nGLaYsJhWwhV-UYKHlT0JxsokTH66bBjQZ32Q" }, "_ansible_no_log" : false }, "start" : "2021-08-23T14:59:38.981378", "end" : "2021-08-23T14:59:39.054467", "duration" : 0.073089, "event_loop" : null, "uuid" : "4db4b354-ab3d-45fa-aaba-381c9244ae98" } } } 2021-08-23 16:59:41 CEST - TASK [ovirt.ovirt.cluster_upgrade : Login to oVirt] **************************** 2021-08-23 16:59:41 CEST - 2021-08-23 16:59:41 CEST - ok: [localhost] 2021-08-23 16:59:41 CEST - { "status" : "OK", "msg" : "", "data" : { "uuid" : "b82cb8f0-2589-449d-979a-15612c3ba587", "counter" : 8, "stdout" : "ok: [localhost]", "start_line" : 7, "end_line" : 8, "runner_ident" : "bca07b9a-0422-11ec-b999-00163e4e8aba", "event" : "runner_on_ok", "pid" : 8233, "created" : "2021-08-23T14:59:39.598370", "parent_uuid" : "00163e4e-8aba-6f50-17c2-000000000013", "event_data" : { "playbook" : "ovirt-cluster-upgrade.yml", "playbook_uuid" : "46b70a9d-6673-4a8a-b283-299a08e677c2", "play" : "oVirt cluster upgrade wizard target", "play_uuid" : "00163e4e-8aba-6f50-17c2-00000000000c", "play_pattern" : "localhost", "task" : "Login to oVirt", "task_uuid" : "00163e4e-8aba-6f50-17c2-000000000013", "task_action" : "ovirt_auth", "task_args" : "", "task_path" : "/usr/share/ansible/collections/ansible_collections/ovirt/ovirt/roles/cluster_upgrade/tasks/main.yml:11", "role" : "cluster_upgrade", "host" : "localhost", "remote_addr" : "127.0.0.1", "res" : { "changed" : false, "ansible_facts" : { "ovirt_auth" : { "token" : "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "url" : "https://ovirt.localdomain:443/ovirt-engine/api", "ca_file" : null, "insecure" : true, "timeout" : 0, "compress" : true, "kerberos" : false, "headers" : { } } }, "invocation" : { "module_args" : { "url" : "https://ovirt.localdomain:443/ovirt-engine/api", "username" : "", "hostname" : "", "password" : "", "ca_file" : "", "token" : "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "insecure" : true, "headers" : { }, "timeout" : 0, "compress" : true, "kerberos" : false, "state" : "present", "ovirt_auth" : null } }, "_ansible_no_log" : false }, "start" : "2021-08-23T14:59:39.059610", "end" : "2021-08-23T14:59:39.598056", "duration" : 0.538446, "event_loop" : null, "uuid" : "b82cb8f0-2589-449d-979a-15612c3ba587" } } } 2021-08-23 16:59:41 CEST - TASK [ovirt.ovirt.cluster_upgrade : Get API info] ****************************** 2021-08-23 16:59:41 CEST - 2021-08-23 16:59:41 CEST - An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.AuthError: Error during SSO authentication access_denied : Cannot authenticate user 'None@N/A': No valid profile found in credentials.. fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error during SSO authentication access_denied : Cannot authenticate user 'None@N/A': No valid profile found in credentials.."} 2021-08-23 16:59:41 CEST - { "status" : "OK", "msg" : "", "data" : { "uuid" : "74f26212-9717-4f86-9186-90737f5b51ec", "counter" : 11, "stdout" : "An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.AuthError: Error during SSO authentication access_denied : Cannot authenticate user 'None@N/A': No valid profile found in credentials..\r\nfatal: [localhost]: FAILED! => {\"changed\": false, \"msg\": \"Error during SSO authentication access_denied : Cannot authenticate user 'None@N/A': No valid profile found in credentials..\"}", "start_line" : 10, "end_line" : 12, "runner_ident" : "bca07b9a-0422-11ec-b999-00163e4e8aba", "event" : "runner_on_failed", "pid" : 8233, "created" : "2021-08-23T14:59:40.219831", "parent_uuid" : "00163e4e-8aba-6f50-17c2-000000000014", "event_data" : { "playbook" : "ovirt-cluster-upgrade.yml", "playbook_uuid" : "46b70a9d-6673-4a8a-b283-299a08e677c2", "play" : "oVirt cluster upgrade wizard target", "play_uuid" : "00163e4e-8aba-6f50-17c2-00000000000c", "play_pattern" : "localhost", "task" : "Get API info", "task_uuid" : "00163e4e-8aba-6f50-17c2-000000000014", "task_action" : "ovirt_api_info", "task_args" : "", "task_path" : "/usr/share/ansible/collections/ansible_collections/ovirt/ovirt/roles/cluster_upgrade/tasks/main.yml:27", "role" : "cluster_upgrade", "host" : "localhost", "remote_addr" : "127.0.0.1", "res" : { "msg" : "Error during SSO authentication access_denied : Cannot authenticate user 'None@N/A': No valid profile found in credentials..", "exception" : "Traceback (most recent call last):\n File \"/tmp/ansible_ovirt_api_info_payload_8fukbrop/ansible_ovirt_api_info_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_api_info.py\", line 73, in main\n File \"/usr/lib64/python3.6/site-packages/ovirtsdk4/services.py\", line 27517, in get\n return self._internal_get(headers, query, wait)\n File \"/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py\", line 211, in _internal_get\n return future.wait() if wait else future\n File \"/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py\", line 54, in wait\n response = self._connection.wait(self._context)\n File \"/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py\", line 496, in wait\n return self.__wait(context, failed_auth)\n File \"/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py\", line 526, in __wait\n self._sso_token = self._get_access_token()\n File \"/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py\", line 627, in _get_access_token\n sso_error[1]\novirtsdk4.AuthError: Error during SSO authentication access_denied : Cannot authenticate user 'None@N/A': No valid profile found in credentials..\n", "invocation" : { "module_args" : { "fetch_nested" : false, "nested_attributes" : [ ], "follows" : [ ] } }, "_ansible_no_log" : false, "changed" : false }, "start" : "2021-08-23T14:59:39.604161", "end" : "2021-08-23T14:59:40.219582", "duration" : 0.615421, "ignore_errors" : null, "event_loop" : null, "uuid" : "74f26212-9717-4f86-9186-90737f5b51ec" } } } Hi, which version of the collection do you use? `rpm -q ovirt-ansible-collection` ovirt-ansible-collection-1.6.0-1.el8.noarch *** Bug 1996990 has been marked as a duplicate of this bug. *** Hi, I've just installed the latest version: ovirt-ansible-collection-1.6.2-1.el8.noarch Everything works! Thank you all for the effective and fast support! Lorenzo Hi, I'm sorry but, my fault, the error was related to the Cluster upgrade and not to the compatibility upgrade In any case, the upgrade now works. What still doesn't work is the compatibility upgrade from 4.5 to 4.6 because it can't change the compatibility for the HostedEngine vm: from engine.log 2021-09-01 15:37:17,271+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-5) [28a98510] EVENT_ID: CLUSTER_CANNOT_UPDATE_VM_COMPATIBILITY_VERSION(12,005), Cannot update compatibility version of Vm/Template: [HostedEngine], Message: [No Message] 2021-09-01 15:37:17,457+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-5) [28a98510] EVENT_ID: USER_UPDATE_CLUSTER_FAILED(812), Failed to update Host cluster (User: admin@internal-authz) from web ui: Error while executing action: Cannot update cluster because the update triggered update of the VMs/Templates and it failed for the following: HostedEngine. To fix the issue, please go to each of them, edit, change the Custom Compatibility Version (or other fields changed previously in the cluster dialog) and press OK. If the save does not pass, fix the dialog validation. After successful cluster update, you can revert your Custom Compatibility Version change (or other changes). If the problem still persists, you may refer to the engine.log file for further details. Thank you in advance! Lorenzo Verified in automation, cluster upgrade tests passed, no access_denied error. In ovirt-engine-4.4.8.5-0.4.el8ev.noarch, ovirt-ansible-collection-1.6.2-1.el8ev.noarch |