Skip to content

Conversation

@mvidner
Copy link
Contributor

@mvidner mvidner commented Nov 21, 2025

Problem

In api-v2, agama-web-server crashes at startup with

Error: I/O error

(tested via /testing_using_container.sh)

Cc @ancorgs @jreidinger

Solution

  • install the files it is looking for (But are they the right files? The dir content looks patchy!)
  • Improve the error message
    • by using fs-err, a NEAT library that provides filenames to ALL such errors (once we use it)

Error: I/O error: failed to read directory /usr/share/agama/eula: No such file or directory (os error 2)

Testing

  • Tested manually
  • There already were unit tests for this, using the files directly from the git tree. Unit but not integration.

Screenshots

No

Documentation

Not crashing is expected

Fix it by installing some EULA files

In SLE-16 they are also missing but we only get a log error:

agama-web-server[21355]: Could not read the licenses repository: Os { code: 2, kind: NotFound, message: "No such file or directory" }
@mvidner mvidner changed the base branch from master to api-v2 November 21, 2025 08:28
@mvidner mvidner force-pushed the fix-opaque-io-error-install-eulas branch 2 times, most recently from 21114ac to 993bcea Compare November 21, 2025 08:33
@jreidinger
Copy link
Contributor

@imobachgs even better solution than what we discussed

@mvidner please fix also

#[error("I/O error")]

Before:
> Error: I/O error

After:
> Error: I/O error: No such file or directory (os error 2)

OK, we need another fix to make it useful, fs_err in an upcoming commit
Before:
> Error: I/O error: No such file or directory (os error 2)

After:
> Error: I/O error: failed to read directory `/usr/share/agama/eula`: No such file or directory (os error 2)
@mvidner mvidner force-pushed the fix-opaque-io-error-install-eulas branch from 993bcea to b360083 Compare November 21, 2025 08:40
install6 -D -t "${DESTDIR}${unitdir}" "${SRCDIR}"/share/agama-web-server.service

# instal licenses
install6 -D -t "${DESTDIR}${datadir}"/agama/eula/license.final "${SRCDIR}"/share/eula/license.final/*
Copy link
Contributor Author

@mvidner mvidner Nov 21, 2025

Choose a reason for hiding this comment

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

This does look a bit suspicious, more like testing data than the real thing, but we can improve upon that while we have a not-crashing agama-web-server.

$ ls /usr/share/agama/eula/license.final/
license.es.txt  license.txt  license.zh_CN.txt

@mvidner
Copy link
Contributor Author

mvidner commented Nov 24, 2025

@imobachgs says that in the past we had a problem with error messages appearing twice in the error cause chain: #660 , that is a thing to keep an eye out for

But in this case I saw the actual messages in journalctl output, the {0} is needed here.

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.

3 participants