Closed peterywong closed 12 months ago
that is very odd... can you check the task "Collect updated facts" and view that output to see what it sees as the major version there?
TASK [infra.leapp.upgrade : Collect updated facts] *** ok: [sys-test-nl02]
You will need to run it in verbose mode if you are doing this CLI or you could use navigator to dive deeper into it and see the values in that task
TASK [infra.leapp.upgrade : Collect updated facts] *** task path: /Users/peter/.ansible/collections/ansible_collections/infra/leapp/roles/upgrade/tasks/upgrade-validation.yml:2 Using module file /opt/homebrew/Cellar/ansible/8.0.0/libexec/lib/python3.11/site-packages/ansible/modules/setup.py Pipelining is enabled.
TASK [infra.leapp.upgrade : Determine rhel_dest_major_version] *** task path: /Users/peter/.ansible/collections/ansible_collections/infra/leapp/roles/upgrade/tasks/upgrade-validation.yml:5 ok: [sys-test-nl02] => changed=false ansible_facts: rhel_dest_major_version: '8'
TASK [infra.leapp.upgrade : Validate current OS major version] *** task path: /Users/peter/.ansible/collections/ansible_collections/infra/leapp/roles/upgrade/tasks/upgrade-validation.yml:9 fatal: [sys-test-nl02]: FAILED! => changed=false assertion: ansible_distribution_major_version == rhel_dest_major_version evaluated_to: false msg: Expected leapp destination OS major version 8 but OS major version is 7. NOTIFIED HANDLER infra.leapp.common : Add end time to log file for sys-test-nl02 NOTIFIED HANDLER infra.leapp.common : Slurp ripu.log file for sys-test-nl02 NOTIFIED HANDLER infra.leapp.common : Decode ripu.log file for sys-test-nl02 NOTIFIED HANDLER infra.leapp.common : Rename log file for sys-test-nl02
I don't understand.... it is rhel 8 and the destination version is 8 so why it is failing that assertion doesn't add up
That's what I don't understand either.
Could it be a bug in Ansible core 2.15.0?
you aren't using ansible-core 2.15 you are using ansible 8 from the looks of the output you have provided
This is what I get from --version
peter@PetersMacStudio ansible % ansible --version [WARNING]: log file at /var/log/ansible.log is not writeable and we cannot create it, aborting
ansible [core 2.15.0] config file = /Users/peter/Git/ansible/ansible.cfg configured module search path = ['/Users/peter/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /opt/homebrew/Cellar/ansible/8.0.0/libexec/lib/python3.11/site-packages/ansible ansible collection location = /Users/peter/.ansible/collections:/usr/share/ansible/collections executable location = /opt/homebrew/bin/ansible python version = 3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)] (/opt/homebrew/Cellar/ansible/8.0.0/libexec/bin/python3.11) jinja version = 3.1.2 libyaml = True
peter@PetersMacStudio ansible % ansible-playbook --version [WARNING]: log file at /var/log/ansible.log is not writeable and we cannot create it, aborting
ansible-playbook [core 2.15.0] config file = /Users/peter/Git/ansible/ansible.cfg configured module search path = ['/Users/peter/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /opt/homebrew/Cellar/ansible/8.0.0/libexec/lib/python3.11/site-packages/ansible ansible collection location = /Users/peter/.ansible/collections:/usr/share/ansible/collections executable location = /opt/homebrew/bin/ansible-playbook python version = 3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)] (/opt/homebrew/Cellar/ansible/8.0.0/libexec/bin/python3.11) jinja version = 3.1.2 libyaml = True
Ansible 8 is ansible-core 2.15 according to this link https://docs.ansible.com/ansible/latest/roadmap/COLLECTIONS_8.html
I mean it is but it isn't exactly but that is fine. no I don't think that it is related to the version... I will have to think about this some more to try and come up with some more things to try to figure out why this is happening
Thank you for looking into this issue.
are you still having this issue?
Yes, I'm still having the same issue.
I have tried running the same playbook on a RHEL7 machine and it has the same issues as running it on a MacOS.
I have been thinking about this, I don't see why it would matter but maybe try run with ansible-navigator...
Looks like I got it working now, I was missing gather_facts in my second script.
Thank you for your help.
During the post upgrade checks, it does not seem to be getting the correct version.
TASK [infra.leapp.upgrade : Validate current OS major version] *** fatal: [sys-test-nl02]: FAILED! => changed=false assertion: ansible_distribution_major_version == rhel_dest_major_version evaluated_to: false msg: Expected leapp destination OS major version 8 but OS major version is 7.