Impossible to access node properties via Fabric

Description

For example, the following snippet from a bash script:

1 2 #/bin/bash result=$(ctx node properties my_property)

— doesn't work. result ends up being an empty string.

Analysis showed that this happens because scripts running via Fabric use the HttpCtxProxy. The evaluation of ctx.node.properties fails because this line:

https://github.com/cloudify-cosmo/cloudify-plugins-common/blob/4.3/cloudify/context.py#L290

— fails. The reason it fails is that it asks to find the context in the current thread, which it can't find because the HTTP proxy serves requests in threads.

Status

Assignee

Isaac Shabtay

Reporter

Isaac Shabtay

Labels

None

Severity

None

Bug Type

legacy bug

Target Version

4.3

Severity

None

Sprint

None

Fix versions

Affects versions

4.0.0
3.4.2
4.1.1.1
4.1
4.2
4.1.1