-
Notifications
You must be signed in to change notification settings - Fork 61
(config): Local deployment cannot override Nucleus deploymentPollingFrequencySeconds configuration #1765
Description
Summary
Local deployments using RESET + MERGE operations fail to override the deploymentPollingFrequencySeconds configuration on the Nucleus component, even when using --groupId to target the specific thing group that owns the configuration. The deployment succeeds but the configuration value remains unchanged.
This same approach (RESET + MERGE) works correctly for other components (e.g., custom component accessControl configuration), suggesting special handling or protection of Nucleus configuration that is not documented.
Environment
- Greengrass Nucleus Version: 2.15.0
- OS: Linux (aarch64)
- Region: ap-southeast-2
Steps to Reproduce
Test 1: Local deployment without --groupId
sudo /greengrass/v2/bin/greengrass-cli deployment create \
--update-config '{
"aws.greengrass.Nucleus": {
"RESET": ["/deploymentPollingFrequencySeconds"],
"MERGE": {
"deploymentPollingFrequencySeconds": 345600
}
}
}'Result: Deployment succeeds, but deploymentPollingFrequencySeconds remains 15.
Test 2: Local deployment with --groupId targeting the thing group
sudo /greengrass/v2/bin/greengrass-cli deployment create \
--groupId thinggroup/MyGroup \
--update-config '{
"aws.greengrass.Nucleus": {
"RESET": ["/deploymentPollingFrequencySeconds"],
"MERGE": {
"deploymentPollingFrequencySeconds": 345600
}
}
}'Result: Deployment succeeds, but deploymentPollingFrequencySeconds remains 15.
Expected Behavior
The deploymentPollingFrequencySeconds should be updated to 345600 (4 days) after either deployment completes successfully.
According to CONFIGURE_COMPONENT_README.md:
"The configuration will first perform RESET and then perform MERGE, regardless of the order they are given in the JSON Object."
The RESET should clear the cloud-configured value, and MERGE should apply the new value.
Actual Behavior
Both deployments complete with SUCCEEDED status, but the Nucleus configuration shows deploymentPollingFrequencySeconds: "15" (unchanged from cloud deployment default).
Logs
Test 1: Without --groupId (Deployment ID: 8ba89165-db22-4fb9-97b6-f7a1ab047cdd)
Deployment document received:
2026-02-09T03:39:18.653Z [INFO] (pool-3-thread-33) com.aws.greengrass.deployment.DeploymentService:
Received deployment document in queue. {document={
"requestId":"8ba89165-db22-4fb9-97b6-f7a1ab047cdd",
"requestTimestamp":1770608353003,
"componentsToMerge":null,
"componentsToRemove":null,
"groupName":null,
"requiredCapabilities":null,
"componentNameToConfig":null,
"configurationUpdate":{
"aws.greengrass.Nucleus":{
"MERGE":{"deploymentPollingFrequencySeconds":345600.0},
"RESET":["/deploymentPollingFrequencySeconds"]
}
},
"componentToRunWithInfo":null,
"recipeDirectoryPath":null,
"artifactsDirectoryPath":null,
"failureHandlingPolicy":null
}, serviceName=DeploymentService, currentState=RUNNING}
Deployment completed:
2026-02-09T03:40:25.550Z [INFO] (pool-3-thread-114) com.aws.greengrass.deployment.activator.DeploymentActivator:
merge-config. All services updated. {deploymentId=8ba89165-db22-4fb9-97b6-f7a1ab047cdd}
Post-deployment configuration check:
$ sudo /greengrass/v2/bin/greengrass-cli component details --name aws.greengrass.Nucleus | grep polling
Configuration: {...,"deploymentPollingFrequencySeconds":"15",...}Test 2: With --groupId (Deployment ID: f727f52b-2027-4dc3-84dd-9c3e41c9c8b1)
Deployment document received:
2026-02-09T05:43:06.057Z [INFO] (pool-3-thread-33) com.aws.greengrass.deployment.DeploymentService:
Received deployment document in queue. {document={
"requestId":"f727f52b-2027-4dc3-84dd-9c3e41c9c8b1",
"requestTimestamp":1770615778425,
"componentsToMerge":null,
"componentsToRemove":null,
"groupName":"thinggroup/MyGroup",
"requiredCapabilities":null,
"componentNameToConfig":null,
"configurationUpdate":{
"aws.greengrass.Nucleus":{
"MERGE":{"deploymentPollingFrequencySeconds":345600.0},
"RESET":["/deploymentPollingFrequencySeconds"]
}
},
"componentToRunWithInfo":null,
"recipeDirectoryPath":null,
"artifactsDirectoryPath":null,
"failureHandlingPolicy":null
}, serviceName=DeploymentService, currentState=RUNNING}
Config merge applied:
2026-02-09T05:43:39.997Z [INFO] (pool-3-thread-143) com.aws.greengrass.deployment.DeploymentConfigMerger:
merge-config. Applying deployment changes. {deployment=f727f52b-2027-4dc3-84dd-9c3e41c9c8b1}
Deployment completed:
2026-02-09T05:44:11.321Z [INFO] (pool-3-thread-143) com.aws.greengrass.deployment.activator.DeploymentActivator:
merge-config. All services updated. {deploymentId=f727f52b-2027-4dc3-84dd-9c3e41c9c8b1}
2026-02-09T05:44:21.324Z [INFO] (pool-3-thread-33) com.aws.greengrass.deployment.DeploymentStatusKeeper:
Stored deployment status. {DeploymentId=f727f52b-2027-4dc3-84dd-9c3e41c9c8b1, DeploymentStatus=SUCCEEDED}
Post-deployment configuration check:
$ sudo /greengrass/v2/bin/greengrass-cli component details --name aws.greengrass.Nucleus | grep polling
Configuration: {...,"deploymentPollingFrequencySeconds":"15",...}Comparison: Working Case with Custom Component
For comparison, the same RESET + MERGE approach works correctly for a custom component's accessControl configuration:
Deployment ID: 07b3e9e6-2e78-492c-baf0-8f31a54c6c41
sudo /greengrass/v2/bin/greengrass-cli deployment create \
--merge "devcontainer=1.0.6647" \
--update-config '{
"devcontainer": {
"RESET": ["/accessControl"],
"MERGE": {
"accessControl": {
"aws.greengrass.Cli": {
"...:AllowCreateLocalDeployment": {...},
"...:AllowGetComponentDetails": {...}
}
}
}
}
}'Result: Deployment succeeded AND configuration was updated correctly.
Context
The device belongs to multiple thing groups that depend on the Nucleus component:
thinggroup/MyGroup(setsdeploymentPollingFrequencySeconds: 15)thinggroup/MyDevcontainerGroupthinggroup/MyOtherGroup
The Nucleus recipe default configuration also specifies:
DefaultConfiguration:
deploymentPollingFrequencySeconds: "15"Questions
- Is there intentional protection preventing local deployments from overriding Nucleus configuration?
- If so, is this documented anywhere?
- If not, is this a bug in the configuration merge logic for Nucleus components?
- What is the recommended approach to temporarily override
deploymentPollingFrequencySecondsfrom a device without modifying cloud deployments?
Use Case
We need to temporarily pause cloud deployment polling during local development/debugging sessions on edge devices, then resume normal polling afterward. The ability to control this via local deployment would be valuable for development workflows.