Skip to content

Commit

Permalink
storage: Pass he_iscsi_tgpt variable to hosted_engine_setup role
Browse files Browse the repository at this point in the history
Pass he_iscsi_tgpt variable to hosted_engine_setup role
in order to use it in "iSCSI login" task.
Requires oVirt/ovirt-ansible-collection#338

Bug-Url: https://bugzilla.redhat.com/1768969
Signed-off-by: Asaf Rachmani <arachman@redhat.com>
Change-Id: Ia105de51d67ff97bbbd3567782fb93280d9d7699
  • Loading branch information
arachmani authored and Asaf Rachmani committed Oct 20, 2021
1 parent fd24e81 commit de7ff55
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ovirt-hosted-engine-setup.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Requires: virt-install
# The whole way of consuming anisble roles is going to change
# skipping ansible dependencies until we have something working.
Requires: ansible >= 2.9.21, ansible < 2.10.0
Requires: ovirt-ansible-collection >= 1.5.4
Requires: ovirt-ansible-collection >= 1.6.5
%endif
# default libvirt network
Requires: libvirt-daemon-config-network
Expand Down
14 changes: 12 additions & 2 deletions src/plugins/gr-he-ansiblesetup/core/storage_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,15 @@ def _query_iscsi_target(
','.join([str(x['port']) for x in apl]),
)

def _query_iscsi_lunid(self, username, password, portal, port, target):
def _query_iscsi_lunid(
self,
username,
password,
portal,
port,
target,
tpgt
):
iscsi_getdevices_vars = {
'he_fqdn': self.environment[
ohostedcons.NetworkEnv.OVIRT_HOSTED_ENGINE_FQDN
Expand All @@ -317,6 +325,7 @@ def _query_iscsi_lunid(self, username, password, portal, port, target):
'he_iscsi_portal_addr': portal,
'he_iscsi_portal_port': port,
'he_iscsi_target': target,
'he_iscsi_tpgt': tpgt,
}
ah = ansible_utils.AnsibleHelper(
tags=ohostedcons.Const.HE_TAG_ISCSI_GETDEVICES,
Expand Down Expand Up @@ -715,7 +724,8 @@ def _closeup(self):
password=iscsi_password,
portal=iscsi_portal,
port=iscsi_port,
target=iscsi_target
target=iscsi_target,
tpgt=iscsi_tpgt
)
lunid = lun['id']
discard = lun['discard_max_size'] > 0
Expand Down

0 comments on commit de7ff55

Please sign in to comment.