-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a state in cloud account config #286
Conversation
@@ -202,7 +205,9 @@ func (c *cloudCommon) DoInventoryPoll(accountNamespacedName *types.NamespacedNam | |||
} | |||
accCfg.LockMutex() | |||
defer accCfg.UnlockMutex() | |||
|
|||
if !accCfg.GetAccountConfigState() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you just update GetCloudAccountByName routine to return 'not found' or 'not valid' error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the function to return, account config, found and an error.
db9ca65
to
d97971c
Compare
/nephe-test-e2e-agentless |
6b75a57
to
b018cf1
Compare
The cloud account config contains the service configs and cloud api clients. Whenever cloud account config update fails, reset the cloud account config state to invalid. Any consumer of cloud account config which make the cloud API calls should check the cloud account config state and proceed only if its in a valid state. Signed-off-by: Anand Kumar <[email protected]>
Consider a scenario where the following sequence of events are received. An ANP with Ipaddress block and ATGroup is realized -> Secret delete -> Sync with cloud finds diff and updates member -> AT Modify -> AT Modofy -> NP delete -> ProcessTrackers -> AT delete. This results in a scenario where a tracker has one appliedToSgs, there are no nps in npIndexers, prevAppliedToSgs is nil, computing NP status will result in an empty appliedToToNpMap and there by an error. Fix is to add an additional check to compute Npstatus from appliedToToNpMap and appliedToSgs. Signed-off-by: Anand Kumar <[email protected]>
b018cf1
to
4fef02a
Compare
/nephe-test-e2e-agentless |
/nephe-test-e2e-azure |
2 similar comments
/nephe-test-e2e-azure |
/nephe-test-e2e-azure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
/nephe-test-e2e-azure |
The cloud account config contains the service configs and cloud api clients. Whenever cloud account config update fails, set the cloud account config state to invalid.
Any consumer of cloud account config which makes the cloud API calls should check the cloud account config state and proceed only if it's in a valid state.