brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BROOKLYN-563) SoftwareProcess pre-start hangs if can't ssh to machine, using `dontRequireTtyForSudo: true`
Date Mon, 13 Nov 2017 18:11:00 GMT

     [ https://issues.apache.org/jira/browse/BROOKLYN-563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aled Sage updated BROOKLYN-563:
-------------------------------
    Description: 
Using 1.0.0-SNAPSHOT, I deployed to a blackhole machine location a {{VanillaSoftwareProcess}}
with {{dontRequireTtyForSudo: true}}.

The startup hung in pre-start. Looking at its details in the activities tab, it shows:

{noformat}
Task[pre-start]@JzMPUEUh
Submitted by MaybeSupplier[value=Task[start]@gl9PavKd]
Children:
  Task[ssh: patch /etc/sudoers to disable requiretty]@RB774DDR: Failed after 29ms: Cannot
establish ssh connection to test-user @ SshMachineLocation[SshMachineLocation:vnx8:test-user@240.0.0.1/240.0.0.1:22(id=vnx85b2hnt)]
(connect timed out). 
  Task[ssh: initializing on-box base dir ./brooklyn-managed-processes]@H1Gz9sMx: Not submitted

In progress, thread waiting (timed) on org.apache.brooklyn.util.core.task.BasicTask@41e064e5
At: org.apache.brooklyn.util.core.task.BasicTask.blockUntilStarted(BasicTask.java:416)
    org.apache.brooklyn.util.core.task.BasicTask.blockUntilEnded(BasicTask.java:441)
    org.apache.brooklyn.util.core.task.BasicTask.blockUntilEnded(BasicTask.java:434)
    org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper.block(ProcessTaskWrapper.java:158)
    org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks.resolveOnBoxDir(MachineLifecycleEffectorTasks.java:586)
    org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$PreStartTask.run(MachineLifecycleEffectorTasks.java:542)
    org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:364)
    org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:565)
{noformat}

The blueprint I deployed was:

{noformat}
name: vanilla with dontRequireTtyForSudo
location:
  byon:
    hosts:
    - "240.0.0.1"
    user: test-user
    password: xxxxxxxx
    connectTimeout: 1
    sessionTimeout: 1
    sshTries: 1
    sshTriesTimeout: 1
    sshRetryDelay: 1
services:
- type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
  brooklyn.config:
    dontRequireTtyForSudo: true
{noformat}

Looking at {{jstack}}, there are six threads that are blocked waiting - presumably all caused
by us waiting indefinitely for {{MachineLifecycleEffectorTasks.resolveOnBoxDir}} task to start.


  was:
Using 1.0.0-SNAPSHOT, I deployed to a blackhole machine location a {{VanillaSoftwareProcess}}
with {{dontRequireTtyForSudo: true}}.

The startup hung in pre-start. Looking at its details in the activities tab, it shows:

{noformat}
Task[pre-start]@JzMPUEUh
Submitted by MaybeSupplier[value=Task[start]@gl9PavKd]
Children:
  Task[ssh: patch /etc/sudoers to disable requiretty]@RB774DDR: Failed after 29ms: Cannot
establish ssh connection to test-user @ SshMachineLocation[SshMachineLocation:vnx8:test-user@240.0.0.1/240.0.0.1:22(id=vnx85b2hnt)]
(connect timed out). 
  Task[ssh: initializing on-box base dir ./brooklyn-managed-processes]@H1Gz9sMx: Not submitted

In progress, thread waiting (timed) on org.apache.brooklyn.util.core.task.BasicTask@41e064e5
At: org.apache.brooklyn.util.core.task.BasicTask.blockUntilStarted(BasicTask.java:416)
    org.apache.brooklyn.util.core.task.BasicTask.blockUntilEnded(BasicTask.java:441)
    org.apache.brooklyn.util.core.task.BasicTask.blockUntilEnded(BasicTask.java:434)
    org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper.block(ProcessTaskWrapper.java:158)
    org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks.resolveOnBoxDir(MachineLifecycleEffectorTasks.java:586)
    org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$PreStartTask.run(MachineLifecycleEffectorTasks.java:542)
    org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:364)
    org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:565){noformat}
{noformat}

The blueprint I deployed was:

{noformat}
name: vanilla with dontRequireTtyForSudo
location:
  byon:
    hosts:
    - "240.0.0.1"
    user: test-user
    password: xxxxxxxx
    connectTimeout: 1
    sessionTimeout: 1
    sshTries: 1
    sshTriesTimeout: 1
    sshRetryDelay: 1
services:
- type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
  brooklyn.config:
    dontRequireTtyForSudo: true
{noformat}

Looking at {{jstack}}, there are six threads that are blocked waiting - presumably all caused
by us waiting indefinitely for {{MachineLifecycleEffectorTasks.resolveOnBoxDir}} task to start.



> SoftwareProcess pre-start hangs if can't ssh to machine, using `dontRequireTtyForSudo:
true`
> --------------------------------------------------------------------------------------------
>
>                 Key: BROOKLYN-563
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-563
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>            Priority: Minor
>
> Using 1.0.0-SNAPSHOT, I deployed to a blackhole machine location a {{VanillaSoftwareProcess}}
with {{dontRequireTtyForSudo: true}}.
> The startup hung in pre-start. Looking at its details in the activities tab, it shows:
> {noformat}
> Task[pre-start]@JzMPUEUh
> Submitted by MaybeSupplier[value=Task[start]@gl9PavKd]
> Children:
>   Task[ssh: patch /etc/sudoers to disable requiretty]@RB774DDR: Failed after 29ms: Cannot
establish ssh connection to test-user @ SshMachineLocation[SshMachineLocation:vnx8:test-user@240.0.0.1/240.0.0.1:22(id=vnx85b2hnt)]
(connect timed out). 
>   Task[ssh: initializing on-box base dir ./brooklyn-managed-processes]@H1Gz9sMx: Not
submitted
> In progress, thread waiting (timed) on org.apache.brooklyn.util.core.task.BasicTask@41e064e5
> At: org.apache.brooklyn.util.core.task.BasicTask.blockUntilStarted(BasicTask.java:416)
>     org.apache.brooklyn.util.core.task.BasicTask.blockUntilEnded(BasicTask.java:441)
>     org.apache.brooklyn.util.core.task.BasicTask.blockUntilEnded(BasicTask.java:434)
>     org.apache.brooklyn.util.core.task.system.ProcessTaskWrapper.block(ProcessTaskWrapper.java:158)
>     org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks.resolveOnBoxDir(MachineLifecycleEffectorTasks.java:586)
>     org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$PreStartTask.run(MachineLifecycleEffectorTasks.java:542)
>     org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:364)
>     org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:565)
> {noformat}
> The blueprint I deployed was:
> {noformat}
> name: vanilla with dontRequireTtyForSudo
> location:
>   byon:
>     hosts:
>     - "240.0.0.1"
>     user: test-user
>     password: xxxxxxxx
>     connectTimeout: 1
>     sessionTimeout: 1
>     sshTries: 1
>     sshTriesTimeout: 1
>     sshRetryDelay: 1
> services:
> - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
>   brooklyn.config:
>     dontRequireTtyForSudo: true
> {noformat}
> Looking at {{jstack}}, there are six threads that are blocked waiting - presumably all
caused by us waiting indefinitely for {{MachineLifecycleEffectorTasks.resolveOnBoxDir}} task
to start.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message