Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated preflight and added debian tasks #300

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

0lzi
Copy link

@0lzi 0lzi commented Jun 6, 2024

Moved redhat and ubuntu related tasks to their own tasks.yml and added one for debian, ran the tasks against debian 12 boxes we have and it worked. If there is any documentation for running tests?

cephadm-preflight.yml Outdated Show resolved Hide resolved
tasks/Centos.yml Outdated Show resolved Hide resolved
@tchaikov tchaikov changed the title updated prefilight and added debain tasks updated prefilight and added debian tasks Jun 10, 2024
@0lzi 0lzi changed the title updated prefilight and added debian tasks updated preflight and added debian tasks Jun 10, 2024
- name: enable red hat ceph storage tools repository
rhsm_repository:
name: "rhceph-{{ ceph_rhcs_version }}-tools-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms"
- name: Import specific OS-related tasks
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't seem to work

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TASK [Import specific OS-related tasks] ****************************************
task path: /home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/cephadm-preflight.yml:48
fatal: [ceph-node0]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node1]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node2]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node3]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node4]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node5]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [client0]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [client1]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have to make it that 'complex' ?
I didn't test the following myself but I'd expect it to work as expected:

      import_tasks: tasks/redhat.yml
      - name: Import specific OS-related tasks
        import_tasks: "{{ item }}"
        with_first_found:
          - "{{ ansible_distribution }}.yml"

any issue with it?

Copy link
Author

@0lzi 0lzi Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the more complex way as when i did local linting it complained about import_tasks

WARNING  Listing 1 violation(s) that are fatal
syntax-check[specific]: You cannot use loops on 'import_tasks' statements. You should use 'include_tasks' instead.
cephadm-preflight.yml:48:7

Which it complained about in the latest job here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was also this on the previous job run

Using /home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tests/functional/ansible.cfg as config file
ERROR! the role 'ceph-defaults' was not found in /home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/roles:/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional:/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional

The error appears to be in '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/collect-logs.yml': line 6, column 15, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

      import_role:
        name: ceph-defaults
              ^ here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is some links I looked over :

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was also this on the previous job run

Using /home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tests/functional/ansible.cfg as config file
ERROR! the role 'ceph-defaults' was not found in /home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/roles:/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional:/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional

The error appears to be in '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/collect-logs.yml': line 6, column 15, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

      import_role:
        name: ceph-defaults
              ^ here

you can ignore this error

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the more complex way as when i did local linting it complained about import_tasks

WARNING  Listing 1 violation(s) that are fatal
syntax-check[specific]: You cannot use loops on 'import_tasks' statements. You should use 'include_tasks' instead.
cephadm-preflight.yml:48:7

Which it complained about in the latest job here

yeh the linter error makes sense, then just use include_tasks instead

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have ran this locally against my own inv file and don't get the same error than what is in the CI

TASK [Import specific OS-related tasks] ****************************************
task path: /home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/cephadm-preflight.yml:48
fatal: [ceph-node0]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node1]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node2]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node3]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node4]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [ceph-node5]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [client0]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.
fatal: [client1]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/[]' on the Ansible Controller.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplfying the include_tasks shows a path, but still not available.

    - name: Import specific OS-related tasks
      include_tasks: "tasks/{{ ansible_facts['distribution'] }}.yml"

I am wondering if the tasks folder path needs adjusting, as the Vagrantfile is using ansible.playbook = '../cephadm-preflight.yml'

TASK [Import specific OS-related tasks] ****************************************
task path: /home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/cephadm-preflight.yml:48
fatal: [ceph-node0]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tasks/CentOS.yml' on the Ansible Controller.
fatal: [ceph-node1]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tasks/CentOS.yml' on the Ansible Controller.
fatal: [ceph-node2]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tasks/CentOS.yml' on the Ansible Controller.
fatal: [ceph-node3]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tasks/CentOS.yml' on the Ansible Controller.
fatal: [ceph-node4]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tasks/CentOS.yml' on the Ansible Controller.
fatal: [ceph-node5]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tasks/CentOS.yml' on the Ansible Controller.
fatal: [client0]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tasks/CentOS.yml' on the Ansible Controller.
fatal: [client1]: FAILED! => 
  reason: Could not find or access '/home/jenkins-build/build/workspace/cephadm-ansible-prs-el9-functional/tasks/CentOS.yml' on the Ansible Controller.

@0lzi 0lzi force-pushed the debian-support branch 2 times, most recently from da9b808 to 05ced0c Compare July 11, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants