Skip to content

VR reports a load balancer change as applied when haproxy.cfg cannot be replaced #14633

Open

Description

@bhouse-nexthop

problem

When a virtual router can't replace /etc/haproxy/haproxy.cfg, it still reports a load balancer config change as applied.

CsLoadBalancer.process() (systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py) writes the new config to haproxy.cfg.new, checks it with haproxy -c, and then installs it with CsHelper.copy(). CsHelper.copy() catches the IOError, logs Could not copy /etc/haproxy/haproxy.cfg.new to /etc/haproxy/haproxy.cfg, and returns. The router then reloads HAProxy, which reads the old file, and the config run ends successfully.

The management server therefore gets a successful answer, records the change as applied, and doesn't roll it back, while the router keeps serving the old configuration. A config that fails haproxy -c already makes the apply fail, so only this path is silent.

versions

4.22 (the code is the same on main).

The steps to reproduce the bug

  1. Create a load balancer rule on an isolated network or VPC served by a virtual router.
  2. On the router, make the config file unwritable, for example chattr +i /etc/haproxy/haproxy.cfg.
  3. Change the rule, for example updateLoadBalancerRule algorithm=leastconn, or add a rule.
  4. The API call succeeds and listLoadBalancerRules shows the new values. The router's /var/log/cloud.log has Could not copy /etc/haproxy/haproxy.cfg.new to /etc/haproxy/haproxy.cfg, and /etc/haproxy/haproxy.cfg still has the old config.

What to do about it?

Fail the apply when the new config can't be installed, the same way as when it fails haproxy -c, so that the management server sees the failure and rolls back.

Activity

  1. github-actions commented on Nov 10, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    When the VR cannot replace /etc/haproxy/haproxy.cfg, CsHelper.copy() logs the error and returns, so the config run succeeds. The management server records the change as applied, and the router keeps serving the old configuration. A config that fails haproxy -c already fails the apply, so only this path is silent.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug A failure is reported as success
    Component component:virtual-router CsLoadBalancer and CsHelper on the VR
    Severity Severity:Major The API reports a change as applied when it is not in effect, with no rollback
    Labels type:bug, component:virtual-router, Severity:Major
    Coding agent Suitable Fix is specified: make a failed copy fail the apply, as a failed haproxy -c does

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction: chattr +i /etc/haproxy/haproxy.cfg on the router, change a rule, then check /var/log/cloud.log on the router.
    • Other callers of CsHelper.copy() may fail silently in the same way. Worth checking.

    Generated by Daily Issue Triage · copilot · haiku55 · ~5 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
  2. added this to the 4.22.3 milestone on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions