forked from infra/ansible
iscsi_client: readd role, apply to power10 host and switch guests to use it
This re-adds a iscsi_client role we had in iad2 back in in rdu3. When then apply it to bvmhost-p10-01 to login and use a iscsi lun from the rdu3 netapp. We then move the buildvm-ppc64le vm's to use this iscsi volume instead of local storage. As we reinstall those builders they will use the iscsi volume. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
8b1d56b8d9
commit
97dab9dcaf
6 changed files with 116 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ mem_size: 32768
|
|||
num_cpus: 8
|
||||
source_registry: "registry.fedoraproject.org"
|
||||
virt_install_command: "{{ virt_install_command_aarch64_one_nic_unsafe }}"
|
||||
volgroup: /dev/vg_guests
|
||||
volgroup: /dev/vg_fedora_ppc64le_builders
|
||||
|
||||
notes: |
|
||||
Koji service employs a set of machines to build packages for the Fedora project. This playbook builds vm builders.
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
- virthost
|
||||
- {role: linux-system-roles.nbde_client, tags: ['nbde_client'], when: (datacenter == 'rdu3' and nbde|bool) or ( datacenter == 'rdu3' and nbde|bool) }
|
||||
- {role: serial-console, when: datacenter == 'rdu3' and ansible_architecture != 's390x'}
|
||||
- {role: iscsi_client, when: datacenter == 'rdu3' and inventory_hostname.startswith('bvmhost-p10-01') }
|
||||
|
||||
handlers:
|
||||
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
||||
|
|
|
|||
69
roles/iscsi_client/files/multipath.conf
Normal file
69
roles/iscsi_client/files/multipath.conf
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
defaults {
|
||||
rr_min_io 128
|
||||
user_friendly_names yes
|
||||
max_fds max
|
||||
queue_without_daemon no
|
||||
polling_interval 3
|
||||
}
|
||||
|
||||
blacklist {
|
||||
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
|
||||
devnode "^hd[a-z]"
|
||||
devnode "^cciss!c[0-9]d[0-9]*"
|
||||
device {
|
||||
vendor "IBM-ESXS"
|
||||
}
|
||||
device {
|
||||
vendor "IBM"
|
||||
}
|
||||
device {
|
||||
vendor "LSILOGIC"
|
||||
}
|
||||
device {
|
||||
vendor "ATA"
|
||||
}
|
||||
device {
|
||||
vendor "VMware"
|
||||
}
|
||||
device {
|
||||
vendor "DELL"
|
||||
}
|
||||
device {
|
||||
vendor "WD"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
devices {
|
||||
# device {
|
||||
# vendor "NETAPP"
|
||||
# product "LUN"
|
||||
# path_grouping_policy group_by_prio
|
||||
# path_checker directio
|
||||
# failback immediate
|
||||
# prio ontap
|
||||
# features "no_path_retry queue"
|
||||
# }
|
||||
|
||||
device {
|
||||
path_checker tur
|
||||
product "NEXTRA"
|
||||
vendor "XIV"
|
||||
rr_min_io 15
|
||||
path_grouping_policy multibus
|
||||
path_selector "round-robin 0"
|
||||
no_path_retry 5
|
||||
failback 15
|
||||
}
|
||||
|
||||
device {
|
||||
path_checker tur
|
||||
product "2810XIV"
|
||||
vendor "IBM"
|
||||
rr_min_io 15
|
||||
path_grouping_policy multibus
|
||||
path_selector "round-robin 0"
|
||||
no_path_retry 5
|
||||
failback 15
|
||||
}
|
||||
}
|
||||
33
roles/iscsi_client/tasks/main.yml
Normal file
33
roles/iscsi_client/tasks/main.yml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
#
|
||||
# This task sets up iscsid and mpathd on a machine.
|
||||
#
|
||||
#
|
||||
- name: install packages needed for iscsi_client (dnf)
|
||||
package:
|
||||
state: present
|
||||
name:
|
||||
- iscsi-initiator-utils
|
||||
- device-mapper-multipath
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: enable multipathd service
|
||||
service: state=started enabled=yes name=multipathd
|
||||
tags:
|
||||
- services
|
||||
|
||||
- name: setup multipath.conf file
|
||||
copy: src=multipath.conf dest=/etc/multipath.conf
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: setup initiatorname.iscsi
|
||||
template: src=initiatorname.iscsi.j2 dest=/etc/iscsi/initiatorname.iscsi
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: run iscsiadm command for initial connect to RDU3 netapp
|
||||
command: creates=/var/lib/iscsi/nodes/{{ netapp_iscsi_name_rdu3 }}/{{ netapp_iscsi_portal_rdu3 }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_iscsi_portal_rdu3 }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_iscsi_name_rdu3 }} --portal {{ netapp_iscsi_portal_rdu3 }} --login
|
||||
tags:
|
||||
- config
|
||||
1
roles/iscsi_client/templates/initiatorname.iscsi.j2
Normal file
1
roles/iscsi_client/templates/initiatorname.iscsi.j2
Normal file
|
|
@ -0,0 +1 @@
|
|||
InitiatorName=iqn.2003-11.org.fedoraproject.{{ inventory_hostname }}
|
||||
11
roles/iscsi_client/vars/main.yml
Normal file
11
roles/iscsi_client/vars/main.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# iscsi initiator for netapp iscsi volume
|
||||
netapp_iscsi_name: iqn.1992-08.com.netapp:sn.fede3f22fb5a11efb799d039eac1c452:vs.3
|
||||
# iscsi portal for netapp iscsi volume
|
||||
netapp_iscsi_portal: 10.16.177.11
|
||||
|
||||
# iscsi initiator for netapp iscsi volume
|
||||
netapp_iscsi_name_rdu3: iqn.1992-08.com.netapp:sn.fede3f22fb5a11efb799d039eac1c452:vs.3
|
||||
# iscsi portal for netapp iscsi volume
|
||||
netapp_iscsi_portal_rdu3: 10.16.177.11
|
||||
# iscsi interface for rdu3
|
||||
netapp_iscsi_interface_rdu3: br0
|
||||
Loading…
Add table
Add a link
Reference in a new issue