Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rest-api/workflow/pkg/activity/machine/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (mm *ManageMachine) UpdateMachinesInDB(ctx context.Context, siteIDStr strin
Status: &status,
})
if serr != nil {
logger.Error().Err(err).Msg("failed to update Site status in DB")
logger.Error().Err(serr).Msg("failed to update Site status in DB")
}

sdDAO := cdbm.NewStatusDetailDAO(mm.dbSession)
Expand All @@ -173,7 +173,7 @@ func (mm *ManageMachine) UpdateMachinesInDB(ctx context.Context, siteIDStr strin
InventoryReceived: &curTime,
})
if serr != nil {
logger.Error().Err(err).Msg("failed to update Site status in DB")
logger.Error().Err(serr).Msg("failed to update Site status in DB")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (mskg ManageOsImage) UpdateOsImagesInDB(ctx context.Context, siteID uuid.UU
if ossaStatus != ossa.Status {
serr := mskg.updateOperatingSystemSiteAssociationStatusInDB(ctx, nil, ossa.ID, cdb.GetStrPtr(ossaStatus), ossaStatusMessage)
if serr != nil {
slogger.Error().Err(err).Msg("failed to update OS Image Site Association status detail in DB")
slogger.Error().Err(serr).Msg("failed to update OS Image Site Association status detail in DB")
}
updatedOperatingSystemMap[ossa.OperatingSystemID] = true
}
Expand Down Expand Up @@ -211,7 +211,7 @@ func (mskg ManageOsImage) UpdateOsImagesInDB(ctx context.Context, siteID uuid.UU
// Trigger re-evaluation of Operating System status (delete if no association exists)
serr = mskg.UpdateOperatingSystemStatusInDB(ctx, ossa.OperatingSystemID)
if serr != nil {
slogger.Error().Err(err).Msg("failed to trigger Operating System status update in DB")
slogger.Error().Err(serr).Msg("failed to trigger Operating System status update in DB")
}
} else {
// Was this created within inventory receipt interval? If so, we may be processing an older inventory
Expand All @@ -235,7 +235,7 @@ func (mskg ManageOsImage) UpdateOsImagesInDB(ctx context.Context, siteID uuid.UU

serr = mskg.updateOperatingSystemSiteAssociationStatusInDB(ctx, nil, ossa.ID, cdb.GetStrPtr(cdbm.OperatingSystemSiteAssociationStatusError), cdb.GetStrPtr("Operating System is missing on Site"))
if serr != nil {
slogger.Error().Err(err).Msg("failed to update Operating System Site Association status detail in DB")
slogger.Error().Err(serr).Msg("failed to update Operating System Site Association status detail in DB")
}

updatedOperatingSystemMap[ossa.OperatingSystemID] = true
Expand Down
4 changes: 2 additions & 2 deletions rest-api/workflow/pkg/activity/sshkeygroup/sshkeygroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func (mskg ManageSSHKeyGroup) UpdateSSHKeyGroupsInDB(ctx context.Context, siteID

serr = mskg.updateSSHKeyGroupSiteAssociationStatusInDB(ctx, nil, skgsa.ID, cdb.GetStrPtr(cdbm.SSHKeyGroupSiteAssociationStatusError), cdb.GetStrPtr("SSHKeyGroup is missing on Site"))
if serr != nil {
slogger.Error().Err(err).Msg("failed to update SSH Key Group Site Association status detail in DB")
slogger.Error().Err(serr).Msg("failed to update SSH Key Group Site Association status detail in DB")
}

updatedSkgMap[skgID] = true
Expand All @@ -413,7 +413,7 @@ func (mskg ManageSSHKeyGroup) UpdateSSHKeyGroupsInDB(ctx context.Context, siteID
// but the status is not synced, so we need to sync it
serr := mskg.updateSSHKeyGroupSiteAssociationStatusInDB(ctx, nil, skgsa.ID, cdb.GetStrPtr(cdbm.SSHKeyGroupSiteAssociationStatusSynced), cdb.GetStrPtr("SSH Key Group has successfully been synced with Site"))
if serr != nil {
slogger.Error().Err(err).Msg("failed to update SSH Key Group status detail in DB")
slogger.Error().Err(serr).Msg("failed to update SSH Key Group status detail in DB")
}

updatedSkgMap[skgID] = true
Expand Down
2 changes: 1 addition & 1 deletion rest-api/workflow/pkg/activity/vpcprefix/vpcprefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func (mvp ManageVpcPrefix) UpdateVpcPrefixesInDB(ctx context.Context, siteID uui

serr = mvp.updateVpcPrefixStatusInDB(ctx, nil, vpcPrefix.ID, cdb.GetStrPtr(cdbm.VpcPrefixStatusError), cdb.GetStrPtr("VPC Prefix is missing on Site"))
if serr != nil {
slogger.Error().Err(err).Msg("failed to update VPC Prefix status detail in DB")
slogger.Error().Err(serr).Msg("failed to update VPC Prefix status detail in DB")
}
}
}
Expand Down
Loading