-
Notifications
You must be signed in to change notification settings - Fork 232
Package, Dependencies and Config Path Updates to Support Azure Linux 4.0 #4399
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
base: main
Are you sure you want to change the base?
Changes from 7 commits
7017e69
e9e766f
2b9dae1
4519db0
d45422f
dd61b0e
8cc5d89
3138cdc
59ade0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -699,6 +699,18 @@ class Xfstests(Tool): | |
| "psmisc", | ||
| "perl-CPAN", | ||
| ] | ||
| # CBL Mariner 4.0 Dependencies | ||
| mariner_4_dep = [ | ||
| "libattr-devel", | ||
| "binutils", | ||
| "kernel-headers", | ||
| "perl-CPAN", | ||
| "diffutils", | ||
| "btrfs-progs-devel", | ||
| "zlib-ng-compat-devel", | ||
| "libblkid-devel", | ||
| "libmount-devel", | ||
| ] | ||
| # Regular expression for parsing xfstests output | ||
| # Example: | ||
| # Passed all 35 tests | ||
|
|
@@ -941,7 +953,11 @@ def _install_dep(self) -> None: | |
| elif isinstance(self.node.os, Suse): | ||
| package_list.extend(self.suse_dep) | ||
| elif isinstance(self.node.os, CBLMariner): | ||
| package_list.extend(self.mariner_dep) | ||
| if self.node.os.information.version >= "4.0.0": | ||
| package_list.extend(self.fedora_dep) | ||
| package_list.extend(self.mariner_4_dep) | ||
| else: | ||
| package_list.extend(self.mariner_dep) | ||
| else: | ||
| raise LisaException( | ||
| f"Current distro {self.node.os.name} doesn't support xfstests." | ||
|
|
@@ -1067,6 +1083,21 @@ def _install( | |
| file=str(code_path / "src" / "Makefile"), | ||
| ) | ||
|
|
||
| # Temporary Workaround to test xfs in Azurelinux 4.0 | ||
| # DO NOT MERGE | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be a bug (missing symlink in pkg-config package) in 4.0 Alpha image, added a workaround to test xfs. will remove this once upstream gets fixed.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only issue in Alpha1 image. |
||
| if ( | ||
| isinstance(self.node.os, CBLMariner) | ||
| and self.node.os.information.version >= "4.0.0" | ||
| ): | ||
| self.node.execute( | ||
| "ln -sf /usr/bin/pkgconf" | ||
| " /usr/bin/$(rpm --eval" | ||
| " '%{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}')" | ||
| "-pkg-config", | ||
| sudo=True, | ||
| shell=True, | ||
MadhurAggarwal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ) | ||
MadhurAggarwal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
MadhurAggarwal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Regenerate configure script to fix PKG_CHECK_MODULES macro expansion issue. | ||
| # The pre-generated configure script in xfstests-dev git repo may have | ||
| # unexpanded PKG_CHECK_MODULES macros if it was generated without pkg-config. | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2068,7 +2068,7 @@ def name_pattern(cls) -> Pattern[str]: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def __init__(self, node: Any) -> None: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| super().__init__(node) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| self._dnf_tool_name: str | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| self._dnf_tool_name: str = "dnf" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def _initialize_package_installation(self) -> None: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| self.set_kill_user_processes() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2136,9 +2136,15 @@ def _create_local_repo(self, source_tarball: Path) -> None: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| # the SSH session is reset | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def set_kill_user_processes(self) -> None: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sed = self._node.tools[Sed] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Azure Linux 4.0 moved logind.conf to /usr/lib/systemd/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| logind_conf = "/etc/systemd/logind.conf" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not self._node.shell.exists( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| self._node.get_pure_path(logind_conf) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| logind_conf = "/usr/lib/systemd/logind.conf" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+2141
to
+2144
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not self._node.shell.exists( | |
| self._node.get_pure_path(logind_conf) | |
| ): | |
| logind_conf = "/usr/lib/systemd/logind.conf" | |
| shell = self._node.shell | |
| primary_path = self._node.get_pure_path(logind_conf) | |
| if not shell.exists(primary_path): | |
| fallback_logind_conf = "/usr/lib/systemd/logind.conf" | |
| fallback_path = self._node.get_pure_path(fallback_logind_conf) | |
| if shell.exists(fallback_path): | |
| logind_conf = fallback_logind_conf | |
| else: | |
| # Neither primary nor fallback exist; create the primary config file | |
| self._log.debug( | |
| "Neither /etc/systemd/logind.conf nor /usr/lib/systemd/logind.conf " | |
| "exists. Creating /etc/systemd/logind.conf." | |
| ) | |
| self._node.execute( | |
| "mkdir -p /etc/systemd && touch /etc/systemd/logind.conf", | |
| sudo=True, | |
| shell=True, | |
| expected_exit_code=0, | |
| expected_exit_code_failure_message=( | |
| "Failed to create /etc/systemd/logind.conf" | |
| ), | |
| ) |
Copilot
AI
Mar 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editing the vendor config at /usr/lib/systemd/logind.conf is brittle (package updates may overwrite it) and may not be the correct override location for systemd. Prefer writing the setting to /etc/systemd/logind.conf (create it if missing) or a drop-in under /etc/systemd/logind.conf.d/, and keep /usr/lib untouched.
Copilot
AI
Mar 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_kill_user_processes() always uses sed.append(...) and restarts systemd-logind, so repeated calls will keep appending duplicate KillUserProcesses=no lines and repeatedly restart the service (this is also currently invoked from _initialize_package_installation). Making the change idempotent (e.g., replace existing KillUserProcesses= or check if the setting already exists before editing/restarting) would avoid config bloat and unnecessary service churn.
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,11 +33,11 @@ def create(cls, node: "Node", *args: Any, **kwargs: Any) -> Tool: | |||||||
| if isinstance(node.os, CBLMariner): | ||||||||
| if node.os.information.release == "2.0": | ||||||||
| return AzlV2Fips(node, args, kwargs) | ||||||||
| if node.os.information.release == "3.0": | ||||||||
| if node.os.information.release in ("3.0", "4.0"): | ||||||||
| return AzlV3Fips(node, args, kwargs) | ||||||||
|
|
||||||||
| raise UnsupportedDistroException( | ||||||||
| os=node.os, message="FIPS tool only supported on CBLMariner 2.0 and 3.0." | ||||||||
| os=node.os, message="FIPS tool only supported on CBLMariner 2.0, 3.0 and 4.0." | ||||||||
|
||||||||
| os=node.os, message="FIPS tool only supported on CBLMariner 2.0, 3.0 and 4.0." | |
| os=node.os, | |
| message="FIPS tool only supported on CBLMariner 2.0, 3.0 and 4.0.", |
Uh oh!
There was an error while loading. Please reload this page.