Bug 1678693

Summary: [RFE] Share ssh sessions in ansible role
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Yuval Turgeman <yturgema>
Component: DocumentationAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED CURRENTRELEASE QA Contact: Liran Rotenberg <lrotenbe>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.3.2CC: bugs, guillaume.pavese, stirabos
Target Milestone: ovirt-4.3.2Keywords: Documentation, Performance
Target Release: ---Flags: sbonazzo: ovirt-4.3?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-ansible-hosted-engine-setup-1.0.12 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-19 10:03:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yuval Turgeman 2019-02-19 11:53:20 UTC
Description of problem:

Ansible has the ability to reuse an ssh connection through a socket instead of opening a new session on each task [1].  Perhaps we should investigate if this will can help speed up the HE deployment.  While on that, it might be worth to take a look at the pipelining option as well.

[1] https://docs.ansible.com/ansible/2.4/intro_configuration.html#id160

Comment 1 Simone Tiraboschi 2019-02-19 15:55:58 UTC
We already using "connection: local" deploying from ovirt-hosted-engine-setup or from the cockpit wizard:
https://github.com/oVirt/ovirt-hosted-engine-setup/blob/master/src/ansible/trigger_role.yml#L4

So no ssh there.

But this can have a great impact directly executing the role over ssh against a remote host although this is probably just something that we can recommend in our documentation and not really enforce at code level.

Comment 2 Liran Rotenberg 2019-03-07 09:53:18 UTC
Verified on:
ovirt-ansible-hosted-engine-setup-1.0.12-1.el7ev.noarch

Steps:
1. On the host you wish to deploy the HE VM, edit /etc/ansible/ansible.cfg
2. Add these lines under [ssh_connection] section:
ssh_args = -C -o ControlMaster=auto -o ControlPersist=30m
control_path_dir = /root/cp
control_path = %(directory)s/%%h-%%r
pipelining = True
3. Run hosted-engine --deploy

Results:
No regression, the deployment passed.

Comment 3 Sandro Bonazzola 2019-03-19 10:03:21 UTC
This bugzilla is included in oVirt 4.3.2 release, published on March 19th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.