Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to send data on standard input when executing a command #379

Merged

Conversation

ghost
Copy link

@ghost ghost commented Oct 5, 2018

When running a command via SSH, one may need to send data on the standard input of the command. This PR adds a stdin argument to exec and suexec methods, with a default value of nil. The data is sent only if this is not nil, so current calls to these methods should not be impacted.

Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1634029

@miq-bot
Copy link
Member

miq-bot commented Oct 5, 2018

Checked commit fabiendupont@fd9cb28 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 2 offenses detected

lib/gems/pending/util/MiqSshUtil.rb

@carbonin
Copy link
Member

carbonin commented Oct 5, 2018

Can you reference a WIP patch where this would be used? It's hard to review without seeing the use case.

@carbonin carbonin self-assigned this Oct 8, 2018
@carbonin carbonin merged commit 7cfbbb0 into ManageIQ:master Oct 8, 2018
@carbonin carbonin added this to the Sprint 96 Ending Oct 8, 2018 milestone Oct 8, 2018
@carbonin
Copy link
Member

carbonin commented Oct 8, 2018

@fdupont-redhat Does this need to go back to the Hammer release?

@ghost
Copy link
Author

ghost commented Oct 8, 2018

@carbonin Yes, it does. ManageIQ/manageiq#18064 expected to be backported to Hammer, so this one should too.

simaishi pushed a commit that referenced this pull request Oct 8, 2018
…ssh_exec

Add support to send data on standard input when executing a command

(cherry picked from commit 7cfbbb0)
@simaishi
Copy link
Contributor

simaishi commented Oct 8, 2018

Hammer backport details:

$ git log -1
commit 4bdf685aa5d00c518fc0a249b23cd7bba6b6cc16
Author: Nick Carboni <ncarboni@redhat.com>
Date:   Mon Oct 8 09:18:40 2018 -0400

    Merge pull request #379 from fdupont-redhat/add_support_for_stdin_to_ssh_exec
    
    Add support to send data on standard input when executing a command
    
    (cherry picked from commit 7cfbbb04a4d6c6b6e4c2b18cd1553d33d689b9b7)

@ghost ghost mentioned this pull request Oct 10, 2018
@ghost ghost deleted the add_support_for_stdin_to_ssh_exec branch October 10, 2018 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants