Skip to content

Conversation

@Vasu1105
Copy link
Contributor

@Vasu1105 Vasu1105 commented Mar 23, 2022

Signed-off-by: Vasu1105 vasundhara.jagdale@chef.io

Description

This fixes the command timeout is not working as expected when run with sudo. In the execute_on_channel method in Train::Transports::SSH::Connection class, the command is prepended with a timeout if the timeout option is provided. We need to make sure whensudo is used along with a timeout option should prepend with sudo.

Related Issue

ZD30163
CFINSPEC-155

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

@Vasu1105 Vasu1105 requested a review from a team as a code owner March 23, 2022 06:25
@Vasu1105 Vasu1105 requested review from Nik08 and clintoncwolfe March 23, 2022 06:25
@Vasu1105 Vasu1105 self-assigned this Mar 23, 2022
@Vasu1105 Vasu1105 changed the title CFINSPEC-155 Fix: command timeout ignored when used with sudo on ssh transport. [W.I.P]CFINSPEC-155 Fix: command timeout ignored when used with sudo on ssh transport. Mar 23, 2022
@Vasu1105 Vasu1105 force-pushed the vasundhara/fix-command-timeout-with-sudo branch from 6235600 to 60f080e Compare March 23, 2022 06:31
@Vasu1105 Vasu1105 changed the title [W.I.P]CFINSPEC-155 Fix: command timeout ignored when used with sudo on ssh transport. CFINSPEC-155 Fix: command timeout ignored when used with sudo on ssh transport. Mar 23, 2022
…h transport.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
@Vasu1105 Vasu1105 force-pushed the vasundhara/fix-command-timeout-with-sudo branch from 60f080e to 5a50db4 Compare March 23, 2022 08:34
@clintoncwolfe clintoncwolfe merged commit 78e3778 into main Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants