Skip to content

Container: mount allows target without source or content #1040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mattiaswal opened this issue May 7, 2025 · 1 comment · May be fixed by #1046
Open

Container: mount allows target without source or content #1040

mattiaswal opened this issue May 7, 2025 · 1 comment · May be fixed by #1046
Assignees
Labels
bug Something isn't working cn:styx
Milestone

Comments

@mattiaswal
Copy link
Contributor

mattiaswal commented May 7, 2025

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

@mattiaswal mattiaswal added bug Something isn't working triage Pending investigation & classification (CCB) labels May 7, 2025
@troglobit troglobit changed the title Container: mount allows target but no source Container: mount allows target without source or content May 8, 2025
@troglobit
Copy link
Contributor

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.

@jovatn jovatn removed the triage Pending investigation & classification (CCB) label May 13, 2025
@jovatn jovatn added this to the Infix v25.05 milestone May 13, 2025
@jovatn jovatn added the cn:styx label May 15, 2025
@axkar axkar linked a pull request May 15, 2025 that will close this issue
18 tasks
@axkar axkar moved this to In progress in Infix & C:o May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cn:styx
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

4 participants