Skip to content

Remove obsolete OpenVZ and VServer support#2010

Open
BenBE wants to merge 2 commits into
htop-dev:mainfrom
BenBE:remove-openvz
Open

Remove obsolete OpenVZ and VServer support#2010
BenBE wants to merge 2 commits into
htop-dev:mainfrom
BenBE:remove-openvz

Conversation

@BenBE

@BenBE BenBE commented May 25, 2026

Copy link
Copy Markdown
Member

This PR fully removes all of the OpenVZ and Linux VServer legacy that has been dormant and unused for the past few years.

The code has been disabled by default for several releases now and has not been in use for quite some time.

Assisted-By: Claude Haiku 4.5

@BenBE BenBE added this to the 3.6.0 milestone May 25, 2026
@BenBE BenBE requested review from cgzones, fasterit and natoscott May 25, 2026 18:28
@BenBE BenBE added documentation 📖 Improvements or additions to documentation code quality ♻️ Code quality enhancement needs-discussion 🤔 Changes need to be discussed and require consent build system 🔧 Affects the build system rather then the user experience default change Changes a default setting or default UI object Linux 🐧 Linux related issues labels May 25, 2026
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7d893728-e14d-46ba-bb64-6b1ace2040c9

📥 Commits

Reviewing files that changed from the base of the PR and between 3f21e00 and af32242.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Removal of OpenVZ and VServer support

This PR removes dormant OpenVZ and legacy Linux VServer support across configuration, CI, docs, and Linux runtime code. The removed code targeted ancient kernel‑patch–based virtualization and has been unused for years.

Key changes

  • Build & CI
    • Removed configure options: --enable-openvz, --enable-vserver, --enable-ancient-vserver (configure.ac).
    • Dropped those flags from CI and analysis configure/DISTCHECK_CONFIGURE_FLAGS ( .github/workflows/ci.yml, .github/workflows/codeql-analysis.yml).
    • Removed -DHAVE_OPENVZ from cppcheck invocation (Makefile.am).
  • Source (Linux)
    • Removed CTID/VPID/VXID process fields and their enum entries (linux/ProcessField.h, pcp/ProcessField.h).
    • Deleted conditional OpenVZ/VServer members from LinuxProcess; added/reused PROCESS_FLAG_LINUX_CGROUP and retained cgroup/container fields (linux/LinuxProcess.h).
    • Removed formatting, sorting, allocation/freeing, and parsing logic for CTID/VPID/VXID, including LinuxProcessTable_readOpenVZData and VServer /proc status handling (linux/LinuxProcess.c, linux/LinuxProcessTable.c).
  • Docs & man page
    • Removed OpenVZ/VServer build option docs from README.md.
    • Updated man page columns: removed CTID/VPID/VXID entries, added TGID (htop.1.in).

Implementation quality

  • Clean, consistent removals: configure flags, CI, static-analysis invocation, enums, struct members, parsing, rendering, and docs updated in concert.
  • No commented-out cruft; numeric field IDs adjusted where needed.
  • Changes are narrowly scoped to OpenVZ/VServer surface area with no obvious stray references in the modified files.

Commit structure and scope

  • Logical grouping (config/CI/docs vs. runtime/source) — easy to review.
  • Scope is focused and low-risk: removal of obsolete platform-specific functionality.

Notes

  • Comment thread notes Arch packaging still enabling OpenVZ by default; author explains those builds are effectively non-functional with mainline kernels and the removed code targets ancient kernel‑patch virtualization.

Assisted-By: Claude Haiku 4.5

Walkthrough

This PR removes OpenVZ, VServer, and ancient‑VServer support: configure options and AC_DEFINEs were deleted; CI, CodeQL, and DISTCHECK ./configure flags were updated; CTID/VPID/VXID were removed from field enums, struct members, parsing, rendering, sorting, and deletion logic; PROCESS_FLAG_LINUX_CGROUP was added; README and man page adjusted; cppcheck target no longer defines HAVE_OPENVZ.

Poem

OpenVZ leaves the branches bare,
VServer traces fade from air,
Structs shrink, cgroups take their place,
Docs and CI reflect the space,
TGID stands in, the view is clear.


Comment @coderabbitai help to get the list of available commands and usage tips.

@foxpy

foxpy commented May 25, 2026

Copy link
Copy Markdown

@BenBE

BenBE commented May 25, 2026

Copy link
Copy Markdown
Member Author

AFAIT that's basically Arch's packaging default.

Maybe a quick breakdown:

  • OpenVZ 6 requires a patched 2.6.32 kernel.
  • OpenVZ 7 requires Virtuozzo’s custom kernel.

Given that Arch only ships mainline kernels as far as I'm aware, this means that having these features active on Arch is mostly a no-op.

All the code removed in this PR requires ancient kernel-patch based virtualization stuff, that will simply not work with any recent kernel.

@natoscott natoscott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good - there's a spurious left-over CTID definition in pcp/ProcessField.h (never used) - could you remove that as well before merging? Thanks!

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

57-76: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Set explicit minimal GitHub token permissions

These jobs run with implicit default token permissions. Please set explicit least-privilege permissions (for these build-only jobs, contents: read is typically enough) to avoid over-scoped GITHUB_TOKEN access.

Suggested change
 name: CI

 on: [ push, pull_request ]
+permissions:
+  contents: read

Also applies to: 78-100, 102-121


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b496e1a7-e8d7-4b1e-b23b-96002eefa38f

📥 Commits

Reviewing files that changed from the base of the PR and between f95db09 and 5fe9e47.

📒 Files selected for processing (10)
  • .github/workflows/ci.yml
  • Makefile.am
  • README.md
  • configure.ac
  • htop.1.in
  • linux/LinuxProcess.c
  • linux/LinuxProcess.h
  • linux/LinuxProcessTable.c
  • linux/ProcessField.h
  • pcp/ProcessField.h
💤 Files with no reviewable changes (8)
  • htop.1.in
  • linux/ProcessField.h
  • linux/LinuxProcess.h
  • pcp/ProcessField.h
  • configure.ac
  • linux/LinuxProcess.c
  • linux/LinuxProcessTable.c
  • README.md

Comment thread .github/workflows/ci.yml
Comment thread Makefile.am
This commit fully removes all of the OpenVZ and Linux VServer legacy
that has been dormant and unused for the past few years.

The code has been disabled by default for several releases now and
has not been in use for quite some time.

Assisted-By: Claude Haiku 4.5

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

57-76: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit minimal GitHub token permissions for this workflow.

These jobs still inherit default token permissions because no permissions: block is set. Please declare least-privilege permissions at workflow level (and override per job only when needed).

Proposed hardening patch
 name: CI
 
 on: [ push, pull_request ]
 
+permissions:
+  contents: read
+
 env:
   # Enable format attributes in ncurses headers
   # Enable fortified memory/string handling
   CPPFLAGS: -DGCC_PRINTF -DGCC_SCANF -D_FORTIFY_SOURCE=2

Also applies to: 78-100, 102-121


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0b6a92e6-0021-4a2a-abb5-c7ef1f3b6b56

📥 Commits

Reviewing files that changed from the base of the PR and between 5fe9e47 and 8ee3b0c.

📒 Files selected for processing (10)
  • .github/workflows/ci.yml
  • Makefile.am
  • README.md
  • configure.ac
  • htop.1.in
  • linux/LinuxProcess.c
  • linux/LinuxProcess.h
  • linux/LinuxProcessTable.c
  • linux/ProcessField.h
  • pcp/ProcessField.h
💤 Files with no reviewable changes (8)
  • README.md
  • pcp/ProcessField.h
  • htop.1.in
  • linux/LinuxProcessTable.c
  • linux/LinuxProcess.c
  • linux/ProcessField.h
  • configure.ac
  • linux/LinuxProcess.h

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

Labels

build system 🔧 Affects the build system rather then the user experience code quality ♻️ Code quality enhancement default change Changes a default setting or default UI object documentation 📖 Improvements or additions to documentation Linux 🐧 Linux related issues needs-discussion 🤔 Changes need to be discussed and require consent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants