Repository navigation
fix(export): do not enable a connector whose data source could not be resolved - #373
Open
jlinenkohl wants to merge 1 commit into
Open
jlinenkohl wants to merge 1 commit into
jlinenkohl wants to merge 1 commit into
Conversation
… resolved
Both exporters infer the AppInsights and LogAnalytics toggles from the presence
of a connector of that type, then read its resource id from
properties.dataSource or extendedProperties.armResourceId. ARM does not return
dataSource on read, and on an agent whose connector predates the current
validation rules extendedProperties is null too, so the id comes back empty
while the toggle is still set to true.
The deployment then fails, every time, on a resource the clone did not need:
InvalidRequestParameter: The object validation failed:
Agent DataConnector 'log-analytics': DataSource is required. is invalid.
Both the bash and the PowerShell clone path failed this way against the same
source agent, which stops the whole deployment rather than skipping one
connector. The toggle is now set only when a resource id was actually resolved,
and a warning names the connector that was left out.
The same root cause affects connectors carried in the connectors array rather
than through a toggle, and there it cannot be fixed by inference: ARM simply
does not return dataSource, so every exported Kusto, IcM or similar connector
has an empty one and the deployment fails on each in turn, from inside the ARM
operation and long after validation passed. clone-agent.sh now reports those
connectors by name during validation and points at the --override flag it
already supports, so the operator can supply the values before anything is
created instead of discovering them one failed deployment at a time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both exporters infer the AppInsights and LogAnalytics toggles from the presence of a connector of that type, then read its resource id from properties.dataSource or extendedProperties.armResourceId. ARM does not return dataSource on read, and on an agent whose connector predates the current validation rules extendedProperties is null too, so the id comes back empty while the toggle is still set to true.
The deployment then fails, every time, on a resource the clone did not need:
Both the bash and the PowerShell clone path failed this way against the same source agent, which stops the whole deployment rather than skipping one connector. The toggle is now set only when a resource id was actually resolved, and a warning names the connector that was left out.
The same root cause affects connectors carried in the connectors array rather than through a toggle, and there it cannot be fixed by inference: ARM simply does not return dataSource, so every exported Kusto, IcM or similar connector has an empty one and the deployment fails on each in turn, from inside the ARM operation and long after validation passed. clone-agent.sh now reports those connectors by name during validation and points at the --override flag it already supports, so the operator can supply the values before anything is created instead of discovering them one failed deployment at a time.