Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
bd0ee8d3
Commit
bd0ee8d3
authored
Jul 27, 2015
by
Chris Bednarski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2513 from hazelesque/openstack-ip-debug-logging
openstack builder: log which IP address SSH will use
parents
cd9e352b
ce54dba2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
builder/openstack/ssh.go
builder/openstack/ssh.go
+4
-0
No files found.
builder/openstack/ssh.go
View file @
bd0ee8d3
...
...
@@ -23,6 +23,7 @@ func CommHost(
// If we have a specific interface, try that
if
sshinterface
!=
""
{
if
addr
:=
sshAddrFromPool
(
s
,
sshinterface
);
addr
!=
""
{
log
.
Printf
(
"[DEBUG] Using IP address %s from specified interface %s for SSH"
,
addr
,
sshinterface
)
return
addr
,
nil
}
}
...
...
@@ -30,15 +31,18 @@ func CommHost(
// If we have a floating IP, use that
ip
:=
state
.
Get
(
"access_ip"
)
.
(
*
floatingip
.
FloatingIP
)
if
ip
!=
nil
&&
ip
.
IP
!=
""
{
log
.
Printf
(
"[DEBUG] Using floating IP %s for SSH"
,
ip
.
IP
)
return
ip
.
IP
,
nil
}
if
s
.
AccessIPv4
!=
""
{
log
.
Printf
(
"[DEBUG] Using AccessIPv4 %s for SSH"
,
s
.
AccessIPv4
)
return
s
.
AccessIPv4
,
nil
}
// Try to get it from the requested interface
if
addr
:=
sshAddrFromPool
(
s
,
sshinterface
);
addr
!=
""
{
log
.
Printf
(
"[DEBUG] Using IP address %s for SSH"
,
addr
)
return
addr
,
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment