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
51206a49
Commit
51206a49
authored
Jul 14, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/amazonebs: Don't export sshTimeout so it can't be set
parent
07449a78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
builder/amazonebs/builder.go
builder/amazonebs/builder.go
+4
-2
builder/amazonebs/step_connect_ssh.go
builder/amazonebs/step_connect_ssh.go
+2
-2
No files found.
builder/amazonebs/builder.go
View file @
51206a49
...
@@ -35,7 +35,6 @@ type config struct {
...
@@ -35,7 +35,6 @@ type config struct {
InstanceType
string
`mapstructure:"instance_type"`
InstanceType
string
`mapstructure:"instance_type"`
SSHUsername
string
`mapstructure:"ssh_username"`
SSHUsername
string
`mapstructure:"ssh_username"`
SSHPort
int
`mapstructure:"ssh_port"`
SSHPort
int
`mapstructure:"ssh_port"`
SSHTimeout
time
.
Duration
SecurityGroupId
string
`mapstructure:"security_group_id"`
SecurityGroupId
string
`mapstructure:"security_group_id"`
// Configuration of the resulting AMI
// Configuration of the resulting AMI
...
@@ -43,6 +42,9 @@ type config struct {
...
@@ -43,6 +42,9 @@ type config struct {
PackerDebug
bool
`mapstructure:"packer_debug"`
PackerDebug
bool
`mapstructure:"packer_debug"`
RawSSHTimeout
string
`mapstructure:"ssh_timeout"`
RawSSHTimeout
string
`mapstructure:"ssh_timeout"`
// Unexported fields that are calculated from others
sshTimeout
time
.
Duration
}
}
type
Builder
struct
{
type
Builder
struct
{
...
@@ -110,7 +112,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
...
@@ -110,7 +112,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
errs
=
append
(
errs
,
errors
.
New
(
"An ssh_username must be specified"
))
errs
=
append
(
errs
,
errors
.
New
(
"An ssh_username must be specified"
))
}
}
b
.
config
.
SSH
Timeout
,
err
=
time
.
ParseDuration
(
b
.
config
.
RawSSHTimeout
)
b
.
config
.
ssh
Timeout
,
err
=
time
.
ParseDuration
(
b
.
config
.
RawSSHTimeout
)
if
err
!=
nil
{
if
err
!=
nil
{
errs
=
append
(
errs
,
fmt
.
Errorf
(
"Failed parsing ssh_timeout: %s"
,
err
))
errs
=
append
(
errs
,
fmt
.
Errorf
(
"Failed parsing ssh_timeout: %s"
,
err
))
}
}
...
...
builder/amazonebs/step_connect_ssh.go
View file @
51206a49
...
@@ -30,9 +30,9 @@ func (s *stepConnectSSH) Run(state map[string]interface{}) multistep.StepAction
...
@@ -30,9 +30,9 @@ func (s *stepConnectSSH) Run(state map[string]interface{}) multistep.StepAction
waitDone
<-
true
waitDone
<-
true
}()
}()
log
.
Printf
(
"Waiting for SSH, up to timeout: %s"
,
config
.
SSH
Timeout
.
String
())
log
.
Printf
(
"Waiting for SSH, up to timeout: %s"
,
config
.
ssh
Timeout
.
String
())
timeout
:=
time
.
After
(
config
.
SSH
Timeout
)
timeout
:=
time
.
After
(
config
.
ssh
Timeout
)
WaitLoop
:
WaitLoop
:
for
{
for
{
// Wait for either SSH to become available, a timeout to occur,
// Wait for either SSH to become available, a timeout to occur,
...
...
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