Skip to content

Commit 21a78c7

Browse files
author
Ahmed Karic
committed
confd: Add mount constraint for container config
This change ensures configuration correctness by enforcing that each container mount has either a source or content set. Without this, the system may generate invalid runtime arguments (src=(null)), leading to container startup failures.
1 parent d6d621a commit 21a78c7

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

doc/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ All notable changes to the project are documented in this file.
2020
### Fixes
2121
- Fix containers with multiple mounts
2222
- Correct description for LAG LACP modes
23+
- Fix #1040: Add `mount` constraint for container config
2324

2425

2526
[v25.04.0][] - 2025-04-30

src/confd/yang/confd/infix-containers.yang

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ module infix-containers {
2222
prefix infix-sys;
2323
}
2424

25+
revision 2025-05-14 {
26+
description
27+
"Validation improvement:
28+
- Added constraint to require either 'source' or 'content' in a container mount.";
29+
reference "internal";
30+
}
31+
2532
revision 2024-11-15 {
2633
description "Two major changes:
2734
- Add support for ftp/http/https images with checksum
@@ -342,6 +349,7 @@ module infix-containers {
342349
}
343350

344351
choice data {
352+
mandatory true;
345353
case source {
346354
leaf source {
347355
description "Host path to mount in container, may be a glob.

src/confd/yang/containers.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# REMEMBER TO UPDATE infix-interfaces ALSO IN confd.inc
33
MODULES=(
44
"[email protected] -e vlan-filtering -e containers"
5-
"infix-containers@2024-11-15.yang"
5+
"infix-containers@2025-05-14.yang"
66
)

0 commit comments

Comments
 (0)