Skip to content

Commit

Permalink
apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas016 committed Feb 5, 2024
1 parent b527ef7 commit 55b37bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pkg/api/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func (m *MachineStatus) GetVolumesAsMap() map[string]*VolumeStatus {

result := make(map[string]*VolumeStatus, len(m.VolumeStatus))
for index := range m.VolumeStatus {
// TODO: Using name isn't good idea because we cannot create volumes with the same name
result[m.VolumeStatus[index].Name] = &m.VolumeStatus[index]
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/machine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (r *MachineReconciler) reconcileMachine(ctx context.Context, id string) err
machine.Status.VolumeStatus = volumeStates
if err != nil {
if _, locErr := r.machines.Update(ctx, machine); locErr != nil {
log.Error(locErr, "failed to update image metadate")
log.Error(locErr, "failed to update API machine state")
}
return providerimage.IgnoreImagePulling(err)
}
Expand All @@ -357,7 +357,7 @@ func (r *MachineReconciler) reconcileMachine(ctx context.Context, id string) err
machine.Status.State = state

if _, err = r.machines.Update(ctx, machine); err != nil {
return fmt.Errorf("failed to update image metadate: %w", err)
return fmt.Errorf("failed to update API machine state: %w", err)
}

return nil
Expand Down

0 comments on commit 55b37bc

Please sign in to comment.