Skip to content

Autoload the installation profile from the medium root (jsc#PED-16010)#3366

Merged
lslezak merged 2 commits intomasterfrom
load-profile-from-medium
Apr 8, 2026
Merged

Autoload the installation profile from the medium root (jsc#PED-16010)#3366
lslezak merged 2 commits intomasterfrom
load-profile-from-medium

Conversation

@lslezak
Copy link
Copy Markdown
Contributor

@lslezak lslezak commented Apr 7, 2026

Problem

  • When manually injecting an autoinstallatino profile into the installation medium it is not used automatically. Agama should support autoloading the profile from this location.

Solution

  • Autoload the installation profile from the medium root
  • Use journal logging with more details in the autoinstallation CLI tool (log to stdout when running manually)
  • Not finding any profile in the predefined locations is not reported as an error
  • I refactored the code to share the part for initializing the logger

Testing

  • Tested manually
  • You can inject an installation profile using this command:
    xorriso -indev agama.iso -outdev agama-auto.iso -boot_image any replay -map profile.json /autoinst.json
    
    Where agama.iso is the input ISO, agama-auto.iso is the new modified ISO and the profile.json is the autoinstallation profile copied to the /autoinst.json location in the new ISO.

Screenshots

When running the autoinstallation manually from the terminal the log is printed on the console. When running from the systemd service the logging is redirected to the journal.

The example journal output below contains two service runs, the initial one with the original client, the second one is started after patching the client with this pull request. The new log contains more details (source code locations) and can distinguish between info, warnings and errors (not shown in this case).

agama-autoinst-logging

Notes

If we want to have a less verbose output on CLI we could modify the logger to be quiet when the output goes to the terminal and add --verbose option to have it verbose always. But I think it is OK to have those details by default, it will be useful for debugging later.

- Use journal logging with more details in the autoinstallation
  CLI tool (log to stdout when running manually)
Copy link
Copy Markdown
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, it looks good. But, please, move the logging module to agama-utils. The idea is to phase out the agama-lib at some point.

@lslezak lslezak merged commit 98015b7 into master Apr 8, 2026
28 of 38 checks passed
@lslezak lslezak deleted the load-profile-from-medium branch April 8, 2026 13:58
lslezak added a commit that referenced this pull request Apr 14, 2026
#3385)

## Problem

- The https://jira.suse.com/browse/PED-16010 is requested also for 16.0

## Solution

- Backport #3366 to SLE-16.0
- Only the list of predefined places has been updated, the logging was
not changed to have a minimal patch for 16.0

## Testing

- Tested manually with a patched ISO image

```console
# journalctl -u agama-autoinstall.service
Apr 14 16:30:30 agama systemd[1]: Started Agama automatic profile runner.
Apr 14 16:30:30 agama agama-autoinstall[5443]: Could not load the configuration from label://OEMDRV/autoinst.jsonnet
Apr 14 16:30:30 agama agama-autoinstall[5443]: Could not load the configuration from label://OEMDRV/autoinst.json
Apr 14 16:30:33 agama agama-autoinstall[5443]: Could not load the configuration from label://OEMDRV/autoinst.xml
Apr 14 16:30:33 agama agama-autoinstall[5443]: Could not load the configuration from file:///run/initramfs/live/autoinst.jsonnet
Apr 14 16:30:42 agama agama-autoinstall[5443]: Configuration loaded from file:///run/initramfs/live/autoinst.json
Apr 14 16:30:42 agama agama-autoinstall[5443]: Skipping the auto-installation on user's request (inst.install=0)
Apr 14 16:30:42 agama systemd[1]: agama-autoinstall.service: Deactivated successfully.
Apr 14 16:30:42 agama systemd[1]: agama-autoinstall.service: Consumed 1.125s CPU time, 18.2M memory peak.
```

The `/autoinst.json` from the ISO was found and successfully loaded.

## Notes

- The openAPI CI job fails as it uses the old Ubuntu based definition
which does not work anymore, just ignore the failure. Later we should
update the CI definitions.
@imobachgs imobachgs mentioned this pull request Apr 14, 2026
imobachgs added a commit that referenced this pull request Apr 14, 2026
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