kiranchavala opened a new pull request, #14182:
URL: https://github.com/apache/cloudstack/pull/14182

   ### Description
   
   This PR makes `scripts/util/create-kubernetes-binaries-iso.sh` set the ISO 
9660 volume label explicitly instead of relying on the ISO tool's default.
   
   The CKS nodes locate the binaries ISO purely by volume label 
(`conf/k8s-control-node.yml`):
   
   ```bash
   output=`blkid -o device -t LABEL=CDROM`
   ```
   
   but the script invoked `mkisofs` with no `-V`, so the volume ID came from 
whichever implementation the build host provides:
   
   | `mkisofs` provided by | Default volume ID |
   |---|---|
   | genisoimage / cdrkit (Debian, Ubuntu) | `CDROM` |
   | xorriso mkisofs compatibility mode (EL8+) | `ISOIMAGE` |
   
   `genisoimage` has not been available since EL8, where `mkisofs` is provided 
by `xorriso`. An ISO built on EL8/EL9/EL10 therefore gets `LABEL="ISOIMAGE"`, 
the nodes never mount it, and they loop on `Waiting for Binaries directory 
/mnt/k8sdisk/ to be available` until the offline install times out.
   
   It then logs `Warning: Offline install timed out!` and falls through to 
installing binaries and images from the Internet, so the pinned ISO contents 
are silently ignored (and in an air-gapped zone the cluster never comes up at 
all).
   
   Passing `-V CDROM` makes the output independent of the build host's ISO 
tooling. This is a **no-op where the script already works**, since `CDROM` is 
genisoimage's default — so there is nothing to regress.
   
   Fixes: #14180
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] Build/CI
   - [ ] Test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   
   Reproduced on an Oracle Linux 8 build host (`xorriso 1.4.8`, no 
`genisoimage` available on EL8) building a CKS ISO for Kubernetes 1.36.0.
   
   Before the change, the ISO is built successfully but carries the wrong label:
   
   ```
   $ blkid /var/www/html/cks-v1.36.0-x86_64.iso
   /var/www/html/cks-v1.36.0-x86_64.iso: BLOCK_SIZE="2048" \
     UUID="2026-09-15-12-23-30-00" LABEL="ISOIMAGE" TYPE="iso9660"
   ```
   
   and the control node never finds it:
   
   ```
   Waiting for Binaries directory /mnt/k8sdisk/ to be available, sleeping for 
15 seconds, attempt: 27
   ```
   
   On the node, `blkid -o device -t LABEL=CDROM` returns nothing while `lsblk` 
shows the CD-ROM present with `LABEL=ISOIMAGE`, confirming the label is the 
only thing preventing the mount. A correctly labelled ISO mounts normally on 
the same environment (`Installing binaries from ...` after a few attempts).
   
   The labelling difference itself reproduces on any host without CloudStack:
   
   ```bash
   mkdir -p /tmp/vt && echo x > /tmp/vt/f
   mkisofs -o /tmp/a.iso -J -R -l /tmp/vt 2>/dev/null
   blkid /tmp/a.iso
   ```
   
   `LABEL="CDROM"` on Debian/Ubuntu, `LABEL="ISOIMAGE"` on EL8+.
   
   #### How did you try to break this feature and the system with this change?
   
   - Verified `-V CDROM` is a no-op on a host with real genisoimage (Ubuntu 
24.04, where `/usr/bin/mkisofs` is owned by the `genisoimage` package): ISOs 
built with and without the flag both report `LABEL="CDROM"`, so existing build 
hosts are unaffected.
   - Confirmed `-V` has identical semantics in genisoimage and in xorriso's 
mkisofs compatibility mode, so the flag cannot fail on either implementation.
   - Checked that no other consumer depends on the previous label: `blkid ... 
-t LABEL=CDROM` in `conf/k8s-control-node.yml` is the only place the label is 
matched.
   
   ### Notes for reviewers
   
   - `scripts/util/cks/create-kubernetes-binaries-iso-with-cilium.sh` added by 
#12619 contains the same `mkisofs` invocation and will inherit this defect; it 
would be worth adding `-V CDROM` there before that PR merges.
   - Separately, it may be worth making the node-side detection less brittle. 
`conf/k8s-control-node.yml` already mounts each candidate device and checks for 
the binaries directory before accepting it, so it could iterate over all 
ISO9660 devices rather than filtering on the label first. Not done here to keep 
this change minimal.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to