Skip to content

Back /var/local with tmpfs so the root password never reaches disk - #552

Open
zzzeek wants to merge 1 commit into
openstack-k8s-operators:mainfrom
zzzeek:var-local-tmpfs
Open

zzzeek wants to merge 1 commit into
openstack-k8s-operators:mainfrom
zzzeek:var-local-tmpfs

Conversation

@zzzeek

@zzzeek zzzeek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

mysql_root_auth.sh caches the cluster root password in plaintext at /var/local/my.cnf/mysql_pw_cache.cnf. Commit 68cee7b moved that cache off the PVC, and e2b182e later made /var/local an EmptyDir when kolla's chown went away, which put it back on the node's filesystem.

Set Medium: StorageMediumMemory on the var-local EmptyDir so the cache lives on tmpfs and the plaintext password is never written to any disk. Volume lifetime is unchanged: an EmptyDir is created empty at pod start and discarded when the pod is deleted, on either medium.

SizeLimit bounds the tmpfs against the pod's memory limit; the cache file itself is well under a hundred bytes.

Also assert in the root-auth-cache chainsaw test that /var/local is tmpfs. The suite checked the cache file's existence, format and mode but nothing about its backing store, which is why the move onto disk went unnoticed.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a21f13e5-3cd0-41ab-9cbf-ea71ff3fe0b1
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

@openshift-ci
openshift-ci Bot requested review from abays and dprince September 1, 2026 20:17
@abays

abays commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

/test mariadb-operator-build-deploy-chainsaw

@openshift-ci

openshift-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dciabrin, zzzeek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Nov 5, 2026
mysql_root_auth.sh caches the cluster root password in plaintext at
/var/local/my.cnf/mysql_pw_cache.cnf. Commit 68cee7b moved that cache off
the PVC, and e2b182e later made /var/local an EmptyDir when kolla's chown
went away, which put it back on the node's filesystem.

Set Medium: StorageMediumMemory on the var-local EmptyDir so the cache
lives on tmpfs and the plaintext password is never written to any disk.
Volume lifetime is unchanged: an EmptyDir is created empty at pod start
and discarded when the pod is deleted, on either medium.

SizeLimit bounds the tmpfs against the pod's memory limit; the cache file
itself is well under a hundred bytes.

Also assert in the root-auth-cache chainsaw test that /var/local is
tmpfs. The suite checked the cache file's existence, format and mode but
nothing about its backing store, which is why the move onto disk went
unnoticed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@zzzeek

zzzeek commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

im rebasing this because it needs TargetVersion

@openshift-ci openshift-ci Bot removed the lgtm label Nov 5, 2026
@openshift-ci

openshift-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants