Skip to content

Commit

Permalink
Activate multipath in case of forced by the user and fix environment …
Browse files Browse the repository at this point in the history
…file typo (#1875)

## Problem

- The agama service have a typo in the EnvironmentFile variable name.
- Agama is not checking if the user is forcing multipath through a
environment variable.

## Solution

Fix the typo and check if multipath is forced.


## Testing

- *Tested manually*
  • Loading branch information
teclator authored Jan 9, 2025
2 parents d4771bd + bd44ee7 commit ba3f8dd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
root = true

# 2 space indentation
[{*.sh}]
[*.sh]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion rust/share/agama-web-server.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=network-online.target agama.service agama-hostname.service
BindsTo=agama.service

[Service]
EnvironmentFile=-"/etc/agama.d/cmdline.conf"
EnvironmentFile=-/etc/agama.d/cmdline.conf
Environment="AGAMA_LOG=debug,zbus=info"
Type=notify
ExecStart=/usr/bin/agama-web-server serve --address :::80 --address2 :::443
Expand Down
2 changes: 2 additions & 0 deletions service/lib/agama/storage/callbacks/activate_multipath.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# find current contact information at www.suse.com.

require "agama/question"
require "y2storage"

module Agama
module Storage
Expand All @@ -42,6 +43,7 @@ def initialize(questions_client, logger)
# @param looks_like_real_multipath [Boolean] see {Callbacks::Activate#multipath}.
# @return [Boolean]
def call(looks_like_real_multipath)
return true if Y2Storage::StorageEnv.instance.forced_multipath?
return false unless looks_like_real_multipath

questions_client.ask(question) do |question_client|
Expand Down
6 changes: 6 additions & 0 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 9 12:21:40 UTC 2025 - Knut Anderssen <[email protected]>

- Activate multipath in case it is forced by the user
(gh#agama-project/agama#1875).

-------------------------------------------------------------------
Wed Jan 8 14:05:53 UTC 2025 - Imobach Gonzalez Sosa <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion service/share/agama.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After=network-online.target
[Service]
Type=forking
ExecStart=/usr/bin/agamactl --daemon
EnviromentFile=-/etc/agama.d/cmdline.conf
EnvironmentFile=-/etc/agama.d/cmdline.conf
PIDFile=/run/agama/bus.pid
User=root
TimeoutStopSec=5
Expand Down

0 comments on commit ba3f8dd

Please sign in to comment.