Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt rust storage client #748

Merged
merged 10 commits into from
Sep 19, 2023

Conversation

joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Sep 12, 2023

Problem

The target disk for installation (boot device) is not selected when loading a profile:

# agama config load /path/to/profile.json

See #745.

Solution

The Agama CLI was adapted to support the new storage settings (#738). Now the profile can contain bootDevice, lvm and encryptionPassword options in the storage section:

storage: {
  bootDevice: "/dev/vda",
  lvm: true,
  encryptionPassword: "123456"
}

Note: The behavior of the Manager service was mofidied to avoid some issues after selecting a new product. Now on, clients have to explicitly call to Manager#Probe.

Testing

  • Tested manually

@coveralls
Copy link

coveralls commented Sep 19, 2023

Coverage Status

coverage: 72.609% (-0.04%) from 72.653% when pulling 9a760f6 on joseivanlopez:adapt-rust-storage into 7d0b821 on openSUSE:master.

- Bonus: make lvm and encryption password configurable.
- Manager service was automatically probing when the product changed
  signal was emitted.
- But the selection of a new product should be as atomic as possible.
  Otherwise, other services (e.g., storage) could start dispatching
  actions before Manager starts the probing.
- And it is not easy for clients to know when Manager has finished
  with all the actions for configuring the new selected product.
- Now, after selecting a product, Manager does not probed anymore.
  Clients have to explicitly request a probe action in order to
  configure everything according to the new selected product (i.e.,
  storage and software config).
@joseivanlopez joseivanlopez marked this pull request as ready for review September 19, 2023 11:30
Copy link
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.

LGTM. Just a minor typo. Thanks!

rust/agama-lib/share/profile.schema.json Outdated Show resolved Hide resolved
@joseivanlopez joseivanlopez merged commit 2d42842 into agama-project:master Sep 19, 2023
7 checks passed
This was referenced Sep 26, 2023
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