Skip to content
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

[RFE] Reduce the amount of SSH connections #226

Open
grafuls opened this issue Apr 11, 2019 · 3 comments
Open

[RFE] Reduce the amount of SSH connections #226

grafuls opened this issue Apr 11, 2019 · 3 comments

Comments

@grafuls
Copy link
Contributor

grafuls commented Apr 11, 2019

Is your feature request related to a problem? Please describe.
When applying configuration settings for VLANs on the switches, we open an SSH connection per interface in host. Those interfaces can have the same IP address for the switch.

Describe the solution you'd like
Would be nice if we could group those changes per interface in host in cloud by IP address and execute all the necessary switch commands in one single SSH session.

Describe alternatives you've considered
We can start grouping them per host, open an SSH session and run edit/commit per interface. Report any failures in mongo and use this on a subsequent rerun.

@QuantumPosix
Copy link
Contributor

The way that I had tested this for 1.0 was to do the following that was using the old port-files flat file. There are two results that are possible:
Combining 1 hosts similar switch ports into the least number of ssh connections:

  • Gets us the list of switchip's and interfaces attached based on current cloud / reservation

for host in $(quads --cloud-only cloud02); do awk -F "," '{print $3,$5}' /opt/quads/data/ports/$host >> /tmp/cloud02-interfaces ; done

  • Group the interfaces based on switch IP's

sort -V /tmp/cloud02-interfaces awk -F " " '{if(a[$1])a[$1]=a[$1]","$2; else a[$1]=$2;}END{for (i in a)print i, a[i];}' OFS=: /tmp/cloud02-interfaces

I know with the upcoming 1.1 changes it may be need to change based upon the calls to the mongoDB

@grafuls grafuls added this to the 1.2.0 milestone Jun 18, 2019
@grafuls
Copy link
Contributor Author

grafuls commented Aug 10, 2020

We are already grouping those from within each host but not per cloud.
Would be a much greater enhancement if so.
Leaving this open for that reason.

@sadsfae
Copy link
Member

sadsfae commented Jun 26, 2024

Related to: #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

3 participants