[enhancement] verify the runner baseline after provisioning

Open
#955 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go, linux

Research direction

Start with the provisioning flow in the Go code, where a host is reported ready, and see where a final verification step could hook in. The checks touch /etc/fstab, /etc/containers/containers.conf, the runner dns key and the executor containers.conf, so read how the provisioner writes each of them first. Done means a mapt verify command that exits non-zero and names the failing item on a broken host, and prints one line per check on a healthy one.

Written by the indexing model from the issue text.

Description

enhancement provider/IBMCLOUD
Problem

Failures of this kind are silent. mapt reported the instance ready while every CI job failed, and the cause was in the host configuration, not in the job: the DNS order a job container reads, the proxy variables, the data volume and its SELinux type, and the storage path that /etc/fstab produces after a reboot.

Each of these takes seconds to check on the finished host. Nothing checks them now, so the next rebuild repeats the same defect, and the operator finds it from a failed pipeline.

Proposal

Run a verification step at the end of provisioning, and expose it as a command the user can run later (mapt verify ..., or a script left on the host). It asserts at least:

  • the runner service is active and enabled;
  • every DNS source a job container reads lists the internal resolvers before any public one (the runner dns key, /etc/containers/containers.conf, and the executor containers.conf);
  • container storage sits on the data volume, not on the root disk, and carries the expected SELinux type;
  • the /etc/fstab entry for the data volume produces the same container storage path after a reboot as it does now. A wrong mount point passes findmnt --verify and orphans the image store at the next boot;
  • the data volume mount helper contains no mkfs;
  • the container MTU matches the underlay;
  • the proxy variables are present when they were requested, in both cases and with no CIDR in no_proxy;
  • one job-style container starts, resolves a name, and writes to the cache volume.

Exit non-zero with a short report. provision should fail, not warn, when a check fails.

Acceptance
  • A provisioning run on a host with one broken item (for example a wrong fstab target) exits non-zero and names the item.
  • A healthy host exits zero and prints one line per check.
Dominant language
Go
Stars
26
Forks
41
Avg merge
3d 14h
Merged PRs (30d)
27

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redhat-developer/mapt

All issues in redhat-developer/mapt

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.