Additional guidance when syncuser conflicts

- Closes #1359

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-09-06 14:02:47 -06:00
parent 373bfcbdee
commit d05414436a
2 changed files with 3 additions and 4 deletions

View File

@@ -45,6 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added
- Added option for wwclient port number. #1349
- Additional helper directions during syncuser conflict. #1359
### Changed

View File

@@ -113,10 +113,8 @@ func (db syncDB) checkConflicts() error {
for nameInHost, hostIds := range db {
if hostIds.HostID == containerIds.ContainerID {
errorMsg := fmt.Sprintf("id(%v) collision: host(%s) container(%s)", containerIds.ContainerID, nameInHost, nameInContainer)
wwlog.Warn(errorMsg)
wwlog.Warn("add %s to host to resolve conflict", nameInContainer)
return errors.New(errorMsg)
wwlog.Warn("syncuser cannot determine what name should be assigned to id number %v: on the local host it is assigned to '%s'; but in the container it is assigned to '%s'. Since the container's name doesn't exist on the local host, it cannot be reassigned to a different id number. To resolve the conflict, add the container's name to the local host and re-run syncuser.", containerIds.ContainerID, nameInHost, nameInContainer)
return errors.New(fmt.Sprintf("id(%v) collision: host(%s) container(%s)", containerIds.ContainerID, nameInHost, nameInContainer))
}
}
}