Skip to content

Commit

Permalink
Merge pull request #7602 from mikesplain/automated-cherry-pick-of-#75…
Browse files Browse the repository at this point in the history
…86-origin-release-1.14

Automated cherry pick of #7586: upup/pkg/fi/cloudup/awstasks: fix dropped error
  • Loading branch information
k8s-ci-robot authored Sep 16, 2019
2 parents 461d47c + fc14228 commit a85c551
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions upup/pkg/fi/cloudup/awstasks/internetgateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func TestSharedInternetGatewayDoesNotRename(t *testing.T) {
InternetGatewayId: internetGateway.InternetGateway.InternetGatewayId,
VpcId: vpc.Vpc.VpcId,
})
if err != nil {
t.Fatalf("error attaching igw: %v", err)
}

// We define a function so we can rebuild the tasks, because we modify in-place when running
buildTasks := func() map[string]fi.Task {
Expand Down
4 changes: 3 additions & 1 deletion upup/pkg/fi/cloudup/openstacktasks/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ func NewSubnetTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle *fi.Lifecy
return nil, fmt.Errorf("NewSubnetTaskFromCloud: Failed to get network with ID %s: %v", subnet.NetworkID, err)
}
networkTask, err := NewNetworkTaskFromCloud(cloud, lifecycle, network)

if err != nil {
return nil, fmt.Errorf("error creating network task from cloud: %v", err)
}
nameservers := make([]*string, len(subnet.DNSNameservers))
for i, ns := range subnet.DNSNameservers {
nameservers[i] = fi.String(ns)
Expand Down
3 changes: 3 additions & 0 deletions upup/pkg/fi/nodeup/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ func evaluateHostnameOverride(hostnameOverride string) (string, error) {
result, err := svc.DescribeInstances(&ec2.DescribeInstancesInput{
InstanceIds: []*string{&instanceID},
})
if err != nil {
return "", fmt.Errorf("error describing instances: %v", err)
}

if len(result.Reservations) != 1 {
return "", fmt.Errorf("Too many reservations returned for the single instance-id")
Expand Down

0 comments on commit a85c551

Please sign in to comment.