]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/ceph_iscsi_client.py
2 Set up ceph-iscsi client.
6 from textwrap
import dedent
8 log
= logging
.getLogger(__name__
)
11 @contextlib.contextmanager
12 def task(ctx
, config
):
14 Set up ceph-iscsi client.
20 log
.info('Setting up ceph-iscsi client...')
21 for role
in config
['clients']:
22 (remote
,) = (ctx
.cluster
.only(role
).remotes
.keys())
25 InitiatorName=iqn.1994-05.com.redhat:client
27 path
= "/etc/iscsi/initiatorname.iscsi"
28 remote
.sudo_write_file(path
, conf
, mkdir
=True)
30 # the restart is needed after the above change is applied
31 remote
.run(args
=['sudo', 'systemctl', 'restart', 'iscsid'])
33 remote
.run(args
=['sudo', 'modprobe', 'dm_multipath'])
34 remote
.run(args
=['sudo', 'mpathconf', '--enable'])
40 hardware_handler "1 alua"
41 path_grouping_policy "failover"
42 path_selector "queue-length 0"
46 prio_args exclusive_pref_bit
52 path
= "/etc/multipath.conf"
53 remote
.sudo_write_file(path
, conf
, append
=True)
54 remote
.run(args
=['sudo', 'systemctl', 'start', 'multipathd'])