Skip to content

Conversation

@dirkmueller
Copy link
Member

otherwise --output path/to/dir produces path/to/dir.raw. with this change it produces path/to/dir/image-$timestamp.raw.

@dirkmueller dirkmueller requested a review from a team as a code owner December 12, 2025 09:20
@atanasdinov
Copy link
Contributor

Trying out the example in the description I see the following:

atanas:/home/atanas/elemental-fork # ./build/elemental3 customize --type raw --local --config-dir examples/elemental/customize/linux-only/ --output path/to/dir
INFO[0000] Customizing image started                    
...
INFO[0010] Partitioning image 'path/to/dir'             
INFO[0020] Customize complete                           

atanas:/home/atanas/elemental-fork # tree path
path
└── to
    ├── dir
    └── dir.sha256

I believe this is fine. It will take the full path as a directory until the last one which would be considered the filename.

If I create a directory beforehand, and try to --output <existing-dir>, it will just fail because it is unexpected:

atanas:/home/atanas/elemental-fork # mkdir pp
atanas:/home/atanas/elemental-fork # ./build/elemental3 customize --type raw --local --config-dir examples/elemental/customize/linux-only/ --output pp
INFO[0000] Customizing image started                    
...                   
INFO[0010] Partitioning image 'pp'                      
ERRO[0010] Customizing image media failed               
ERRO[0010] Customizing installer media failed           
2025/12/12 11:39:07 failed partitioning disk 'pp' with systemd-repart: exit status 1

@dirkmueller
Copy link
Member Author

If I create a directory beforehand, and try to --output , it will just fail because it is unexpected:

you're testing without the PR, with the PR the output is this:

$ sudo ./build/elemental3 customize --type raw --local --config-dir examples/elemental/customize/linux-only/ --output pp
[sudo] Passwort für root: 
INFO[0000] Customizing image at pp/image-2025-12-12T09-51-03.raw 
INFO[0000] Configuring image components                 
INFO[0000] Custom configuration scripts not provided, skipping. 
INFO[0000] Kubernetes is not enabled, skipping configuration 
INFO[0000] Pulling extension elemental3ctl from registry.suse.de/devel/unifiedcore/releases/0.5/containers/suse/uc/elemental3ctl:0.5_12.2-2.26... 
INFO[0000] Translating butane configuration to Ignition syntax 
INFO[0000] Extracting ISO from container image registry.suse.de/devel/unifiedcore/releases/0.5/containers/uc-base-kernel-default-iso:16.0-14.14 
INFO[0015] Loading ISO install description              
INFO[0015] Parsing media type                           
INFO[0015] Customizing image media                      
INFO[0015] Starting rsync...                            
INFO[0015] Finished syncing                             
INFO[0017] Starting rsync...                            
INFO[0017] Finished syncing                             
INFO[0017] Partitioning image 'pp/image-2025-12-12T09-51-03.raw' 
INFO[0028] Customize complete      

@atanasdinov
Copy link
Contributor

I was referring to this being the entry point:

otherwise --output path/to/dir produces path/to/dir.raw

@dirkmueller
Copy link
Member Author

I was referring to this being the entry point:

otherwise --output path/to/dir produces path/to/dir.raw

True, I wrote this description and test and code when f13b894 was not yet merged in the tree. To reproduce, you would have to revert to a state earlier than that. with the change above the behavior changed slightly. I still think we shouldn't error out on --output pointing to an existing directory and with this change it will just create an image wihtin the directory, which is a sensible behavior imho.

It is more of a new feature then though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants