infix
infix copied to clipboard
Container: mount allows target without source or content
Current Behavior
admin@infix-00-00-00:/config/container/graphic/> show
enabled true;
image docker://mattiaswal/alpine-desktop:latest;
privileged true;
mount udev {
target /run/udev;
}
mount xorg.conf {
content U2VjdGlvbiAiU2VydmVyTGF5b3V0IgogICAgSWRlbnRpZmllciAiRGVmYXVsdExheW91dCIKICAgIFNjcmVlbiAwICJTY3JlZW4wIiAwIDAKRW5kU2VjdGlvbgpTZWN0aW9uICJEZXZpY2UiCiAgICBJZGVudGlmaWVyICJpTVggTENEIgogICAgRHJpdmVyICJtb2Rlc2V0dGluZyIKICAgIEJ1c0lEICJwbGF0Zm9ybTozMmZjNjAwMC5kaXNwbGF5LWNvbnRyb2xsZXIiCiAgICBPcHRpb24gImttc2RldiIgIi9kZXYvZHJpL2NhcmQxIgpFbmRTZWN0aW9uCgpTZWN0aW9uICJTY3JlZW4iCiAgICBJZGVudGlmaWVyICJTY3JlZW4wIgogICAgRGV2aWNlICJpTVggTENEIgogICAgRGVmYXVsdERlcHRoIDI0CkVuZFNlY3Rpb24KCg==;
target /etc/X11/xorg.conf;
}
volume root {
target /root;
}
volume var {
target /var;
}
May 7 07:58:18 infix-00-00-00 graphic[4884]: /run/containers/graphic.sh: line 5: syntax error near unexpected token `('
May 7 07:58:18 infix-00-00-00 graphic[4884]: /run/containers/graphic.sh: line 5: `container --quiet --privileged -v graphic-root:/root -v graphic-var:/var -m type=bind,src=(null),dst=/run/udev,readonly=true -m type=bind,src=/run/containers/files/graphic-xorg.conf,dst=/etc/X11/xorg.conf,readonly=true -r always create graphic docker://mattiaswal/alpine-desktop:latest'
Expected Behavior
Error from yang validation: "Either a source or content is required for a mount point."
Steps To Reproduce
No response
Additional information
No response
Possible solution:
must "boolean(source) or boolean(content)" {
error-message "A mount must have either 'source' or 'content'.";
}
This should be placed inside the container or list representing the mount instance, not inside the individual leaf.