Skip to content

ova: fix Photon 5 distro-sync failure due to alternatives/chkconfig conflict#1989

Merged
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
knabben:photon-5-add-alternatives
May 11, 2026
Merged

ova: fix Photon 5 distro-sync failure due to alternatives/chkconfig conflict#1989
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
knabben:photon-5-add-alternatives

Conversation

@knabben
Copy link
Copy Markdown
Member

@knabben knabben commented Apr 27, 2026

Change description

`iptables-1.8.13-2.ph5` and `ebtables-2.0.11-4.ph5` in the Photon 5 package repository now explicitly require the `alternatives` package (introduced by Broadcom on April 9, 2026 — see iptables.spec).

The Photon 5 minimal ISO includes `chkconfig`, which conflicts with `alternatives` (alternatives is its replacement). Simply adding `alternatives` to the kickstart hangs the Photon installer due to the conflict.

Fix: Install `alternatives --allowerasing` (atomically replacing `chkconfig`) via Ansible before any `tdnf` install or `distro-sync` commands run. Applied in two places:

  1. `roles/setup/tasks/photon.yml` — before `distro-sync` in `firstboot.yml`
  2. `roles/providers/tasks/vmware-photon.yml` — before cloud-init install in `node.yml`, so the fix is present even if `node.yml` is run independently
  • Is this change including a new Provider or a new OS? (y/n) n

Related issues

Additional context

Root cause chain:

  1. Photon 5 minimal ISO installs `chkconfig` as part of the base system
  2. `iptables-1.8.13-2.ph5` (updated April 9 2026) adds `Requires: alternatives`
  3. `alternatives` conflicts with `chkconfig` (it is its replacement); `tdnf` cannot install `alternatives` without removing `chkconfig` first
  4. `tdnf distro-sync --refresh` fails with `Solv general runtime error (1301)` because it cannot upgrade `iptables` without resolving the conflict
  5. Fix: pre-install `alternatives --allowerasing` (replaces `chkconfig`) before `distro-sync` and `tdnf install` calls

Why not the kickstart? Adding `alternatives` to `ks.json.tmpl` causes the Photon minimal ISO installer to hang (the conflict with `chkconfig` is hit during kickstart package resolution, before the OS boots). The Ansible approach avoids this.

Validated with a live vSphere build against a Nimbus testbed — the `distro-sync` step and cloud-init install both complete successfully and the full `photon-5-kube-v1.34.3` OVA is produced.

The upstream fix (vmware/photon#1646) would be to add `Obsoletes: chkconfig` + `Provides: chkconfig` to `alternatives.spec` so `tdnf` handles the transition automatically — making this workaround unnecessary in a future Photon 5 release.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 27, 2026
@knabben
Copy link
Copy Markdown
Member Author

knabben commented Apr 27, 2026

vsphere-iso.vsphere: timeout waiting for IP address in photon job.

/retest

@k8s-triage-robot
Copy link
Copy Markdown

Unknown CLA label state. Rechecking for CLA labels.

Send feedback to sig-contributor-experience at kubernetes/community.

/check-cla
/easycla

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 28, 2026
…onflict

iptables-1.8.13-2.ph5 and ebtables-2.0.11-4.ph5 now require the
alternatives package (introduced by Broadcom on April 9, 2026).

The Photon 5 minimal installation ships chkconfig which conflicts with
the new alternatives package, so it cannot be installed directly. The
fix installs alternatives via Ansible with --allowerasing before
distro-sync runs. This atomically replaces chkconfig with alternatives,
satisfying the iptables/ebtables dependency and allowing distro-sync to
complete successfully.

Validated with a live vSphere build against the testbed.

Ref: vmware/photon#1646
Made-with: Cursor
@knabben knabben force-pushed the photon-5-add-alternatives branch from bfd764d to b495b4e Compare April 28, 2026 13:23
@knabben knabben changed the title ova: add alternatives package to Photon 5 kickstart ova: fix Photon 5 distro-sync failure due to alternatives/chkconfig conflict Apr 28, 2026
The setup role fix covers firstboot.yml, but vmware-photon.yml runs
in node.yml (the second playbook) via the providers role. Add the same
alternatives --allowerasing step before the cloud-init install so the
fix is present even when node.yml is run independently.

Suggested-by: bhllamoreaux
Made-with: Cursor
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 28, 2026
@knabben knabben changed the title ova: fix Photon 5 distro-sync failure due to alternatives/chkconfig conflict [WIP] ova: fix Photon 5 distro-sync failure due to alternatives/chkconfig conflict Apr 28, 2026
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 28, 2026
@mboersma
Copy link
Copy Markdown
Contributor

mboersma commented May 5, 2026

A possible simplification: instead of a separate tdnf install -y alternatives --allowerasing task, add --allowerasing directly to the existing distro-sync command:

- name: Perform a tdnf distro-sync
  ansible.builtin.command: tdnf distro-sync -y --refresh --allowerasing

That lets tdnf handle the chkconfig→alternatives swap atomically as part of the sync, in one step. It also removes the need for the second change in roles/providers/tasks/vmware-photon.yml, since that role doesn't run distro-sync — it only installs cloud-init, which won't pull in iptables.

@mboersma
Copy link
Copy Markdown
Contributor

mboersma commented May 5, 2026

/retest

@mboersma
Copy link
Copy Markdown
Contributor

mboersma commented May 8, 2026

@knabben if you want to remove the [WIP], this does seem to fix the OVA build and we'd be glad to merge it. My comment above is optional.

@knabben knabben changed the title [WIP] ova: fix Photon 5 distro-sync failure due to alternatives/chkconfig conflict ova: fix Photon 5 distro-sync failure due to alternatives/chkconfig conflict May 10, 2026
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 10, 2026
Copy link
Copy Markdown
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboersma

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 11, 2026
@mboersma
Copy link
Copy Markdown
Contributor

/test pull-ova-all

Just to be sure.

@k8s-ci-robot k8s-ci-robot merged commit ba4b627 into kubernetes-sigs:main May 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants