Comments (12)
Hi @sheshadri99, this message indicates that ADU thinks that the group you are trying to delete still does have devices associated with it. Are you seeing no devices in that group when you view it in the portal? If you use the ADU CLI to list the devices does it appear empty?
"az iot du device list -n -i --filter "groupId eq ''"
@josephmsft to comment if there are other things you can check as well.
from iot-hub-device-update.
Hi @alancshi, i could see there are no devices in the group when viewed through portal.
Checked through cli as well, i am getting empty list as response.
from iot-hub-device-update.
@sheshadri99 that is strange, can you share your account/instance and group name? @josephmsft @Olee2021 can you please help with this investigation?
from iot-hub-device-update.
I'll take a look, please do tell us the account and instance. I'll see if I can find it from the group name alone but that will take longer.
from iot-hub-device-update.
Ok I have determined the issue. You have 1 unhealthy device that is still tagged as part of this group. Because it is unhealthy it is not listed in the device queries you're running. The deviceId is "4e63870a34774967b9ffb73505271931" and moduleId is "FirmwareModule". If you delete this device from your hub you should be able to delete the group. You can see what unhealthy devices you have by querying for unhealthy devices, although for now that API is not returning group information. I will follow up on how we can improve this scenario.
from iot-hub-device-update.
Is this the expected behaviour, having unhealthy devices being tagged to a group stops us from deleting them.
Is untagging the device from group not sufficient to delete group?
Can you share if there is documentation about health of devices?
from iot-hub-device-update.
For one particular device group, when viewed from portal it has no deployments, but when tried with api it says group has 1 active deployment, when tried to delete the deployment via api, it is returning 204 and deployment is not getting deleted.
DeviceId: ACCE000000000000A20000000F23D602
from iot-hub-device-update.
We have noticed this issue with another device group as well where in we are unable to delete a group as the error messages says that there are active deployments in the group, even though via the portal the deployment is not visible.
DELETE https://aduEndpoint/deviceUpdate/aduInstance/management/groups/groupId?api-version=2022-10-01
On calling the get deployments by group Id API we get an empty list:
GET https://aduEndpoint/deviceUpdate/aduInstance/management/groups/groupId/deployments?api-version=2022-10-01
However on calling the GET group details API, we get the deployment Id in the response:
GET https://aduEndpoint/deviceUpdate/aduInstance/management/groups/groupId?api-version=2022-10-01
When we try to delete this deployment using API:
DELETE https://aduEndpoint/deviceUpdate/aduInstance/management/groups/groupId/deployments/ce681527-3101-47d6-853c-b9c1737fb5fa/?api-version=2022-10-01
We get 204 No Content but post that when we try to delete the group again we still get 400 BadREquest
with error as:
{
"error": {
"code": "GroupWithActiveDeploymentCannotBeDeleted",
"message": "Cannot delete Group with an Active deployment. Please delete or cancel the deployment before deleting the group."
}
}
from iot-hub-device-update.
Is this the expected behaviour, having unhealthy devices being tagged to a group stops us from deleting them. Is untagging the device from group not sufficient to delete group? Can you share if there is documentation about health of devices?
This is currently the expected behavior, I am following up with the team if we want to make any changes here since it seems that it's hard to diagnose what is causing the failure with the current behavior.
Untagging the unhealthy device should also work to be able to delete the group.
from iot-hub-device-update.
Is this the expected behaviour, having unhealthy devices being tagged to a group stops us from deleting them. Is untagging the device from group not sufficient to delete group? Can you share if there is documentation about health of devices?
Untagging the unhealthy device should also work to be able to delete the group.
https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-agent-check?tabs=portal is the documentation for agent check
from iot-hub-device-update.
We have noticed this issue with another device group as well where in we are unable to delete a group as the error messages says that there are active deployments in the group, even though via the portal the deployment is not visible. DELETE
https://aduEndpoint/deviceUpdate/aduInstance/management/groups/groupId?api-version=2022-10-01
On calling the get deployments by group Id API we get an empty list: GET
https://aduEndpoint/deviceUpdate/aduInstance/management/groups/groupId/deployments?api-version=2022-10-01
However on calling the GET group details API, we get the deployment Id in the response: GET
https://aduEndpoint/deviceUpdate/aduInstance/management/groups/groupId?api-version=2022-10-01
When we try to delete this deployment using API: DELETE
https://aduEndpoint/deviceUpdate/aduInstance/management/groups/groupId/deployments/ce681527-3101-47d6-853c-b9c1737fb5fa/?api-version=2022-10-01
We get 204 No Content but post that when we try to delete the group again we still get400 BadREquest
with error as:{ "error": { "code": "GroupWithActiveDeploymentCannotBeDeleted", "message": "Cannot delete Group with an Active deployment. Please delete or cancel the deployment before deleting the group." } }
I have investigated and this is due to a bug in the service. Your group currently has no subgroups, but it does have a deployment. In this scenario with no subgroups we are not correctly updating the group record to remove the active deployment when DELETE deployment is called. I will work on a fix and it should be deployed by late next week, after which you should be able to fully delete the deployment by calling DELETE deployment.
from iot-hub-device-update.
This was deployed the following week from my last comment. Closing this issue.
from iot-hub-device-update.
Related Issues (20)
- Device Update Agent attempting MQTT connection over TLSv1 HOT 2
- Device Update Free Edition HOT 1
- Device Update not applying due to lower case conversion of compat property HOT 7
- Device update group not created based on tags in DeviceTwin HOT 13
- Device not added in Azure Device Update Groups in IoT Hub HOT 5
- Cannot Install device update agent 1.0.3 beta version for Debian11 Arm64 on Debian 11.8 running on Raspberry Pi 4 HOT 1
- Configuration file deviceupdate-agent.service is marked executable HOT 7
- Yocto Rpi3 Device is restarting again and again in a loop HOT 2
- Failed parse of JSON file in Rpi4 device HOT 6
- /usr/bin/adu-swupdate.sh never runs (swupdate:2 never used even when registered?) HOT 7
- The packages deployed through device update are not reflecting in the device hosted on ubuntu 22.04 HOT 2
- Ignore duplicate deployment workflow not working as expected HOT 4
- Device reporting new Contract Name & ContractId after device update and stays inProgress in ADU HOT 9
- A/B Update Erases ADU Configuration on Yocto Kirkstone Raspberry Pi 4 - 64 bit Example
- A/B Update Fails on Yocto Kirkstone Raspberry Pi 4 - 64 bit Example do to invalid update image HOT 1
- Device update agent on bullseye 11 raspberry zero HOT 4
- pthread_mutex_unlock doesn't check whether arguments is NULL for windows, this may cause dos HOT 3
- DeviceManagementClient.GetDeviceModuleAsync does not return the ExtendedResultCode HOT 3
- Update status changes to "In Progress" sometime after "Succeeded". HOT 10
- AducIotAgent cannot find custom step handler HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iot-hub-device-update.