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
bdac2a87
Commit
bdac2a87
authored
Jul 12, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CHANGELOG
parent
7a9109d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
15 deletions
+13
-15
CHANGELOG.md
CHANGELOG.md
+1
-0
builder/amazonebs/step_run_source_instance.go
builder/amazonebs/step_run_source_instance.go
+12
-15
No files found.
CHANGELOG.md
View file @
bdac2a87
...
...
@@ -7,6 +7,7 @@ FEATURES:
IMPROVEMENTS:
*
amazon-ebs: Verify the source AMI is EBS-backed before launching. [GH-169]
*
vmware: error if shutdown command has non-zero exit status.
BUG FIXES:
...
...
builder/amazonebs/step_run_source_instance.go
View file @
bdac2a87
...
...
@@ -28,23 +28,20 @@ func (s *stepRunSourceInstance) Run(state map[string]interface{}) multistep.Step
SecurityGroups
:
[]
ec2
.
SecurityGroup
{
ec2
.
SecurityGroup
{
Id
:
securityGroupId
}},
}
ui
.
Say
(
"Validating Source AMI..."
)
imageResp
,
err
:=
ec2conn
.
Images
([]
string
{
config
.
SourceAmi
},
ec2
.
NewFilter
())
if
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"There was a problem with the provided source AMI: %s"
,
err
)
state
[
"error"
]
=
err
ui
.
Error
(
err
.
Error
())
return
multistep
.
ActionHalt
}
ui
.
Say
(
"Launching a source AWS instance..."
)
imageResp
,
err
:=
ec2conn
.
Images
([]
string
{
config
.
SourceAmi
},
ec2
.
NewFilter
())
if
err
!=
nil
{
state
[
"error"
]
=
fmt
.
Errorf
(
"There was a problem with the source AMI: %s"
,
err
)
return
multistep
.
ActionHalt
}
if
imageResp
.
Images
[
0
]
.
RootDeviceType
!=
"ebs"
{
err
:=
fmt
.
Errorf
(
"The provided source AMI is instance-store based. The amazon-ebs bundler can only work with EBS based AMIs."
)
state
[
"error"
]
=
err
ui
.
Error
(
err
.
Error
()
)
return
multistep
.
ActionHalt
}
if
imageResp
.
Images
[
0
]
.
RootDeviceType
!=
"ebs"
{
state
[
"error"
]
=
fmt
.
Errorf
(
"The provided source AMI is instance-store based. The
\n
"
+
"amazon-ebs bundler can only work with EBS based AMIs."
)
return
multistep
.
ActionHalt
}
ui
.
Say
(
"Launching a source AWS instance..."
)
runResp
,
err
:=
ec2conn
.
RunInstances
(
runOpts
)
if
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"Error launching source instance: %s"
,
err
)
...
...
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