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
8204944c
Commit
8204944c
authored
Dec 28, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/amazon: handle cases when amazon SG isn't available [GH-494]
parent
2b801a7b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
CHANGELOG.md
CHANGELOG.md
+2
-0
builder/amazon/common/step_security_group.go
builder/amazon/common/step_security_group.go
+11
-1
No files found.
CHANGELOG.md
View file @
8204944c
...
...
@@ -78,6 +78,8 @@ BUG FIXES:
before a "/" [GH-716]
*
core: "{{timestamp}}" values will always be the same for the entire
duration of a build. [GH-744]
*
builder/amazon: Handle cases where security group isn't instantly
available. [GH-494]
*
builder/virtualbox: don't download guest additions if disabled. [GH-731]
*
post-processor/vsphere: Uploads VM properly. [GH-694]
*
post-processor/vsphere: Process user variables.
...
...
builder/amazon/common/step_security_group.go
View file @
8204944c
...
...
@@ -61,7 +61,17 @@ func (s *StepSecurityGroup) Run(state multistep.StateBag) multistep.StepAction {
}
ui
.
Say
(
"Authorizing SSH access on the temporary security group..."
)
if
_
,
err
:=
ec2conn
.
AuthorizeSecurityGroup
(
groupResp
.
SecurityGroup
,
perms
);
err
!=
nil
{
for
i
:=
0
;
i
<
5
;
i
++
{
_
,
err
=
ec2conn
.
AuthorizeSecurityGroup
(
groupResp
.
SecurityGroup
,
perms
)
if
err
==
nil
{
break
}
log
.
Printf
(
"Error authorizing. Will sleep and retry. %s"
,
err
)
time
.
Sleep
((
time
.
Duration
(
i
)
*
time
.
Second
)
+
1
)
}
if
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"Error creating temporary security group: %s"
,
err
)
state
.
Put
(
"error"
,
err
)
ui
.
Error
(
err
.
Error
())
...
...
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