Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

fileCache not clear in distributed yorc servers #702

@trihoangvo

Description

@trihoangvo

Bug Report

Description

When a deployment is deleted, yorc deletes its local fileCache:
https://github.com/ystia/yorc/blob/develop/deployments/deployments.go#L271

However, when we have more than one yorc servers, only one yorc server receiving the deployment deletion request, deletes its local file cache. The other yorc servers may have their caches of the given deployment.

When the same application is new deployed / updated again, one of the yorc server gets the old topology from its local cache:
https://github.com/ystia/yorc/blob/develop/storage/internal/file/store.go#L230

Actual behavior

As a result, yorc server may reuse outdated information of the old topology from its local file cache. The deployment may be inconsistent occasionally.

Expected behavior

yorc should check if it has its local file cache of the given deployment and clear all keys before proceeding the request?

Steps to reproduce the issue

Have 3 yorc servers

  1. Create an application with 1 compute, 1 software component (e.g., HelloWorld).
  2. Deploy it
  3. Un-deploy it
  4. Change the HelloWorld property to print something else.
  5. Deploy again.

Sometimes, the deployment log prints the old message from the old topology.

Additional information you deem important (e.g. issue happens only occasionally)

Issue happens only occasionally from time to time, when the yorc instances, which delete the deployment (i.e., have the cache cleared) and deploy new (i.e., still have the old cache) are not the same.

Additional environment details (infrastructure implied: AWS, OpenStack, etc.)

no

Output of yorc version

current develop

Yorc configuration file

Priority

This can be temporally fixed by scaling the yorc instances to one so I put it to medium.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions