Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)
Maintainer thường phản hồi trong vòng 1 ngày
@willbennett-devops đang làm issue này rồi.
Từ ngày 31/10/2026.
- #14546 của @willbennett-devops — đang mở
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, python
- Lĩnh vực
- networking
Hướng nghiên cứu
Bắt đầu từ configure_l2tpIpsec() trong systemvm/debian/opt/cloud/bin/configure.py gần dòng 1277, nơi secret.empty() được gọi trước khi PSK được thêm lại, sau đó đọc empty(), is_changed() và repopulate() trong systemvm/debian/opt/cloud/bin/cs/CsFile.py (dòng 42-56). Hoàn thành khi một thay đổi rule không liên quan không còn khởi động lại xl2tpd, nhưng PSK bị thay đổi vẫn khởi động lại nó. Kiểm tra dòng khởi động lại trong cloud.log đã biến mất trong trường hợp đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
problem
Since 4.22.1.0, every remote access VPN (L2TP/IPsec) client on a router is disconnected whenever an unrelated rule
changes on that router: creating or deleting an LB rule, an ACL rule, a port forward, a firewall rule, a static NAT or
a site-to-site VPN. The client has to reconnect each time. Some clients (macOS) don't reconnect on their own.
cloud.log on the router shows xl2tpd being restarted on every one of those passes, although none of the L2TP files
changed except the secrets file, which was rewritten with the same content:
Nothing to commit. The /etc/ipsec.d/l2tp.conf file did not change
Wrote edited file /etc/ipsec.d/ipsec.any.secrets
Nothing to commit. The /etc/xl2tpd/xl2tpd.conf file did not change
Nothing to commit. The /etc/ppp/options.xl2tpd file did not change
Executing: ipsec update
Executing: systemctl restart xl2tpd
Executing: ipsec rereadsecrets
Root cause, line numbers from the 4.22 branch (56306ab52c), same code in 4.23.0.0 and main:
systemvm/debian/opt/cloud/bin/configure.py:1277, inconfigure_l2tpIpsec():secret.empty()before
secret.addeq(": PSK ...")andsecret.commit().systemvm/debian/opt/cloud/bin/cs/CsFile.py:51-53:empty()clears bothconfig(the copy read from disk) and
new_config.is_changed()(CsFile.py:42-46) compares the two, so afterempty()the file always reads as
changed andcommit()always returns True.configure.py:1247-1250: since #12422 (the fix for #12195), a changed config meanssystemctl restart xl2tpd
instead ofsystemctl start xl2tpd. Restarting xl2tpd kills every pppd session.CsRemoteAccessVpn.process()runs fromIpTablesExecutor.process()(configure.py:1615-1616), which runs for every
data bag withprocess_iptables: True(configure.py:1673-1690), not only for VPN changes.
Before #12422 the same pass ran systemctl start xl2tpd, a no-op on a running service, so the always-changed secrets
file did no harm.
Impact: on 4.22.1.0 and later, any router with a remote access VPN drops all its VPN users on any rule change in the
network or VPC. With CKS, the cloud controller manager's LB and ACL reconciles trigger it too.
versions
4.22.1.0, 4.22.1.1 and 4.23.0.0 (any version containing #12422). Seen on 4.23.0.0 with KVM, VPC with redundant
routers, advanced networking. Not specific to the hypervisor.
The steps to reproduce the bug
- Create a VPC, enable remote access VPN on its source NAT IP and add a VPN user.
- Connect an L2TP/IPsec client and keep a ping running to a VM in a tier.
- Create (or delete) an LB rule, or add an ACL rule, in that VPC.
- The client's session drops.
cloud.logon the router shows "Wrote edited file /etc/ipsec.d/ipsec.any.secrets"
followed bysystemctl restart xl2tpd.
What to do about it?
Use secret.repopulate() instead of secret.empty() in configure_l2tpIpsec(). repopulate() (CsFile.py:55-56)
clears only new_config and keeps the copy loaded from disk, so an unchanged PSK compares equal and xl2tpd is only
restarted when something really changed, which is what #12422 intended. A changed PSK still restarts it. PR to follow.
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.4k
- Merge trung bình
- 10 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 20
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/cloudstack
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/cloudstack#14530 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug status:has-work-around
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/cloudstack#14465 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
4.23.0.0: restartVPC cleanup=true with public IPs on two VLANs fails with UnsupportedOperationException and leaves the VPC without a backup routerCó thể đã có người làm @bernardodemarco đã nhận 5 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/cloudstack#14430 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
apache/cloudstack#14427 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[UI] "canceled - Unable to reach the management server" notification when switching from project to default view on Instances page (4.20.3)Có thể đã có người làm @Damans227 đã nhận 20 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
apache/cloudstack#14381 · 1 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/cloudstack
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Shweit/EtherealPortals#30 ·
-
Typo in jakartaee-bom 12.0.0-SNAPSHOT with cdiCó thể đã có người làm @ElectLive đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
jakartaee/jakartaee-api#205 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
liberation-data/drivine4j#547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
BindingServiceProperties.bindings regressed to a non-thread-safe TreeMap in GH-3158: concurrent first use of binding names corrupts itCó thể đã có người làm @AkashB23 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
spring-cloud/spring-cloud-stream#3321 ·
Maintainer thường phản hồi trong vòng 1 ngày