Skip to content

Unattended installation reboots automatically after finish the installation (#1940)#1970

Merged
teclator merged 27 commits intomasterfrom
reboot
Feb 19, 2025
Merged

Unattended installation reboots automatically after finish the installation (#1940)#1970
teclator merged 27 commits intomasterfrom
reboot

Conversation

@teclator
Copy link
Contributor

@teclator teclator commented Feb 4, 2025

Problem

After an unattended installation the user needs to reboot manually which is not very unattended... it should do it automatically unless the user wanted to stop in the congrats screen explicitly

Solution - Part1

  • Agama reboot command added. Only does something if Agama is in a final state
suse@vikingo-laptop:~$ sudo agama reboot
Cannot reboot the system
Anyhow(The installation has not finished correctly)
  • Unattended installation try to reboot the system when finished installing.
## AGAMA AUTO calls
  /usr/bin/agama profile import "$url"
  /usr/bin/agama install
  /usr/bin/agama reboot

Solution - Part2

Added the agama.finish kernel cmdline argument allowing to stop in the congrats screen only honored by the unattended installation

By default it will reboot the system unless the stop value is given, maybe would be nice to modify the agama reboot call by agama finish method where method could be reboot|stop|halt|poweroff, what do you think?

Testing

  • Tested manually

@teclator teclator force-pushed the reboot branch 3 times, most recently from 389ef8a to bc95a17 Compare February 5, 2025 13:12
@teclator teclator marked this pull request as ready for review February 5, 2025 13:13
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.

In general, it looks good. Just some minor things.

@coveralls
Copy link

coveralls commented Feb 10, 2025

Pull Request Test Coverage Report for Build 13411386950

Details

  • 6 of 36 (16.67%) changed or added relevant lines in 5 files are covered.
  • 11 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.05%) to 70.736%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/lib/agama/dbus/manager.rb 2 3 66.67%
rust/agama-server/src/manager/web.rs 0 5 0.0%
rust/agama-lib/src/manager.rs 0 6 0.0%
service/lib/agama/manager.rb 4 10 40.0%
rust/agama-cli/src/lib.rs 0 12 0.0%
Files with Coverage Reduction New Missed Lines %
rust/agama-cli/src/lib.rs 1 0.0%
service/lib/agama/dbus/manager.rb 5 91.25%
service/lib/agama/manager.rb 5 81.89%
Totals Coverage Status
Change from base Build 13409612956: -0.05%
Covered Lines: 17723
Relevant Lines: 25055

💛 - Coveralls

@teclator teclator changed the title Reboot Unattended installation reboots automatically after finish the installation (#1940) Feb 13, 2025
@teclator teclator force-pushed the reboot branch 3 times, most recently from 67bdf19 to e333e1c Compare February 17, 2025 16:31
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.

The approach looks but I would avoid using optional arguments unless required.

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.

It looks good. However, there is a conflict in the changes file and the generation of the OpenAPI docs is not working. Please, check.

@teclator teclator force-pushed the reboot branch 2 times, most recently from 0515f47 to ecd3c03 Compare February 18, 2025 18:18
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.

Just some small documentation issues. Nothing critical.

Thanks!

# Whatever has to be done at the end of installation
def finish_installation
#
# @param method [String, nil]
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to document the possible values.

@teclator teclator force-pushed the reboot branch 2 times, most recently from 051733e to a90da68 Compare February 19, 2025 08:53
@teclator teclator merged commit 0deb38d into master Feb 19, 2025
9 checks passed
@teclator teclator deleted the reboot branch February 19, 2025 11:37
@imobachgs imobachgs mentioned this pull request Feb 26, 2025
imobachgs added a commit that referenced this pull request Feb 26, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Feb 26, 2025
https://build.opensuse.org/request/show/1248595
by user IGonzalezSosa + dimstar_suse
- Version 12

- Add the missing shebang line to the agama-scripts.sh shell script
  (gh#agama-project/agama#2077).
- Save logs after running post installation scripts
  (gh#agama-project/agama#2078).

- Keep the encoding when storing the locale (gh#agama-project/agama#2062).

- Extend storage model schema to support global encryption
  (gh#agama-project/agama#2031).

- Introduce the storage model to support the new storage user
  interface (gh#agama-project/agama#2033)

- Expose root and first user passwords (gh#agama-project/agama#2005).
- Remove support for auto-login.

- Added reboot command to the CLI (gh#agama-project/agama#1970)

- Set console and X11 keymaps when changing the installer keymap
  (bsc#1236174).
- Use the "dashed" form of the keymap identifier when calling
  systemd-firstboo
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.

4 participants