> As for target_changed, I don't think ARIA checks the state when executing any 
> operation.
YAML profile spec states the following:
"In addition, whenever the node state of its target node changes, the 
target_changed operation is invoked on it to address this change."
I guess ARIA is not compliant here (?).


>> Does the ST designer need to specify an implementation artifact for 
>> such operation?
>No, ARIA will just skip operations without implementations. *However*, 
>it will still change the state accordingly: an operation without an 
>implementation is considered always to succeed in this case. (And the 
>opposite is also true: if an implementation artifact fails to run, the 
>state will not be changed, and indeed the workflow as a whole will 
>fail.)

I think the ST designer needs to specify an implementation for the 
target_changed operation if the ST designer wants the source node to 
change/override its state.
Now looking back I think it is a  bad idea to create an implementation script 
(associated with target_changed operation) that will change the state of the 
source node since it is not the way states are handled in TOSCA.
Node states are always independent regardless of relationships.
Do you agree?

In summary, I think it is better if one completely avoid using the normative 
Configure interface (tosca.interfaces.relationship.Configure) with ARIA or any 
TOSCA orchestrator since the target node is always instantiated before the 
source node and operation interleave is not supported for normative 
deploy/undeploy workflows. 
Bottom-line, it looks like the Configure interface 
(tosca.interfaces.relationship.Configure) is only valid when both source and 
target nodes are instantiated concurrently. Do you agree?

-Steve

-----Original Message-----
From: Tal Liron [mailto:[email protected]] 
Sent: Tuesday, October 03, 2017 1:11 PM
To: [email protected]
Subject: Re: Relationships and Order of Node instantiation

On Tue, Oct 3, 2017 at 11:58 AM, Steve Baillargeon < 
[email protected]> wrote:

>
> It looks like for the normative install workflow, the target node is 
> always created before the source node regardless of the relationship 
> (and regardless if it is a normative or custom relationship).
> Is this correct? And only a custom workflow can change this "default 
> direction/ordering", right?
>

Correct.


> For instance, if I stop the target node (target node state goes from 
> STARTED to CONFIGURED), will ARIA actually perform a target_changed 
> operation on the source node?
>

How do you stop just one node? You would a custom workflow for that, and I 
imagine behavior would have to be very domain-specific if you want the service 
to remain stable.

As for target_changed, I don't think ARIA checks the state when executing any 
operation. The state is there for you to access and possibly consider when 
implementation the operation. But ARIA can't know what to do.


> If so, what is the information provided in the target_changed?
>

The operation is defined in the normative interface type as empty, without 
inputs.

That said, ARIA provides a rich interface to the complete context:
https://cwiki.apache.org/confluence/display/ARIATOSCA/Execution+Context


> Does the ST designer need to specify an implementation artifact for 
> such operation?
>

No, ARIA will just skip operations without implementations. *However*, it will 
still change the state accordingly: an operation without an implementation is 
considered always to succeed in this case. (And the oppoiste is also true: if 
an implementation artifact fails to run, the state will not be changed, and 
indeed the workflow as a whole will fail.)


> In your opinion, should the state of the source node also changed to 
> CONFIGURED in such case, say for a hosted on relationship?
>

My opinion doesn't matter too much here, since we are trying to follow the spec 
as closely as possible... and I recall we had some challenges here, because 
there was some conflicting information.

If you can make a convincing case one way or another, with reference to the 
spec and its potential errors, then of course we can implement it.

Reply via email to