← Back to Pull requests

alpine-cloud-init: Add udhcpc6 script for IPv6 DHCP #1856

Open
nirdothan opened this pull request with 40 lines diff across 4 files
View on GitHub
nirdothan nirdothan commented on Sep 29, 2026 18:03 UTC
Author

<!-- Thanks for sending a pull request! Here are some tips for you:
1. Consider creating this PR as draft: https://github.com/kubevirt/kubevirt/blob/main/CONTRIBUTING.md#consider-opening-your-pull-request-as-draft
2. Follow the instructions for writing a release note from k8s: https://git.k8s.io/community/contributors/guide/release-notes.md
-->

What this PR does / why we need it:
Alpine's busybox udhcpc6 does not apply leases without a custom script. Install one in the test image and wire eth0 inet6 dhcp to use it so IPv6 DHCP works in guest tests.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

  • Design: A design document was considered and is present (link) or not required

  • PR: The PR description is expressive enough and will help future contributors

  • Code: Write code that humans can understand and Keep it simple

  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)

  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required

  • Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test

  • Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.

  • Community: Announcement to kubevirt-dev was considered
  • Release note:
    <!-- Write your release note:
    1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
    2. If no release note is required, just write "NONE".
    -->
    ``release-note
    NONE
    ``

    Diff: 40 lines (+40 / -0) across 4 files Reviewer: stu-gott Review duration: 41831m
    All Vouch review confidence checks passed
    Residual risk 0.03 = Change Risk (0.30) × (1 − Review Confidence (0.90)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.30 · 40 lines diff across 4 files
    0.30
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.88 · 5 substantive comment(s)
    0.88
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    90%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.222
    Real PR Conversation Timeline
    13 items
    kubevirt-prow[bot] kubevirt-prow[bot] commented on Sep 29, 2026 18:04 UTC
    Bot

    Skipping CI for Draft Pull Request.
    If you want CI signal for your change, please convert it to an actual PR.
    You can still manually trigger a test run with /test all

    nirdothan nirdothan commented on Sep 29, 2026 18:04 UTC
    Author

    /test check-provision-k8s-1.37

    stu-gott stu-gott commented on code on Sep 29, 2026 21:06 UTC
    Code Review
    cluster-provision/images/vm-image-builder/alpine-cloud-init/udhcpc6.script:1
    @@ -0,0 +1,14 @@
    +#!/bin/sh
    +# Log execution
    +echo "$(date) - action: '$1', ipv6: '$ipv6'" >> /tmp/udhcpc6.log

    I get that this is a shim script to make a test image work, but is there a better basepath for a logfile? As is, it looks like debugging cruft.

    stu-gott stu-gott commented on Sep 29, 2026 21:11 UTC
    Contributor

    /approve

    kubevirt-prow[bot] kubevirt-prow[bot] commented on Sep 29, 2026 21:11 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/kubevirt/kubevirtci/pull/1856#issuecomment-5898973023" title="Approved">stu-gott</a>

    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:

  • ~~cluster-provision/images/vm-image-builder/OWNERS~~ [stu-gott]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    nirdothan nirdothan commented on code on Sep 30, 2026 12:14 UTC
    Code Review
    cluster-provision/images/vm-image-builder/alpine-cloud-init/udhcpc6.script:1
    @@ -0,0 +1,14 @@
    +#!/bin/sh
    +# Log execution
    +echo "$(date) - action: '$1', ipv6: '$ipv6'" >> /tmp/udhcpc6.log

    Changed to use system logger instead.

    nirdothan nirdothan commented on Sep 30, 2026 12:19 UTC
    Author

    /hold
    Temporarily until I thoroughly test it and make sure it doesn't cause any regression

    nirdothan nirdothan commented on Oct 08, 2026 16:38 UTC
    Author
    nirdothan nirdothan commented on Oct 08, 2026 16:47 UTC
    Author

    Image tested successfully in https://github.com/kubevirt/kubevirt/pull/19357, following last push .

    nirdothan nirdothan commented on Oct 08, 2026 18:24 UTC
    Author

    /cc @orelmisan @EdDev need your ack on this.
    This PR adds a DHCP6 request to Alpine. It is non-blocking and fails silently if the server does not respond.
    It is required for https://github.com/kubevirt/kubevirt/pull/17878, which currently mitigates this issue by running a Fedora guest instead of Alpine.

    EdDev EdDev commented on Oct 08, 2026 23:24 UTC
    Contributor

    I am missing some context here to properly evaluate this.
    Why the default behavior of Alpine is not sufficient?
    How many tests are effected by the current limitation?
    As the cost is to maintain yet another piece of code/script, what alternatives have been considered?

    nirdothan nirdothan commented on Oct 11, 2026 08:24 UTC
    Author

    I am missing some context here to properly evaluate this. Why the default behavior of Alpine is not sufficient? How many tests are effected by the current limitation? As the cost is to maintain yet another piece of code/script, what alternatives have been considered?

    Why the default behavior of Alpine is not sufficient

    It does not perform DHCP6 request

    How many tests are effected by the current limitation?

    I've identified one (passt UDP IPv6), there may be other false positives. Particularly in passt and masquerade.

    what alternatives have been considered?

    Currently https://github.com/kubevirt/kubevirt/pull/17878 has a replacement of Alpine with Fedora just for the 2 UDP tests.
    Another alternative is to keep alpine but perform a DHCP6 request through the console just in that tests.
    The alternative proposed in this PR was suggested in https://github.com/kubevirt/kubevirt/pull/19113#pullrequestreview-5197068534 by @akalenyu.

    Reviewers
    Assignees
    nirdothan nirdothan
    Labels
    risk: low confidence: 90.4% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 29.6% (LOW) · Higher = larger blast radius
    29.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 90.4% · Lower = rushed or shallow review
    90.4%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 2.9% · Safe to merge
    2.9%