5 The ceph-extras tgt package may need to get installed.
6 The open-iscsi package needs to get installed.
11 from teuthology import misc as teuthology
12 from teuthology import contextutil
14 log = logging.getLogger(__name__)
17 @contextlib.contextmanager
18 def start_tgt_remotes(ctx, start_tgtd):
20 This subtask starts up a tgtd on the clients specified
22 remotes = ctx.cluster.only(teuthology.is_type('client')).remotes
24 for rem, roles in remotes.iteritems():
27 if not rem in tgtd_list:
29 size = ctx.config.get('image_size', 10240)
122 @contextlib.contextmanager
123 def task(ctx, config):
127 To start on on all clients::
133 To start on certain clients::
137 - tgt: [client.0, client.3]
147 An image blocksize size can also be specified::
154 The general flow of things here is:
155 1. Find clients on which tgt is supposed to run (start_tgtd)
156 2. Remotely start up tgt daemon
160 The iscsi administration is handled by the iscsi task.
163 config = {key : val for key, val in config.items()
164 if key.startswith('client')}
165 # config at this point should only contain keys starting with 'client'
167 remotes = ctx.cluster.only(teuthology.is_type('client')).remotes
170 start_tgtd = ['client.{id}'.format(id=id_)
171 for id_ in teuthology.all_roles_of_type(ctx.cluster, 'client')]
175 with contextutil.nested(
176 lambda: start_tgt_remotes(ctx=ctx, start_tgtd=start_tgtd),):