How to remove a component from running on an installation

0

I have created a deployment which deploys a component to a Thing Group, which contains Thing-X - and this results in the successfull deploymnet and running of the component on Thing-X. However, when I remove Thing-X from the Thing Group being targetted by the deployment - it doesn't seem to remove the component from being run on Thing-X. Also - i'm pretty sure when i revised the original deployment to the thing group, without Thing-X, it still doesn't remove the component from being run. Currently, the device's IoT policy currently grant's all permissions on greengrass:*

What is the correct process to remove a component from being run after it's been deployed ?

majh
已提问 2 年前233 查看次数
1 回答
0
已接受的回答

Hi majh. If you haven't already, please read this document: https://docs.aws.amazon.com/greengrass/v2/developerguide/manage-deployments.html. In particular:

Enter image description here

What version of the nucleus are you running?

If you are running 2.5.1 or later, and the greengrass:ListThingGroupsForCoreDevice permission is granted in the policy (and it seems to be in your case), then the component would be removed on "the next deployment" to that device. (So long as another deployment that targets the device doesn't include that component.)

profile pictureAWS
专家
Greg_B
已回答 2 年前
  • Thanks @Greg_B - So what does this boil down to operationally - as it seems like we want to redeploy to that unit, but not actually change anything, just trigger the process which will remove the component. Is there any sort of generally used scheme for this ? Do we just revise a deployment that is targetting that particular 'Thing' and that will be the trigger ? Or do we need some sort of dummy 'Trigger' component that is just sent down to allow cleanup of removed components ?

  • Hi majh - I'm not sure I understand your statement. Removing a component certainly changes the state of the device. Are you not adding Thing-X to a different group which would trigger a deployment? If not, then you'll need a deployment that targets the Thing.

  • Hi JoeAtAWS - In this case - I didn't have a specific need to add Thing-X to a different group, what I wanted, was just to remove the component from being run on the thing. So basically what I meant was, it seems to me that in order to actually have the component removed from the Thing-X, I have to first remove the thing from the group targeted by the component deployment, and then create some sort of dummy or trigger deployment to send down to that thing - so that the removal actually happens. And i was asking how this is generally done. It just seems like there should be a dummy trigger component that's only purpose is to be sent down to the unit to force any component removals to occcur.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则