Bug 1678693 - [RFE] Share ssh sessions in ansible role
Summary: [RFE] Share ssh sessions in ansible role
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-setup
Classification: oVirt
Component: Documentation
Version: 2.3.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.3.2
: ---
Assignee: Ido Rosenzwig
QA Contact: Liran Rotenberg
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-19 11:53 UTC by Yuval Turgeman
Modified: 2019-03-19 10:03 UTC (History)
3 users (show)

Fixed In Version: ovirt-ansible-hosted-engine-setup-1.0.12
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-19 10:03:21 UTC
oVirt Team: Integration
Embargoed:
sbonazzo: ovirt-4.3?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-hosted-engine-setup pull 122 0 None None None 2019-02-20 07:54:38 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.