Skip to content

[release-4.22] revert disk size to 31G and add workaround for download pods disk usuage.#1247

Open
praveenkumar wants to merge 2 commits into
crc-org:release-4.22from
praveenkumar:fix_disk_size_4.22
Open

[release-4.22] revert disk size to 31G and add workaround for download pods disk usuage.#1247
praveenkumar wants to merge 2 commits into
crc-org:release-4.22from
praveenkumar:fix_disk_size_4.22

Conversation

@praveenkumar

@praveenkumar praveenkumar commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability of the system’s transient read-only startup sequence by adjusting how mount options are applied during the user-mount service.
  • Configuration
    • Changed the default virtual machine disk size to 31 (from 43) when no disk size is provided via environment settings.

@openshift-ci openshift-ci Bot requested review from anjannath and cfergeau June 16, 2026 02:51
@openshift-ci

openshift-ci Bot commented Jun 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cfergeau for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

snc.sh lowers the default VM disk size from 43 to 31, and 99-enable-transient-ro.yaml updates the create-users-mount.service ExecStart command to disable mount option sourcing while remounting / and linking /Users to var/Users.

Changes

snc.sh and transient-ro mount update

Layer / File(s) Summary
CRC VM disk size default change
snc.sh
CRC_VM_DISK_SIZE default changed from 43 to 31.
Mount command options update
99-enable-transient-ro.yaml
create-users-mount.service ExecStart now includes unshare -m --options-source=disable before the remount and /Users symlink steps.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

  • crc-org/snc#1228: Related mount-flow changes in create-users-mount.service for the transient-ro /Users setup.

Suggested labels: lgtm

Suggested reviewers: anjannath

Poem

🐇 I hop where disk sizes gently shrink,
And mount options change in a blink.
/Users points home, neat as can be,
A tiny tweak for the shell-script tree.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: reverting the disk size to 31G and adding a disk-usage workaround.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

🧹 Nitpick comments (1)
snc.sh (1)

218-221: ⚡ Quick win

Consolidate the duplicated downloads-pod workaround into a helper.

Line 218 and Line 280 repeat the same delete+wait sequence; extracting a small function avoids drift when this workaround is updated later.

♻️ Proposed refactor
+# Workaround for OCPBUGS-88450
+restart_console_downloads_pods() {
+    retry ${OC} delete pod -n openshift-console -l app=console,component=downloads
+    retry ${OC} wait --for=condition=Ready pod -n openshift-console -l app=console,component=downloads --timeout=60s
+}
+
-# Remove the downloads pods because of https://redhat.atlassian.net/browse/OCPBUGS-88450
-# as workaround
-retry ${OC} delete pod -n openshift-console -l app=console,component=downloads
-retry ${OC} wait --for=condition=Ready pod -n openshift-console -l app=console,component=downloads --timeout=60s
+restart_console_downloads_pods
@@
-# Remove the downloads pods because of https://redhat.atlassian.net/browse/OCPBUGS-88450
-# as workaround
-retry ${OC} delete pod -n openshift-console -l app=console,component=downloads
-retry ${OC} wait --for=condition=Ready pod -n openshift-console -l app=console,component=downloads --timeout=60s
+restart_console_downloads_pods

Also applies to: 280-283

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@snc.sh` around lines 218 - 221, The delete and wait operations for the
downloads pods workaround (retry ${OC} delete pod and retry ${OC} wait commands)
are duplicated at lines 218-221 and lines 280-283. Extract this repeated
sequence into a dedicated helper function, then call that function from both
locations to eliminate duplication and ensure any future updates to the
workaround are consistently applied everywhere it is used.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@snc.sh`:
- Around line 218-221: The delete and wait operations for the downloads pods
workaround (retry ${OC} delete pod and retry ${OC} wait commands) are duplicated
at lines 218-221 and lines 280-283. Extract this repeated sequence into a
dedicated helper function, then call that function from both locations to
eliminate duplication and ensure any future updates to the workaround are
consistently applied everywhere it is used.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e6686247-cbae-4f35-9a1d-b60e431d455e

📥 Commits

Reviewing files that changed from the base of the PR and between 64742ce and 33954c8.

📒 Files selected for processing (1)
  • snc.sh

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@99-enable-transient-ro.yaml`:
- Line 44: The ExecStart command in the transient root override uses a mount
option unsupported by this RHCOS/util-linux base, so the remount step will fail
and the symlink setup in the same shell will never happen. Update the command in
the systemd unit to use a remount approach compatible with RHCOS 9.8 and keep
the `/Users` symlink creation tied to the successful remount path. Make sure the
fix is applied in the override that defines ExecStart so the startup behavior is
reliable even when the shell prefix ignores nonzero exit codes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2840fe0b-59fd-41ef-aca3-a0735890e747

📥 Commits

Reviewing files that changed from the base of the PR and between 33954c8 and 52c8272.

📒 Files selected for processing (2)
  • 99-enable-transient-ro.yaml
  • snc.sh

RemainAfterExit=yes
ExecStart=/bin/mkdir -p /var/Users
ExecStart=-/bin/bash -c 'unshare -m -- /bin/sh -c "mount -o remount,rw / && ln -sf var/Users /Users"'
ExecStart=-/bin/bash -c 'unshare -m -- /bin/sh -c "mount --options-source=disable -o remount,rw / && ln -sf var/Users /Users"'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if --options-source is documented in the mount man page on RHCOS
# or search for util-linux version references in the repo
rg -n 'options-source' --type yaml --type sh

Repository: crc-org/snc

Length of output: 149


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- target file context ---'
git ls-files '99-enable-transient-ro.yaml' && {
  nl -ba 99-enable-transient-ro.yaml | sed -n '1,120p'
}

echo '--- repo search: options-source / mount invocations / util-linux references ---'
rg -n --hidden --no-messages -S 'options-source|mount --|util-linux|RHCOS|rhcos' .

Repository: crc-org/snc

Length of output: 245


🏁 Script executed:

#!/bin/bash
set -euo pipefail

if git ls-files --error-unmatch '99-enable-transient-ro.yaml' >/dev/null 2>&1; then
  nl -ba 99-enable-transient-ro.yaml | sed -n '1,120p'
fi

Repository: crc-org/snc

Length of output: 189


🌐 Web query:

util-linux mount --options-source introduced version documentation

💡 Result:

The --options-source command-line option for the mount command in the util-linux package was introduced in version 2.39 [1][2]. This option allows users to specify the source of default mount options. The source parameter accepts a comma-separated list of values: fstab, mtab, and disable [3][4]. Setting it to disable will disable reading from fstab and mtab and enables the --options-source-force behavior [3][5]. The default value for this setting is fstab,mtab [4][6]. This feature was part of a major rewrite of libmount and the mount command to support the new file descriptor-based mount kernel API, which was a primary focus of the 2.39 release [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- target file context ---'
sed -n '35,55p' 99-enable-transient-ro.yaml

echo '--- repo search: rhcos / util-linux version references ---'
rg -n --hidden --no-messages -S 'util-linux|RHCOS|rhcos|version|osVersion|release' . \
  | sed -n '1,200p'

Repository: crc-org/snc

Length of output: 16117


🌐 Web query:

OpenShift 4.22 RHCOS util-linux version RHEL 9

💡 Result:

In OpenShift Container Platform 4.22, Red Hat Enterprise Linux CoreOS (RHCOS) is based on Red Hat Enterprise Linux (RHEL) 9.8 [1][2][3]. The util-linux package version utilized in RHEL 9 (including RHEL 9.8) is 2.37.4 [4][5][6]. As of July 8, 2026, the specific release version of this package commonly associated with current RHEL 9 updates is 2.37.4-25.el9 [5][6].

Citations:


🌐 Web query:

OpenShift 4.22 RHCOS based on RHEL version util-linux

💡 Result:

Red Hat OpenShift Container Platform (OCP) 4.22 uses Red Hat Enterprise Linux CoreOS (RHCOS), which is based on Red Hat Enterprise Linux (RHEL) 9.8 [1][2][3]. As part of this RHEL 9.8 base, it includes the util-linux package versions provided by the RHEL 9.8 repositories [4].

Citations:


mount --options-source=disable is too new for this RHCOS base. OCP 4.22 ships RHCOS 9.8 with util-linux 2.37.4, so this remount will fail and the leading - will hide it; /Users won’t be created.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@99-enable-transient-ro.yaml` at line 44, The ExecStart command in the
transient root override uses a mount option unsupported by this RHCOS/util-linux
base, so the remount step will fail and the symlink setup in the same shell will
never happen. Update the command in the systemd unit to use a remount approach
compatible with RHCOS 9.8 and keep the `/Users` symlink creation tied to the
successful remount path. Make sure the fix is applied in the override that
defines ExecStart so the startup behavior is reliable even when the shell prefix
ignores nonzero exit codes.

@praveenkumar

Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@praveenkumar

Copy link
Copy Markdown
Member Author

/retest

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