Skip to content

Remove unused initramfs handler - #969

Open
zjncs wants to merge 1 commit into
dev-sec:masterfrom
zjncs:cleanup/remove-unused-initramfs-handler
Open

Remove unused initramfs handler#969
zjncs wants to merge 1 commit into
dev-sec:masterfrom
zjncs:cleanup/remove-unused-initramfs-handler

Conversation

@zjncs

@zjncs zjncs commented Sep 4, 2026

Copy link
Copy Markdown

Description

Fixes #911

The task that notified the Update-initramfs handler was removed in #591, but the handler itself was left in roles/os_hardening/handlers/main.yml, making it unreachable dead code.

Cause

PR #591 dropped the update-initramfs task without removing its handler, so roles/os_hardening/handlers/main.yml kept a handler that nothing can notify anymore.

Changes

  • Remove the unreachable Update-initramfs handler from roles/os_hardening/handlers/main.yml (3 lines, no functional change).

Verification

  • Base SHA: 3102edd (current master at the time of the change; still the tip of master).
  • grep -rn "initramfs" roles/ confirms no remaining task, handler or template references (only historical CHANGELOG entries).
  • Checked that no other role or playbook notifies Update-initramfs.
  • Full repo lint (molecule/galaxy) was not run locally because the sandbox cannot reach Ansible Galaxy; the change is a pure deletion of dead YAML with no module or argument changes.

Risk

Minimal: deleting an unreachable handler cannot change runtime behavior. CI on this PR will run the collection's own lint and molecule checks.

AI assistance disclosure

This patch was prepared by an autonomous AI coding agent at the direction of the account owner, following the repository's contributor guideline (fork, branch, minimal change, DCO sign-off).

The task that notified Update-initramfs was removed in dev-sec#591, leaving the
handler unreachable. Remove the dead handler to keep the role definition
aligned with its execution paths.

Fixes dev-sec#911

Signed-off-by: zjncs <18910855655@163.com>
@zjncs
zjncs marked this pull request as ready for review September 4, 2026 12:13
Copilot AI lite review requested due to automatic review settings September 4, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zjncs

zjncs commented Sep 5, 2026

Copy link
Copy Markdown
Author

The 14 failing build (...) matrix jobs are infrastructure failures, not caused by this change.

Evidence: the failed jobs die while installing collection dependencies from galaxy.ansible.com, before any role task runs, e.g. from the build (rocky10) log:

[ERROR]: Failed to download collection tar from 'default' due to the following unforeseen error: The read operation timed out
ansible_compat.errors.InvalidPrerequisiteError: Command ansible-galaxy collection install -vvv community.mysql:>=1.3.0, returned 1 code
CRITICAL 'molecule/default/molecule.yml' glob failed. Exiting.

The same galaxy download timeouts also hit the master branch itself recently (devsec.os_hardening failure on 2026-09-02, devsec.ssh_hardening VM failure on 2026-09-04), so the failures are repo-wide and unrelated to removing the unreachable Update-initramfs handler.

The 22 jobs that did complete (including all os_hardening-related ones that exercise this role) are green. Happy to see a re-run once galaxy is responsive again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[os_hardening] Rebuild initramfs is removed but handler still present

2 participants