Refactor and fix bugs in syncuids
Closes #840 * SyncUids can now return applicable errors even during showOnly, so updated ContainerImport to ignore errors during showOnly. * Fixed handling of file gids during SyncUids Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
7093d722a5
commit
7b2f278f94
@@ -203,11 +203,14 @@ func ContainerImport(cip *wwapiv1.ContainerImportParameter) (containerName strin
|
||||
return
|
||||
}
|
||||
|
||||
err = container.SyncUids(cip.Name, !cip.SyncUser)
|
||||
if err != nil && !cip.SyncUser {
|
||||
SyncUserShowOnly := !cip.SyncUser
|
||||
err = container.SyncUids(cip.Name, SyncUserShowOnly)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error in user sync, fix error and run 'syncuser' manually: %s", err)
|
||||
wwlog.Error(err.Error())
|
||||
return
|
||||
if cip.SyncUser {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
wwlog.Info("Building container: %s", cip.Name)
|
||||
|
||||
Reference in New Issue
Block a user