You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by Pedro Henrique Gomes <pe...@gmail.com> on 2018/02/27 19:08:07 UTC

Issue in the execution context when using Openstack plugin

Hello everyone,

I am having a problem with a template that uses Cloudify Openstack plugin.
Wanted to check out if someone has any clue, because it seems to be a bug.
I can open a ticket if necessary.

I have a template that creates a Openstack deployment with a VM.

--- In scenario 1) there is a node (call N1) in the template of type
tosca.nodes.SoftwareComponent that executes some scripts in the VM (using
ssh). This node has as requirement host the later VM.
This scenario works fine

-- In scenario 2) there is a node (call N2) in the template also of type
tosca.nodes.SoftwareComponent, but this other node run locally, not in the
VM.
If both nodes exist they work fine but I dont have control over which one
runs first

-- In scenario 3) we add a requirement dependency to N1 pointing to N2. I
want to make sure the scripts in N2 run before the scripts in N1.
But in this case both nodes (N1 and N2) are executed with
execute_with_ssh() which makes the orchestration break, because N2 does not
have a sh key, etc.

The snippet from the template is below

prep_server:
  type: ServerType

prep_software:
  type: tosca.nodes.SoftwareComponent
  requirements:
    - host: prep_server
    - dependency: vm_1
 interfaces:
    Standard:
      create: scripts/prep.sh

configure_software:
  type: tosca.nodes.SoftwareComponent
    requirements:
      - host: vm_1
#    - dependency: prep_software
    interfaces:
      Standard:
        configure:
          implementation:
            primary: scripts/configure.sh
              dependencies:
                - "ssh.user > ubuntu"
                - "ssh.key_filename > ./key.pem"
                - "ssh.address > { get_attribute: [ virtual_ip,
floating_ip_address ] }"

If I have the template above nodes prep_software and configure_software
execute correctly in the desired machine. If the comment above is removed,
both nodes are executed with execute_with_ssh()


Hoe someone can help me or provide any direction for this problem

Thanks


-- 
Pedro Henrique Gomes
www.pedrohenriquegomes.com.br
+1-310-3101429

Re: Issue in the execution context when using Openstack plugin

Posted by DeWayne Filppi <de...@cloudify.co>.
Have you considered supplying the manager ssh credentials to the locally
executing node?

On Thu, Mar 1, 2018 at 2:39 PM, Pedro Henrique Gomes <
pedrohenriquegomes@gmail.com> wrote:

> Hi DeWayne,
>
> Yes, exactly that. Unfortunately I could not create yet a simple template
> with the erroneous behaviour.
> But yes, Openstack plugin seems to force the ssh in all nodes that have
> dependency with nodes that have to be executed via ssh.
>
>
> On Wed, Feb 28, 2018 at 3:02 PM DeWayne Filppi <de...@cloudify.co>
> wrote:
>
> > So in other words, the Openstack plugin is irrelevant. What you are
> saying
> > is that somehow the dependency itself causes ssh to be used in a
> > SoftwareComponent type.  If you run a blueprint just with the "prep"
> node,
> > it works fine as expected?
> >
> > DeWayne
> >
> > On Wed, Feb 28, 2018 at 9:09 AM, Pedro Henrique Gomes <
> > pedrohenriquegomes@gmail.com> wrote:
> >
> >> Hi Thomas, thank you for your reply.
> >>
> >> The point is that the node that complains about not having the ssh
> >> credentials, has a HOST that should be running locally, not thru ssh.
> >>
> >> The output error that I get is below:
> >>
> >> 13:57:32 | E |
> >> aria.orchestrator.execution_plugin.operations.run_script_with_ssh |
> >> {u'process': {}, u'script_path': u'scripts/prep.sh', u'use_sudo': False,
> >> u'fabric_env': {'password': '', 'key_filename': None, 'user': '', 'key':
> >> None}, u'hide_output': []} | prep_software Standard.create failed
> >>     |Traceback (most recent call last):
> >>     |  File
> >>
> >> "/tmp/pip-build-7lUI8E/apache-ariatosca/aria/orchestrator/
> workflows/executor/process.py",
> >> line 342, in _main
> >>     |  File
> >>
> >> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> adapters/context_adapter.py",
> >> line 436, in wrapper
> >>     |    function(ctx=ctx, **operation_inputs)
> >>     |  File
> >>
> >> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/orchestrator/decorators.py",
> >> line 78, in _wrapper
> >>     |    return func(**func_kwargs)
> >>     |  File
> >>
> >> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/orchestrator/execution_plugin/operations.py",
> >> line 51, in run_script_with_ssh
> >>     |    **kwargs)
> >>     |  File
> >>
> >> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/orchestrator/execution_plugin/ssh/operations.py",
> >> line 67, in run_script
> >>     |    **_fabric_env(ctx, fabric_env, warn_only=False)):
> >>     |  File
> >>
> >> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/orchestrator/execution_plugin/ssh/operations.py",
> >> line 157, in _fabric_env
> >>     |    'Access credentials not supplied '
> >>     |  File
> >>
> >> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/modeling/orchestration.py",
> >> line 446, in abort
> >>     |    raise TaskAbortException(message)
> >>     |TaskAbortException: Access credentials not supplied (you must
> supply
> >> at least one of `key_filename`, `key` or `password`)
> >>
> >> 13:57:33 | I | install | {} | 'install' workflow execution failed
> >>
> >> I can try to provide to you a minimum viable template to execute and get
> >> the same error.
> >> But if you have any idea from this log, please let me know, any tip is
> >> useful.
> >>
> >> Regards
> >>
> >> On Tue, Feb 27, 2018 at 4:35 PM Thomas Nadeau <tn...@gmail.com>
> >> wrote:
> >>
> >> > It looks like you answered your own question. When you require SSH by
> >> > calling "execute_with_ssh" but do not have it configured, its not
> going
> >> to
> >> > work right? *)
> >> >
> >> > In any event, can you provide more diagnostic info so that we can see
> >> > better where things are failing. I am actually starting to work on
> >> > improving the return error/warning codes now, so its timely.
> >> >
> >> > --Tom
> >> >
> >> >
> >> > On Tue, Feb 27, 2018 at 2:08 PM, Pedro Henrique Gomes <
> >> > pedrohenriquegomes@gmail.com> wrote:
> >> >
> >> > > Hello everyone,
> >> > >
> >> > > I am having a problem with a template that uses Cloudify Openstack
> >> > plugin.
> >> > > Wanted to check out if someone has any clue, because it seems to be
> a
> >> > bug.
> >> > > I can open a ticket if necessary.
> >> > >
> >> > > I have a template that creates a Openstack deployment with a VM.
> >> > >
> >> > > --- In scenario 1) there is a node (call N1) in the template of type
> >> > > tosca.nodes.SoftwareComponent that executes some scripts in the VM
> >> (using
> >> > > ssh). This node has as requirement host the later VM.
> >> > > This scenario works fine
> >> > >
> >> > > -- In scenario 2) there is a node (call N2) in the template also of
> >> type
> >> > > tosca.nodes.SoftwareComponent, but this other node run locally, not
> in
> >> > the
> >> > > VM.
> >> > > If both nodes exist they work fine but I dont have control over
> which
> >> one
> >> > > runs first
> >> > >
> >> > > -- In scenario 3) we add a requirement dependency to N1 pointing to
> >> N2. I
> >> > > want to make sure the scripts in N2 run before the scripts in N1.
> >> > > But in this case both nodes (N1 and N2) are executed with
> >> > > execute_with_ssh() which makes the orchestration break, because N2
> >> does
> >> > not
> >> > > have a sh key, etc.
> >> > >
> >> > > The snippet from the template is below
> >> > >
> >> > > prep_server:
> >> > >   type: ServerType
> >> > >
> >> > > prep_software:
> >> > >   type: tosca.nodes.SoftwareComponent
> >> > >   requirements:
> >> > >     - host: prep_server
> >> > >     - dependency: vm_1
> >> > >  interfaces:
> >> > >     Standard:
> >> > >       create: scripts/prep.sh
> >> > >
> >> > > configure_software:
> >> > >   type: tosca.nodes.SoftwareComponent
> >> > >     requirements:
> >> > >       - host: vm_1
> >> > > #    - dependency: prep_software
> >> > >     interfaces:
> >> > >       Standard:
> >> > >         configure:
> >> > >           implementation:
> >> > >             primary: scripts/configure.sh
> >> > >               dependencies:
> >> > >                 - "ssh.user > ubuntu"
> >> > >                 - "ssh.key_filename > ./key.pem"
> >> > >                 - "ssh.address > { get_attribute: [ virtual_ip,
> >> > > floating_ip_address ] }"
> >> > >
> >> > > If I have the template above nodes prep_software and
> >> configure_software
> >> > > execute correctly in the desired machine. If the comment above is
> >> > removed,
> >> > > both nodes are executed with execute_with_ssh()
> >> > >
> >> > >
> >> > > Hoe someone can help me or provide any direction for this problem
> >> > >
> >> > > Thanks
> >> > >
> >> > >
> >> > > --
> >> > > Pedro Henrique Gomes
> >> > > www.pedrohenriquegomes.com.br
> >>
> > > > +1-310-3101429 <(310)%20310-1429>
> >
> >
> >> > >
> >> >
> >> --
> >> Pedro Henrique Gomes
> >> www.pedrohenriquegomes.com.br
> >> +1-310-3101429
> >>
> >
> >
> >
> > --
> >
> > <http://cloudify.co/>
> >
> > *DeWayne Filppi*
> > Director, Solution Architecture, Cloudify
> >
> > (714)512-1706 <(714)%20512-1706>| mailto:dfilppi@cloudify.co
> > <df...@cloudify.co>| http://cloudify.co
> >
> > <https://www.linkedin.com/in/dfilppi> <https://twitter.com/dfilppi>
> > <http://cloudify.co/blog/>
> >
> >
> >
> > --
> Pedro Henrique Gomes
> www.pedrohenriquegomes.com.br
> +1-310-3101429
>



-- 

<http://cloudify.co/>

*DeWayne Filppi*
Director, Solution Architecture, Cloudify

(714)512-1706 <(714)%20512-1706>| mailto:dfilppi@cloudify.co
<df...@cloudify.co>| http://cloudify.co

<https://www.linkedin.com/in/dfilppi> <https://twitter.com/dfilppi>
<http://cloudify.co/blog/>

Re: Issue in the execution context when using Openstack plugin

Posted by Pedro Henrique Gomes <pe...@gmail.com>.
Hi DeWayne,

Yes, exactly that. Unfortunately I could not create yet a simple template
with the erroneous behaviour.
But yes, Openstack plugin seems to force the ssh in all nodes that have
dependency with nodes that have to be executed via ssh.


On Wed, Feb 28, 2018 at 3:02 PM DeWayne Filppi <de...@cloudify.co> wrote:

> So in other words, the Openstack plugin is irrelevant. What you are saying
> is that somehow the dependency itself causes ssh to be used in a
> SoftwareComponent type.  If you run a blueprint just with the "prep" node,
> it works fine as expected?
>
> DeWayne
>
> On Wed, Feb 28, 2018 at 9:09 AM, Pedro Henrique Gomes <
> pedrohenriquegomes@gmail.com> wrote:
>
>> Hi Thomas, thank you for your reply.
>>
>> The point is that the node that complains about not having the ssh
>> credentials, has a HOST that should be running locally, not thru ssh.
>>
>> The output error that I get is below:
>>
>> 13:57:32 | E |
>> aria.orchestrator.execution_plugin.operations.run_script_with_ssh |
>> {u'process': {}, u'script_path': u'scripts/prep.sh', u'use_sudo': False,
>> u'fabric_env': {'password': '', 'key_filename': None, 'user': '', 'key':
>> None}, u'hide_output': []} | prep_software Standard.create failed
>>     |Traceback (most recent call last):
>>     |  File
>>
>> "/tmp/pip-build-7lUI8E/apache-ariatosca/aria/orchestrator/workflows/executor/process.py",
>> line 342, in _main
>>     |  File
>>
>> "/home/pedro/aria/env/local/lib/python2.7/site-packages/adapters/context_adapter.py",
>> line 436, in wrapper
>>     |    function(ctx=ctx, **operation_inputs)
>>     |  File
>>
>> "/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/orchestrator/decorators.py",
>> line 78, in _wrapper
>>     |    return func(**func_kwargs)
>>     |  File
>>
>> "/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/orchestrator/execution_plugin/operations.py",
>> line 51, in run_script_with_ssh
>>     |    **kwargs)
>>     |  File
>>
>> "/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/orchestrator/execution_plugin/ssh/operations.py",
>> line 67, in run_script
>>     |    **_fabric_env(ctx, fabric_env, warn_only=False)):
>>     |  File
>>
>> "/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/orchestrator/execution_plugin/ssh/operations.py",
>> line 157, in _fabric_env
>>     |    'Access credentials not supplied '
>>     |  File
>>
>> "/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/modeling/orchestration.py",
>> line 446, in abort
>>     |    raise TaskAbortException(message)
>>     |TaskAbortException: Access credentials not supplied (you must supply
>> at least one of `key_filename`, `key` or `password`)
>>
>> 13:57:33 | I | install | {} | 'install' workflow execution failed
>>
>> I can try to provide to you a minimum viable template to execute and get
>> the same error.
>> But if you have any idea from this log, please let me know, any tip is
>> useful.
>>
>> Regards
>>
>> On Tue, Feb 27, 2018 at 4:35 PM Thomas Nadeau <tn...@gmail.com>
>> wrote:
>>
>> > It looks like you answered your own question. When you require SSH by
>> > calling "execute_with_ssh" but do not have it configured, its not going
>> to
>> > work right? *)
>> >
>> > In any event, can you provide more diagnostic info so that we can see
>> > better where things are failing. I am actually starting to work on
>> > improving the return error/warning codes now, so its timely.
>> >
>> > --Tom
>> >
>> >
>> > On Tue, Feb 27, 2018 at 2:08 PM, Pedro Henrique Gomes <
>> > pedrohenriquegomes@gmail.com> wrote:
>> >
>> > > Hello everyone,
>> > >
>> > > I am having a problem with a template that uses Cloudify Openstack
>> > plugin.
>> > > Wanted to check out if someone has any clue, because it seems to be a
>> > bug.
>> > > I can open a ticket if necessary.
>> > >
>> > > I have a template that creates a Openstack deployment with a VM.
>> > >
>> > > --- In scenario 1) there is a node (call N1) in the template of type
>> > > tosca.nodes.SoftwareComponent that executes some scripts in the VM
>> (using
>> > > ssh). This node has as requirement host the later VM.
>> > > This scenario works fine
>> > >
>> > > -- In scenario 2) there is a node (call N2) in the template also of
>> type
>> > > tosca.nodes.SoftwareComponent, but this other node run locally, not in
>> > the
>> > > VM.
>> > > If both nodes exist they work fine but I dont have control over which
>> one
>> > > runs first
>> > >
>> > > -- In scenario 3) we add a requirement dependency to N1 pointing to
>> N2. I
>> > > want to make sure the scripts in N2 run before the scripts in N1.
>> > > But in this case both nodes (N1 and N2) are executed with
>> > > execute_with_ssh() which makes the orchestration break, because N2
>> does
>> > not
>> > > have a sh key, etc.
>> > >
>> > > The snippet from the template is below
>> > >
>> > > prep_server:
>> > >   type: ServerType
>> > >
>> > > prep_software:
>> > >   type: tosca.nodes.SoftwareComponent
>> > >   requirements:
>> > >     - host: prep_server
>> > >     - dependency: vm_1
>> > >  interfaces:
>> > >     Standard:
>> > >       create: scripts/prep.sh
>> > >
>> > > configure_software:
>> > >   type: tosca.nodes.SoftwareComponent
>> > >     requirements:
>> > >       - host: vm_1
>> > > #    - dependency: prep_software
>> > >     interfaces:
>> > >       Standard:
>> > >         configure:
>> > >           implementation:
>> > >             primary: scripts/configure.sh
>> > >               dependencies:
>> > >                 - "ssh.user > ubuntu"
>> > >                 - "ssh.key_filename > ./key.pem"
>> > >                 - "ssh.address > { get_attribute: [ virtual_ip,
>> > > floating_ip_address ] }"
>> > >
>> > > If I have the template above nodes prep_software and
>> configure_software
>> > > execute correctly in the desired machine. If the comment above is
>> > removed,
>> > > both nodes are executed with execute_with_ssh()
>> > >
>> > >
>> > > Hoe someone can help me or provide any direction for this problem
>> > >
>> > > Thanks
>> > >
>> > >
>> > > --
>> > > Pedro Henrique Gomes
>> > > www.pedrohenriquegomes.com.br
>>
> > > +1-310-3101429 <(310)%20310-1429>
>
>
>> > >
>> >
>> --
>> Pedro Henrique Gomes
>> www.pedrohenriquegomes.com.br
>> +1-310-3101429
>>
>
>
>
> --
>
> <http://cloudify.co/>
>
> *DeWayne Filppi*
> Director, Solution Architecture, Cloudify
>
> (714)512-1706 <(714)%20512-1706>| mailto:dfilppi@cloudify.co
> <df...@cloudify.co>| http://cloudify.co
>
> <https://www.linkedin.com/in/dfilppi> <https://twitter.com/dfilppi>
> <http://cloudify.co/blog/>
>
>
>
> --
Pedro Henrique Gomes
www.pedrohenriquegomes.com.br
+1-310-3101429

Re: Issue in the execution context when using Openstack plugin

Posted by DeWayne Filppi <de...@cloudify.co>.
So in other words, the Openstack plugin is irrelevant. What you are saying
is that somehow the dependency itself causes ssh to be used in a
SoftwareComponent type.  If you run a blueprint just with the "prep" node,
it works fine as expected?

DeWayne

On Wed, Feb 28, 2018 at 9:09 AM, Pedro Henrique Gomes <
pedrohenriquegomes@gmail.com> wrote:

> Hi Thomas, thank you for your reply.
>
> The point is that the node that complains about not having the ssh
> credentials, has a HOST that should be running locally, not thru ssh.
>
> The output error that I get is below:
>
> 13:57:32 | E |
> aria.orchestrator.execution_plugin.operations.run_script_with_ssh |
> {u'process': {}, u'script_path': u'scripts/prep.sh', u'use_sudo': False,
> u'fabric_env': {'password': '', 'key_filename': None, 'user': '', 'key':
> None}, u'hide_output': []} | prep_software Standard.create failed
>     |Traceback (most recent call last):
>     |  File
> "/tmp/pip-build-7lUI8E/apache-ariatosca/aria/orchestrator/
> workflows/executor/process.py",
> line 342, in _main
>     |  File
> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> adapters/context_adapter.py",
> line 436, in wrapper
>     |    function(ctx=ctx, **operation_inputs)
>     |  File
> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/orchestrator/decorators.py",
> line 78, in _wrapper
>     |    return func(**func_kwargs)
>     |  File
> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/orchestrator/execution_plugin/operations.py",
> line 51, in run_script_with_ssh
>     |    **kwargs)
>     |  File
> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/orchestrator/execution_plugin/ssh/operations.py",
> line 67, in run_script
>     |    **_fabric_env(ctx, fabric_env, warn_only=False)):
>     |  File
> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/orchestrator/execution_plugin/ssh/operations.py",
> line 157, in _fabric_env
>     |    'Access credentials not supplied '
>     |  File
> "/home/pedro/aria/env/local/lib/python2.7/site-packages/
> aria/modeling/orchestration.py",
> line 446, in abort
>     |    raise TaskAbortException(message)
>     |TaskAbortException: Access credentials not supplied (you must supply
> at least one of `key_filename`, `key` or `password`)
>
> 13:57:33 | I | install | {} | 'install' workflow execution failed
>
> I can try to provide to you a minimum viable template to execute and get
> the same error.
> But if you have any idea from this log, please let me know, any tip is
> useful.
>
> Regards
>
> On Tue, Feb 27, 2018 at 4:35 PM Thomas Nadeau <tn...@gmail.com>
> wrote:
>
> > It looks like you answered your own question. When you require SSH by
> > calling "execute_with_ssh" but do not have it configured, its not going
> to
> > work right? *)
> >
> > In any event, can you provide more diagnostic info so that we can see
> > better where things are failing. I am actually starting to work on
> > improving the return error/warning codes now, so its timely.
> >
> > --Tom
> >
> >
> > On Tue, Feb 27, 2018 at 2:08 PM, Pedro Henrique Gomes <
> > pedrohenriquegomes@gmail.com> wrote:
> >
> > > Hello everyone,
> > >
> > > I am having a problem with a template that uses Cloudify Openstack
> > plugin.
> > > Wanted to check out if someone has any clue, because it seems to be a
> > bug.
> > > I can open a ticket if necessary.
> > >
> > > I have a template that creates a Openstack deployment with a VM.
> > >
> > > --- In scenario 1) there is a node (call N1) in the template of type
> > > tosca.nodes.SoftwareComponent that executes some scripts in the VM
> (using
> > > ssh). This node has as requirement host the later VM.
> > > This scenario works fine
> > >
> > > -- In scenario 2) there is a node (call N2) in the template also of
> type
> > > tosca.nodes.SoftwareComponent, but this other node run locally, not in
> > the
> > > VM.
> > > If both nodes exist they work fine but I dont have control over which
> one
> > > runs first
> > >
> > > -- In scenario 3) we add a requirement dependency to N1 pointing to
> N2. I
> > > want to make sure the scripts in N2 run before the scripts in N1.
> > > But in this case both nodes (N1 and N2) are executed with
> > > execute_with_ssh() which makes the orchestration break, because N2 does
> > not
> > > have a sh key, etc.
> > >
> > > The snippet from the template is below
> > >
> > > prep_server:
> > >   type: ServerType
> > >
> > > prep_software:
> > >   type: tosca.nodes.SoftwareComponent
> > >   requirements:
> > >     - host: prep_server
> > >     - dependency: vm_1
> > >  interfaces:
> > >     Standard:
> > >       create: scripts/prep.sh
> > >
> > > configure_software:
> > >   type: tosca.nodes.SoftwareComponent
> > >     requirements:
> > >       - host: vm_1
> > > #    - dependency: prep_software
> > >     interfaces:
> > >       Standard:
> > >         configure:
> > >           implementation:
> > >             primary: scripts/configure.sh
> > >               dependencies:
> > >                 - "ssh.user > ubuntu"
> > >                 - "ssh.key_filename > ./key.pem"
> > >                 - "ssh.address > { get_attribute: [ virtual_ip,
> > > floating_ip_address ] }"
> > >
> > > If I have the template above nodes prep_software and configure_software
> > > execute correctly in the desired machine. If the comment above is
> > removed,
> > > both nodes are executed with execute_with_ssh()
> > >
> > >
> > > Hoe someone can help me or provide any direction for this problem
> > >
> > > Thanks
> > >
> > >
> > > --
> > > Pedro Henrique Gomes
> > > www.pedrohenriquegomes.com.br
> > > +1-310-3101429 <(310)%20310-1429>
> > >
> >
> --
> Pedro Henrique Gomes
> www.pedrohenriquegomes.com.br
> +1-310-3101429
>



-- 

<http://cloudify.co/>

*DeWayne Filppi*
Director, Solution Architecture, Cloudify

(714)512-1706 <(714)%20512-1706>| mailto:dfilppi@cloudify.co
<df...@cloudify.co>| http://cloudify.co

<https://www.linkedin.com/in/dfilppi> <https://twitter.com/dfilppi>
<http://cloudify.co/blog/>

Re: Issue in the execution context when using Openstack plugin

Posted by Pedro Henrique Gomes <pe...@gmail.com>.
Hi Thomas, thank you for your reply.

The point is that the node that complains about not having the ssh
credentials, has a HOST that should be running locally, not thru ssh.

The output error that I get is below:

13:57:32 | E |
aria.orchestrator.execution_plugin.operations.run_script_with_ssh |
{u'process': {}, u'script_path': u'scripts/prep.sh', u'use_sudo': False,
u'fabric_env': {'password': '', 'key_filename': None, 'user': '', 'key':
None}, u'hide_output': []} | prep_software Standard.create failed
    |Traceback (most recent call last):
    |  File
"/tmp/pip-build-7lUI8E/apache-ariatosca/aria/orchestrator/workflows/executor/process.py",
line 342, in _main
    |  File
"/home/pedro/aria/env/local/lib/python2.7/site-packages/adapters/context_adapter.py",
line 436, in wrapper
    |    function(ctx=ctx, **operation_inputs)
    |  File
"/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/orchestrator/decorators.py",
line 78, in _wrapper
    |    return func(**func_kwargs)
    |  File
"/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/orchestrator/execution_plugin/operations.py",
line 51, in run_script_with_ssh
    |    **kwargs)
    |  File
"/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/orchestrator/execution_plugin/ssh/operations.py",
line 67, in run_script
    |    **_fabric_env(ctx, fabric_env, warn_only=False)):
    |  File
"/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/orchestrator/execution_plugin/ssh/operations.py",
line 157, in _fabric_env
    |    'Access credentials not supplied '
    |  File
"/home/pedro/aria/env/local/lib/python2.7/site-packages/aria/modeling/orchestration.py",
line 446, in abort
    |    raise TaskAbortException(message)
    |TaskAbortException: Access credentials not supplied (you must supply
at least one of `key_filename`, `key` or `password`)

13:57:33 | I | install | {} | 'install' workflow execution failed

I can try to provide to you a minimum viable template to execute and get
the same error.
But if you have any idea from this log, please let me know, any tip is
useful.

Regards

On Tue, Feb 27, 2018 at 4:35 PM Thomas Nadeau <tn...@gmail.com> wrote:

> It looks like you answered your own question. When you require SSH by
> calling "execute_with_ssh" but do not have it configured, its not going to
> work right? *)
>
> In any event, can you provide more diagnostic info so that we can see
> better where things are failing. I am actually starting to work on
> improving the return error/warning codes now, so its timely.
>
> --Tom
>
>
> On Tue, Feb 27, 2018 at 2:08 PM, Pedro Henrique Gomes <
> pedrohenriquegomes@gmail.com> wrote:
>
> > Hello everyone,
> >
> > I am having a problem with a template that uses Cloudify Openstack
> plugin.
> > Wanted to check out if someone has any clue, because it seems to be a
> bug.
> > I can open a ticket if necessary.
> >
> > I have a template that creates a Openstack deployment with a VM.
> >
> > --- In scenario 1) there is a node (call N1) in the template of type
> > tosca.nodes.SoftwareComponent that executes some scripts in the VM (using
> > ssh). This node has as requirement host the later VM.
> > This scenario works fine
> >
> > -- In scenario 2) there is a node (call N2) in the template also of type
> > tosca.nodes.SoftwareComponent, but this other node run locally, not in
> the
> > VM.
> > If both nodes exist they work fine but I dont have control over which one
> > runs first
> >
> > -- In scenario 3) we add a requirement dependency to N1 pointing to N2. I
> > want to make sure the scripts in N2 run before the scripts in N1.
> > But in this case both nodes (N1 and N2) are executed with
> > execute_with_ssh() which makes the orchestration break, because N2 does
> not
> > have a sh key, etc.
> >
> > The snippet from the template is below
> >
> > prep_server:
> >   type: ServerType
> >
> > prep_software:
> >   type: tosca.nodes.SoftwareComponent
> >   requirements:
> >     - host: prep_server
> >     - dependency: vm_1
> >  interfaces:
> >     Standard:
> >       create: scripts/prep.sh
> >
> > configure_software:
> >   type: tosca.nodes.SoftwareComponent
> >     requirements:
> >       - host: vm_1
> > #    - dependency: prep_software
> >     interfaces:
> >       Standard:
> >         configure:
> >           implementation:
> >             primary: scripts/configure.sh
> >               dependencies:
> >                 - "ssh.user > ubuntu"
> >                 - "ssh.key_filename > ./key.pem"
> >                 - "ssh.address > { get_attribute: [ virtual_ip,
> > floating_ip_address ] }"
> >
> > If I have the template above nodes prep_software and configure_software
> > execute correctly in the desired machine. If the comment above is
> removed,
> > both nodes are executed with execute_with_ssh()
> >
> >
> > Hoe someone can help me or provide any direction for this problem
> >
> > Thanks
> >
> >
> > --
> > Pedro Henrique Gomes
> > www.pedrohenriquegomes.com.br
> > +1-310-3101429 <(310)%20310-1429>
> >
>
-- 
Pedro Henrique Gomes
www.pedrohenriquegomes.com.br
+1-310-3101429

Re: Issue in the execution context when using Openstack plugin

Posted by Thomas Nadeau <tn...@gmail.com>.
It looks like you answered your own question. When you require SSH by
calling "execute_with_ssh" but do not have it configured, its not going to
work right? *)

In any event, can you provide more diagnostic info so that we can see
better where things are failing. I am actually starting to work on
improving the return error/warning codes now, so its timely.

--Tom


On Tue, Feb 27, 2018 at 2:08 PM, Pedro Henrique Gomes <
pedrohenriquegomes@gmail.com> wrote:

> Hello everyone,
>
> I am having a problem with a template that uses Cloudify Openstack plugin.
> Wanted to check out if someone has any clue, because it seems to be a bug.
> I can open a ticket if necessary.
>
> I have a template that creates a Openstack deployment with a VM.
>
> --- In scenario 1) there is a node (call N1) in the template of type
> tosca.nodes.SoftwareComponent that executes some scripts in the VM (using
> ssh). This node has as requirement host the later VM.
> This scenario works fine
>
> -- In scenario 2) there is a node (call N2) in the template also of type
> tosca.nodes.SoftwareComponent, but this other node run locally, not in the
> VM.
> If both nodes exist they work fine but I dont have control over which one
> runs first
>
> -- In scenario 3) we add a requirement dependency to N1 pointing to N2. I
> want to make sure the scripts in N2 run before the scripts in N1.
> But in this case both nodes (N1 and N2) are executed with
> execute_with_ssh() which makes the orchestration break, because N2 does not
> have a sh key, etc.
>
> The snippet from the template is below
>
> prep_server:
>   type: ServerType
>
> prep_software:
>   type: tosca.nodes.SoftwareComponent
>   requirements:
>     - host: prep_server
>     - dependency: vm_1
>  interfaces:
>     Standard:
>       create: scripts/prep.sh
>
> configure_software:
>   type: tosca.nodes.SoftwareComponent
>     requirements:
>       - host: vm_1
> #    - dependency: prep_software
>     interfaces:
>       Standard:
>         configure:
>           implementation:
>             primary: scripts/configure.sh
>               dependencies:
>                 - "ssh.user > ubuntu"
>                 - "ssh.key_filename > ./key.pem"
>                 - "ssh.address > { get_attribute: [ virtual_ip,
> floating_ip_address ] }"
>
> If I have the template above nodes prep_software and configure_software
> execute correctly in the desired machine. If the comment above is removed,
> both nodes are executed with execute_with_ssh()
>
>
> Hoe someone can help me or provide any direction for this problem
>
> Thanks
>
>
> --
> Pedro Henrique Gomes
> www.pedrohenriquegomes.com.br
> +1-310-3101429
>