How to remove an orphaned greengrassv2 Component?

0

I have a pretty standard Greengrass component that was installed successfully, failed silently, and now can't be uninstalled -- which in turn causes new Deployments to fail.

aws greengrassv2 \
  list-installed-components \
  --core-device-thing-name="${MY_DEVICE}"

returns

...
    {
      "componentName": "aws.greengrass.SecureTunneling",
      "componentVersion": "1.0.16",
      "lifecycleState": "NEW",
      "lifecycleStateDetails": "An error occurred while running the component. The run script exited with code 1.",
      "isRoot": true,
      "lastStatusChangeTimestamp": 1695069370.467,
      "lastReportedTimestamp": 1695069370.467,
      "lastInstallationSource": "<redacted>",
      "lifecycleStatusCodes": []
    },

but the Deployment at ID <redacted> no longer exists. It seems that the Component has been orphaned.

What is the correct way to clear orphaned components such as this?

已提問 8 個月前檢視次數 234 次
1 個回答
0

Hi,

Deleting or canceling a deployment does not remove that deployment from any devices. To remove the component you need to make a new deployment which does not contain the component. You must make this deployment to the same target as the deployment which put the component there to begin with. If you deployed secure tunneling to a thing group, then deploy to the same thing group without the secure tunneling component. If you deployed to the individual thing, then again make a deployment to the thing that does not contain the component.

Cheers,

Michael

AWS
專家
已回答 8 個月前
  • @MichaelDombrowski-AWS I have already tried something like what you suggest, namely, creating a new Deployment for the same target but with a different version of SecureTunneling. That did not correct the problem.

  • If your deployment is failing because the secure tunneling component is failing, then the deployment is going to rollback by default. Is your deployment failing?

  • If you want to remove the component then you need to remove it from the deployment, not deploy a different version right?

    Or maybe I don't understand your goal. You want to remove this component from the device, correct?

    When you say "orphaned" what do you mean? What are you looking to achieve?

  • OK, so I understand that you have a problem with the secure tunneling component. So I assume that you'd want to downgrade it to an older version then which is compatible with your OS. What happens when you try that deployment with the version you want? Is the deployment successful? If not, what is the error?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南