Repository navigation
Conversation
…d of sophomorix-device --dry-run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check devices.csv with linuxmuster-tools instead of
sophomorix-device --dry-runWhen
sophomorix-device --dry-runfails,linuxmuster-import-devicesonly says that it failed: the reason is in the log, and the check stops at the first problem. An admin with several mistakes indevices.csvhas to run the import once per mistake.This PR replaces the dry-run gate with
check_all_schools()from linuxmuster-tools 7.4.19, which validates thedevices.csvof every school at once and reports every problem with its file and line, on the console and in the log:Each code is documented in the devices README of linuxmuster-tools.
What changes
checkDevices()runs before the sync and exits with status 1 if an error is found. Warnings are printed but do not stop the import.runSophomorixDeviceSync()now only runssophomorix-device --sync, unchanged otherwise.debian/control: new dependencylinuxmuster-tools7 (>= 7.4.19). It was already pulled in through linuxmuster-webui7.Differences with
sophomorix-device --dry-run--dry-run<school>-<hostname>), for roles getting a machine account-Because of the new rules, this check can block an import that passes today. To be discussed: the 15 characters limit and the duplicate hostname in particular.
Known limitation: same IP in two schools
The check lets an IP shared between two schools through, as a warning: a fileserver legitimately carries the same address in each school. But
sophomorix-device --syncstill stops on it, because%ip_seen(sophomorix-deviceline 125) is never cleared between the files of the schools (line 1937). Such an import would print "devices.csv check OK" and then fail at the sync. This has to be fixed in sophomorix.🤖 Generated with Claude Code