Skip to content

executor: return error message from the journal - #134

Open
alicefr wants to merge 1 commit into
bootc-dev:mainfrom
alicefr:fix-133
Open

executor: return error message from the journal#134
alicefr wants to merge 1 commit into
bootc-dev:mainfrom
alicefr:fix-133

Conversation

@alicefr

@alicefr alicefr commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Previously, the output of the systemd unit was only reported in bootc operator. Now, it is returned as part of the error when bootc switch fails.

The output of the systemd unit might be quite verbose, but it doesn't filter any information to avoid any precious information loss.

Fixes: #133

@alicefr

alicefr commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

@HarshwardhanPatil07 PTAL

Comment thread internal/bootc/executor.go
@HarshwardhanPatil07

Copy link
Copy Markdown
Collaborator

@alicefr I am not sure if we will have this issue of cap size in bootc-operator.

@alicefr

alicefr commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

@alicefr I am not sure if we will have this issue of cap size in bootc-operator.

Yeah, it is a good point. But I'm afraid that we will cut the important output. Alternatively, we can filter the lines that starts with error:. Currently, the message looks like:

    - lastTransitionTime: "2026-08-10T13:45:11Z"
      message: |-
        bootc stage failed: running bootc switch: Started bootc-operator-switch.service - [systemd-run] /usr/bin/bootc switch ghcr.io/bootc-dev/bink/node@sha256:9ce7d6d15b8558c226b4c41f3b27bf1722897b0c8a66c7a84a2877bca8d049f7.
        Switching from image ghcr.io/bootc-dev/bink/node:v1.35-fedora-44 to ghcr.io/bootc-dev/bink/node@sha256:9ce7d6d15b8558c226b4c41f3b27bf1722897b0c8a66c7a84a2877bca8d049f7
        Fetching ostree-unverified-registry:ghcr.io/bootc-dev/bink/node@sha256:9ce7d6d15b8558c226b4c41f3b27bf1722897b0c8a66c7a84a2877bca8d049f7
        error: Switching: Switching (ostree): Preparing import: Fetching manifest: Target image does not have ostree.bootable label
        bootc-operator-switch.service: Main process exited, code=exited, status=1/FAILURE
        bootc-operator-switch.service: Failed with result 'exit-code'.
        bootc-operator-switch.service: Consumed 210ms CPU time over 1.111s wall clock time, 155.2M memory peak.: exit status 1

@HarshwardhanPatil07 HarshwardhanPatil07 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Valid! thank you very much.. just learning

@HarshwardhanPatil07

Copy link
Copy Markdown
Collaborator

filter sounds good too

@alicefr

alicefr commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

@HarshwardhanPatil07 let's add the filter before merging this

Previously, the output of the systemd unit was only reported in bootc
operator. Now, it is returned as part of the error when bootc switch
fails.

The output for the systemd unit is quite verbose, so we filter for the
lines containing the errors tag. The full output will be reduced from:
        bootc stage failed: running bootc switch: Started bootc-operator-switch.service - [systemd-run] /usr/bin/bootc switch ghcr.io/bootc-dev/bink/node@sha256:9ce7d6d15b8558c226b4c41f3b27bf1722897b0c8a66c7a84a2877bca8d049f7.
        Switching from image ghcr.io/bootc-dev/bink/node:v1.35-fedora-44 to ghcr.io/bootc-dev/bink/node@sha256:9ce7d6d15b8558c226b4c41f3b27bf1722897b0c8a66c7a84a2877bca8d049f7
        Fetching ostree-unverified-registry:ghcr.io/bootc-dev/bink/node@sha256:9ce7d6d15b8558c226b4c41f3b27bf1722897b0c8a66c7a84a2877bca8d049f7
        error: Switching: Switching (ostree): Preparing import: Fetching manifest: Target image does not have ostree.bootable label
        bootc-operator-switch.service: Main process exited, code=exited, status=1/FAILURE
        bootc-operator-switch.service: Failed with result 'exit-code'.
        bootc-operator-switch.service: Consumed 210ms CPU time over 1.111s wall clock time, 155.2M memory peak.: exit status 1
to

      'bootc stage failed: running bootc switch: error: Switching: Switching
        (ostree): Preparing import: Fetching manifest: Target image does not have
        ostree.bootable label: exit status 1'

The full message in any case is present in the bootc daemon logs.

Assisted-by: AI
Signed-off-by: Alice Frosi <afrosi@redhat.com>
@alicefr

alicefr commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

With the filter the message looks like:

    - lastTransitionTime: "2026-08-11T08:01:46Z"
      message: 'bootc stage failed: running bootc switch: error: Switching: Switching
        (ostree): Preparing import: Fetching manifest: Target image does not have
        ostree.bootable label: exit status 1'

@alicefr

alicefr commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

Currently the CI is broken

@HarshwardhanPatil07

Copy link
Copy Markdown
Collaborator

Thank you!

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.

Bootc error not fully reported

2 participants