Repository navigation
feat(linbo-remote, linbo_wrapper): create and upload images under a new name - #196
Merged
Merged
Conversation
…ew name linbo-remote accepts the new command image_name:<name>, which makes the following create_image and upload_image commands work on <name>.qcow2 instead of the image defined in start.conf, e.g. linbo-remote -i pc01 -c image_name:noble,create_image:1,upload_image:1 linbo_wrapper runs once per command, both for -c over ssh and for onboot commands, so a name set by a command of its own would be lost before the next one. The parser therefore does not pass image_name on, it appends the name as 4th field to the following image commands, e.g. create_image:1:"msg":noble and upload_image:1::noble. linbo_wrapper reads this field for the image commands only, so "linbo:<password>" is never parsed or echoed as an image name, and hands it to linbo_create_image or uses it as the upload file. The name has to consist of letters, digits, "_" and "-". A chain with image_name is refused if it contains create_qdiff or upload_qdiff, or if no create_image/upload_image follows image_name. Covered by tests/python/test_linbo_remote_lib.py and tests/shell/test_linbo_wrapper.sh. Refs #133 Signed-off-by: thomas@linuxmuster.net Assisted-by: Claude
2 tasks done
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.
Summary
Last part of #133:
linbo-remotecan create and upload an image under a new name, as requested in the issue.image_name:<name>makes the followingcreate_image/upload_imagecommands use<name>.qcow2instead of the start.conf image.linbo_wrapperis started once per command (both-cover ssh and onboot-p), so a name kept in the wrapper would be lost. The parser therefore appends the name as 4th field to the image commands (create_image:1:"msg":noble,upload_image:1::noble) instead of passingimage_nameon. Stateless, nothing left behind on the client.linbo_wrapperonly reads that field for the image commands, solinbo:<password>is never parsed or echoed as a name.^[A-Za-z0-9_-]+$), chains combiningimage_namewithcreate_qdiff/upload_qdiff, andimage_namewithout a followingcreate_image/upload_image.linbo-remoteandlinbo_wrapperupdated; headers converted.Follow-up outside this repo: linuxmuster-tools'
SUPPORTED_COMMANDS(linbo_sync.py) does not knowimage_name, so WebUI/API cannot use it yet.Test plan
tests/python134 passed (newimage_namecases), shell suite green under dash and busybox ash (image_name_file)linbo_remote_*.py) and multi-1 (this PR'slinbo_wrapper), originals restored afterwards:image_name:no.ble,...,image_name:zznew2,create_qdiff:2,image_name:zznew2,rebootrefused by linbo-remote--dry-run -c 'image_name:zznew2,create_image:2:pr6 test,upload_image:2': wrapper would runlinbo_create_image 2 zznew2.qcow2,create_desc zznew2.qcow2,linbo_upload ***** zznew2.qcow2zznew2re-created and uploaded (own derivative ofdebian, accepted by the pre-upload guards), desc "pr6 test", previous version moved tobackups/, supplemental files kept🤖 Generated with Claude Code