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

Implement "auto" value for automatic IP configuration #816

Closed
crioto opened this issue Apr 12, 2018 · 6 comments
Closed

Implement "auto" value for automatic IP configuration #816

crioto opened this issue Apr 12, 2018 · 6 comments
Assignees
Milestone

Comments

@crioto
Copy link
Member

crioto commented Apr 12, 2018

Currently we support static IP or "dhcp" value for --ip option. We need to implement auto, that will configure interfaces later, after successfully establishing connection with peers. In case when picked IP is already taken by someone this option will automatically reconfigure interface to use next free IP

@crioto
Copy link
Member Author

crioto commented Oct 30, 2018

If feature described in #1124 and #1125 is possible, then we will implement lazy configuration on Linux as well and finish this Epic. Otherwise we will close it along with the issues listed above.

@crioto crioto added this to the v8.2.0 milestone Nov 25, 2018
@crioto
Copy link
Member Author

crioto commented Nov 29, 2018

In order to test this case it's better to create separate environment.

Make sure, that Control Center is disabled on every computer where you test this feature. After you make sure that CC isn't running, restart p2p daemon manually: On windows via services.msc, on Linux: sudo systemctl restart subutai-p2p.service, on macos: sudo launchctl unload /Library/LaunchDaemons/io.subutai.p2p.daemon.plist and sudo launchctl load /Library/LaunchDaemons/io.subutai.p2p.daemon.plist
After you did restart p2p make sure that it was restarting by checking Uptime in p2p debug output.

Now, on a few different computers you need to start manual p2p connection to your fresh env:
p2p start -ip auto -hash <environment_hash> -key <environment_key>
You need to replace <environment_hash> and <environment_key> with data from https://masterbazaar.subutai.io/rest/v1/tray/environments. Make sure that you use right env!

Expected result: all your peers can ping each other. Use p2p debug and see Peers: section to lookup IPs:

Peers:
	--- be0a3d6b-f38e-11e8-8c5a-d8cb8a37cf4b ---
	States: CONNECTED | CONNECTED
	Network: 10.100.10.1 06:0d:ba:4c:f7:a6
	Endpoint: 10.10.148.30:34896
	All Endpoints: 10.10.148.30:34896 [13] 85.93.91.135:20142 [206] 62.138.0.66:20151 [207]
Stats: [C: 0] [R: 0] [HP: 0] [CDelta: 16] [RDelta: 0]
	Endpoints pool: 10.10.148.30:34896 60.51.117.194:34896 85.93.91.135:20142 62.138.0.66:20151
	--- End of be0a3d6b-f38e-11e8-8c5a-d8cb8a37cf4b ---

Look at the Network: 10.100.10.1 06:0d:ba:4c:f7:a6 - 10.100.10.1 is IP that you need to ping to test if p2p works. Of course in your case IP will be different.

If ping works in all directions - that means test passed.
For your convenience you can run this test from all 3 different operating systems at the same time, so your environment will contain 1 peer and 3 other participants will be your clients

@kurmanbekova6
Copy link

Followed the steps described above:
screenshot_21
screenshot from 2018-12-04 10-13-15
screen shot 2018-12-04 at 10 15 01
Tested in master

@kurmanbekova6
Copy link

Output from Linux (prod)
screenshot from 2018-12-04 17-48-07

@kurmanbekova6
Copy link

screenshot_24

@kurmanbekova6
Copy link

screen shot 2018-12-04 at 17 52 26
Tested in prod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants