Skip to content

fix(rust): do not freeze when trying to use profiles in OEMDRV#2259

Merged
imobachgs merged 4 commits intomasterfrom
unblock-autoyast-call
Apr 11, 2025
Merged

fix(rust): do not freeze when trying to use profiles in OEMDRV#2259
imobachgs merged 4 commits intomasterfrom
unblock-autoyast-call

Conversation

@imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Apr 10, 2025

Problem

The agama-auto service does not work after introducing some changes to make it possible to use the agama profile command from an remote system (see #2103). The call to the POST /api/profile/autoyast endpoint freezes the whole server.

Solution

  • Make the code that takes care of importing the AutoYaST profile async (AutoyastImporter::read).
  • Temporarily disable AutoYaST fetch errors because now they are not properly handled in the OEMDRV feature (it does not pass the YAST_SKIP_PROFILE_FETCH_ERROR env-var). Consider this a temporary workaround to have a working development image again.

@mvidner
Copy link
Contributor

mvidner commented Apr 11, 2025

OK, this means that my testing was not sufficient in #2103.
Please describe how you trigger the problem that this fixed by this.
Hopefully we can add a test into profile_itest.rb

@imobachgs imobachgs force-pushed the unblock-autoyast-call branch from c94a535 to c952ada Compare April 11, 2025 06:48
@imobachgs imobachgs force-pushed the unblock-autoyast-call branch from c952ada to 3c376b9 Compare April 11, 2025 06:49
@imobachgs
Copy link
Contributor Author

OK, this means that my testing was not sufficient in #2103. Please describe how you trigger the problem that this fixed by this. Hopefully we can add a test into profile_itest.rb

You need to execute the agama-auto service to detect the problem. In this case, the easiest way is to just build a new image with the updated code. You can use the development scripts to do that.

@imobachgs imobachgs changed the title feat(rust): make AutoyastProfileImporter::read async fix(rust): do not freeze when trying to use profiles in OEMDRV Apr 11, 2025
@imobachgs imobachgs marked this pull request as ready for review April 11, 2025 06:52
Copy link
Contributor

@mvidner mvidner left a comment

Choose a reason for hiding this comment

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

I see. We should convert the environment variable into a CLI switch, but this is good for a quick fix.

And yay for the elegance that async provides!

@imobachgs
Copy link
Contributor Author

I see. We should convert the environment variable into a CLI switch, but this is good for a quick fix.

I agree. Adding a command switch would be a good option.

And yay for the elegance that async provides!

😃

@imobachgs imobachgs merged commit 1887bf4 into master Apr 11, 2025
5 checks passed
@imobachgs imobachgs deleted the unblock-autoyast-call branch April 11, 2025 08:28
@mvidner
Copy link
Contributor

mvidner commented Apr 11, 2025

I see the environment variable was introduced in #2180 (set) and yast/yast-autoinstallation#882 (checked)
Well it is a hacky design... and now I see another thing that has stopped working: export YAST_SKIP_XML_VALIDATION=1. Bypassing API layers like this is error prone when doing any refactoring

@imobachgs imobachgs mentioned this pull request Apr 22, 2025
imobachgs added a commit that referenced this pull request Apr 22, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Apr 23, 2025
https://build.opensuse.org/request/show/1272124
by user IGonzalezSosa + anag_factory
- Version 14

- CLI: wait a bit between selecting the product to install and
  registering it so the Web UI has enough time to process all
  events (gh#agama-project/agama#2274)

- Allow to log in into multiple systems (gh#agama-project/agama#2261).
- Do not interactively ask for accepting insecure connections.

- Report and emit changes to the connections states. (gh#agama-project/agama#2247).
- Do not write wireless security settings when they are not used.

- Add missing help to finish command (gh#agama-project/agama#2272).

- Replace --api option by --host (gh#agama-project/agama#2271).

- Prevent agama-web-server from getting stuck in the POST
  /api/profile/autoyast calls (gh#agama-project/agama#2259).
- Temporarily disable AutoYaST profiles fetch errors.

- Allow to specify extra ker
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