Skip to content

fix(e2e): remove the classifier install a names case's setup script makes - #2159

Closed
norrietaylor wants to merge 1 commit into
mainfrom
fix/e2e-classifier-residue
Closed

norrietaylor wants to merge 1 commit into
mainfrom
fix/e2e-classifier-residue

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Root cause

main has been red on CI (Linux native) / native-daemon-e2e since #2144 merged (a7118306b); run 38025514203 fails in proof_host_ip_deny_all:

::error::a CI native lane must be able to load the classifier table: this host already carries a classifier install (the tree at /sys/fs/cgroup/minimald.slice or the table inet minimal_class), and this case replaces no host's own

From that job's log: the native names case prints min finalize-install --show --script named the setup script (1173 lines) and then ran the advisory's command. Before #2144 that script carried the names block only; it now also carries the classifier block (the embedded step, hence the line count), because on a runner with no classifier the item reads missing. The case runs the script whole under one sudo, which is its claim, so it installs the tree, the table, the root-owned copy, the ownership record and the three systemd units. It then reverts only what it knew about (the routing domain, the link, the answerer service). The next case's --show --script is 13 lines, which confirms the classifier item read done from then on, and a later activate prints the classifier's "effect could not be read" note. The two classifier proofs later in the lane install their own tree and table and refuse a host that already carries one, so the first of them fails.

Fix

scripts/session-e2e.sh only. The three native cases that run the setup script as root (proof_native_resolution_without_proxy_env, proof_box_name_resolves_natively_without_proxy, proof_native_answerer_survives_session_stop) now remove the classifier install their script made before they return, beside the answerer-service removal they already do:

  • setup_classifier_note <script> runs just before the sudo -n sh. It sets SETUP_CLASSIFIER_INSTALLED only when the script carries the classifier block (its ownership-record line) and the host has neither the tree nor the record. A host that already carries a classifier is the host's own and is never removed.
  • setup_classifier_teardown stops the daemon (the path unit placed it in the tree's daemon leaf, and the uninstall refuses while a process holds the tree), disables minimald-place.path, minimald-place.service and minimald-classifier.service so no later daemon start in the lane is placed and nothing re-installs at boot, runs the step's own --uninstall (retried over a bounded wait for a box leaf that outlives the stop), then removes the unit files, the copy and the record. Each case fails if the tree is still there afterwards; the global teardown calls it best-effort for a run that died first.

Why this and not the alternatives:

  • Running only the names block would drop the cases' claim that they run the exact bytes min finalize-install runs.
  • min finalize-install --undo would also take away the names install and the AppArmor profile mid-lane.
  • The classifier proofs' "replaces no host's own" guard is unchanged.
  • The product is behaving as fix(minimal,sandbox2): ship the classifier step from min finalize-install #2144 intends (the classifier is offered on a native host that lacks it); the lane's cleanup had not caught up.

One product observation from the same log, not addressed here: after the script placed the already-running daemon, an activate reported the classifier table's effect could not be read: the daemon's own control connection or the probe's placement failed, under which deny-all host-address boxes are refused until the daemon restarts. That is worth its own look.

Test plan

  • just lint-shell → 52 script(s) passed shellcheck; bash -n scripts/session-e2e.sh clean.
  • The proof is this PR's own native-daemon-e2e job: green at edd82b8e9 in run 38026886894. Its log shows both names cases printing a 1173-line setup script (the second one finds the host without a classifier again, where the red run printed 13 lines), and the deny-all host-address proof running its decided half instead of refusing the host.

…akes

Since the classifier item ships in min finalize-install, the script the
native names cases run whole also installs the tree, the table, the step's
copy and its units on a host with none. The lane's two classifier proofs
install their own and refuse a host that already carries one, so the lane
went red. Each case now removes what its script installed before it
returns, and the teardown does for a run that died first; a host that
already carried a classifier is left alone.
@norrietaylor
norrietaylor requested a review from a team as a code owner October 10, 2026 05:15
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 4 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 3 included reviews currently available. Your 43 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 7b7c59d4-0eca-49c1-b5e7-f359283b220c

📥 Commits

Reviewing files that changed from the base of the PR and between a711830 and edd82b8.


📒 Files selected for processing (1)
  • scripts/session-e2e.sh

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@minimal-foundry

Copy link
Copy Markdown
Contributor

Reading edd82b8e9eaf.

This comment updates when the review finishes.

@norrietaylor
norrietaylor deleted the fix/e2e-classifier-residue branch October 12, 2026 05:48
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.

1 participant