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
Allowing Restart-Services from bastion #7958
Conversation
👷 Deploy Preview for chef-automate processing.
|
15c3be0
to
5ac57ac
Compare
5ac57ac
to
9a524b0
Compare
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.
In verify_private pipeline, gateway-integration and data-feed-service is failing. please check that
remoteExecutor := NewRemoteCmdExecutor(nodemap, sshUtil, writer) | ||
cmdResult, err := remoteExecutor.Execute() | ||
return cmdResult, err |
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.
Instead of creating a new instance you can store an instance of remoteExecutor
in the restartFromBastionImpl struct while you are initialising it.
This will reduce the initialisation overhead of remoteExecutor when you are calling executeRemoteExecutor multiple times in your code
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.
You can use ExecuteWithNodeMap for you use case
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.
done
mutex.Lock() | ||
writer.Printf("=====================================================\n") | ||
for _, value := range cmdResult { | ||
for _, cmdResult := range value { | ||
printOutput(remoteService, *cmdResult, []string{}, writer) | ||
} | ||
} | ||
mutex.Unlock() |
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.
mutex may work, but its unnecessary for your use case same could be achieved by channels too
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.
removed
Signed-off-by: Tejaswi Bondila <bondila.venkatatejaswi@progress.com>
Signed-off-by: Tejaswi Bondila <bondila.venkatatejaswi@progress.com>
Signed-off-by: Tejaswi Bondila <bondila.venkatatejaswi@progress.com>
Signed-off-by: Tejaswi Bondila <bondila.venkatatejaswi@progress.com>
Signed-off-by: Tejaswi Bondila <bondila.venkatatejaswi@progress.com>
Signed-off-by: Tejaswi Bondila <bondila.venkatatejaswi@progress.com>
SonarQube Quality Gate |
🔩 Description: What code changed, and why?
As a user of Automate HA, when I run following commands on bastion system of Automate HA cluster, I should see output relevant to Automate HA infrastructure:
chef-automate restart-services
⛓️ Related Resources
https://chefio.atlassian.net/browse/CHEF-720
👍 Definition of Done
👟 How to Build and Test the Change
✅ Checklist
All PRs must tick these:
With occasional exceptions, all PRs from Progress employees must tick these:
make spell
in any component directory)All PRs from Progress employees should tick these if appropriate:
Please add a note next to any checkbox above if you are NOT ticking it.
📷 Screenshots, if applicable
Demo-video