-
Notifications
You must be signed in to change notification settings - Fork 334
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
Fix for server-connect-attribute #657
Fix for server-connect-attribute #657
Conversation
spec/unit/ec2_server_create_spec.rb
Outdated
end | ||
|
||
context "when server is created" do | ||
it "return connection_host" do |
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.
Shouldn't this be "returns the public host name"
end | ||
end | ||
|
||
context "when server is created" do |
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.
when public DNS name is present
This looks like it breaks some existing functionality. The method should return nil, the private IP, or the public DNS name. We need to ensure that all 3 of those scenarios continue to function and it looks like they don't with this change. If you check the git blame on this method you should be able to track down the PRs that made this change and why they did so. |
4ca199c
to
4c5c93f
Compare
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
4c5c93f
to
158c114
Compare
Hi @tas50 so in this condition, if we set server-connect-attribute private_ip_address or vpc_mode?, then the connection_host method sets SSH target as a private IP address, and the server_name method return the Public DNS name. So I think, this will fix all 3 of those scenarios. In this fix, we will Connect the same address as SSH Target sets. |
Signed-off-by: Kapil Chouhan kapil.chouhan@msystechnologies.com
Description
server-connect-attribute
Related Issue
Fixes: #652
Types of changes
Checklist: