Skip to content

Commit

Permalink
Ensure we create CRC and OCP first
Browse files Browse the repository at this point in the history
By sorting the libvirt_manager.vms content using dictsort, we have a way
to more or less ensure "crc" and "ocp" will be first.

Doing so, we give some more time to the OpenShift services to start
before hitting them - meaning we'll see less `retries` in the logs,
since we launched computes and controller.

This should allow to "lose less time".
  • Loading branch information
cjeanner authored and openshift-merge-bot[bot] committed Apr 5, 2024
1 parent 3103ec2 commit 227ec9a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 35 deletions.
6 changes: 5 additions & 1 deletion roles/libvirt_manager/tasks/deploy_layout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@
_init_admin_user: "{{ vm_data.value.admin_user | default('root') }}"
ansible.builtin.include_tasks:
file: create_vms.yml
loop: "{{ _layout.vms | dict2items }}"
loop: >-
{{
_layout.vms | dictsort(reverse=true) |
community.general.dict | dict2items
}}
loop_control:
label: "{{ vm_data.key }}"
loop_var: vm_data
Expand Down
20 changes: 10 additions & 10 deletions scenarios/reproducers/3-nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ cifmw_root_partition_id: >-
cifmw_libvirt_manager_compute_amount: 1
cifmw_libvirt_manager_configuration:
vms:
crc:
admin_user: core
image_local_dir: "{{ ansible_user_dir }}/.crc/machines/crc/"
disk_file_name: "crc.qcow2"
disksize: 150
memory: 32
cpus: 24
nets:
- public
- osp_trunk
compute:
uefi: "{{ cifmw_use_uefi }}"
amount: "{{ [cifmw_libvirt_manager_compute_amount|int, 1] | max }}"
Expand Down Expand Up @@ -51,16 +61,6 @@ cifmw_libvirt_manager_configuration:
nets:
- public
- osp_trunk
crc:
admin_user: core
image_local_dir: "{{ ansible_user_dir }}/.crc/machines/crc/"
disk_file_name: "crc.qcow2"
disksize: 150
memory: 32
cpus: 24
nets:
- public
- osp_trunk
networks:
public: |-
<network>
Expand Down
24 changes: 12 additions & 12 deletions scenarios/reproducers/external-ceph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ cifmw_libvirt_manager_configuration:
</ip>
</network>
vms:
ocp:
amount: 3
admin_user: core
image_local_dir: "/home/dev-scripts/pool"
disk_file_name: "ocp_master"
disksize: "105"
xml_paths:
- /home/dev-scripts/ocp_master_0.xml
- /home/dev-scripts/ocp_master_1.xml
- /home/dev-scripts/ocp_master_2.xml
nets:
- osp_trunk
compute:
uefi: "{{ cifmw_use_uefi | default(false) }}"
root_part_id: >-
Expand Down Expand Up @@ -67,15 +79,3 @@ cifmw_libvirt_manager_configuration:
nets:
- ocpbm
- osp_trunk
ocp:
amount: 3
admin_user: core
image_local_dir: "/home/dev-scripts/pool"
disk_file_name: "ocp_master"
disksize: "105"
xml_paths:
- /home/dev-scripts/ocp_master_0.xml
- /home/dev-scripts/ocp_master_1.xml
- /home/dev-scripts/ocp_master_2.xml
nets:
- osp_trunk
24 changes: 12 additions & 12 deletions scenarios/reproducers/va-hci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ cifmw_libvirt_manager_configuration:
</ip>
</network>
vms:
ocp:
amount: 3
admin_user: core
image_local_dir: "/home/dev-scripts/pool"
disk_file_name: "ocp_master"
disksize: "105"
xml_paths:
- /home/dev-scripts/ocp_master_0.xml
- /home/dev-scripts/ocp_master_1.xml
- /home/dev-scripts/ocp_master_2.xml
nets:
- osp_trunk
compute:
uefi: "{{ cifmw_use_uefi }}"
root_part_id: "{{ cifmw_root_partition_id }}"
Expand Down Expand Up @@ -119,18 +131,6 @@ cifmw_libvirt_manager_configuration:
nets:
- ocpbm
- osp_trunk
ocp:
amount: 3
admin_user: core
image_local_dir: "/home/dev-scripts/pool"
disk_file_name: "ocp_master"
disksize: "105"
xml_paths:
- /home/dev-scripts/ocp_master_0.xml
- /home/dev-scripts/ocp_master_1.xml
- /home/dev-scripts/ocp_master_2.xml
nets:
- osp_trunk


## devscript support for OCP deploy
Expand Down

0 comments on commit 227ec9a

Please sign in to comment.