Skip to content
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

Bind/Overlay device fix #87

Merged
merged 4 commits into from
Jan 10, 2025
Merged

Conversation

jchristianh
Copy link
Contributor

For hosts running services such as Docker or named-chroot, bind/overlay mounts
are created under an existing device node. This has the result reporting multiple
results for the mount point existence assertion, which ultimately causes a
failure due to accepting only a single result.

This set of updates changes the logic to support these hosts.

Below are outputs from the mount command and ansible_facts['mounts']
from an example host running both of these services.

Output from mount:

/dev/mapper/system-root on / type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/localtime type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/named.root.key type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/named.conf type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/named.rfc1912.zones type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/rndc.key type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/named.iscdlv.key type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/protocols type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/services type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/etc/named type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/usr/lib64/bind type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/named/chroot/var/named type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/lib/docker/containers type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/system-root on /var/lib/docker/overlay2 type ext4 (rw,relatime,seclabel,data=ordered)

Truncated example output from ansible_facts['mounts']:

        {
            "block_available": 16410821,
            "block_size": 4096,
            "block_total": 18245904,
            "block_used": 1835083,
            "device": "/dev/mapper/system-root",
            "fstype": "ext4",
            "inode_available": 4582572,
            "inode_total": 4644864,
            "inode_used": 62292,
            "mount": "/",
            "options": "rw,seclabel,relatime,data=ordered",
            "size_available": 67218722816,
            "size_total": 74735222784,
            "uuid": "588943e8-02c5-429b-a8d4-1b6ff390b051"
        },
        {
            "block_available": 16410821,
            "block_size": 4096,
            "block_total": 18245904,
            "block_used": 1835083,
            "device": "/dev/mapper/system-root",
            "fstype": "ext4",
            "inode_available": 4582572,
            "inode_total": 4644864,
            "inode_used": 62292,
            "mount": "/var/lib/docker/overlay2",
            "options": "rw,seclabel,relatime,data=ordered,bind",
            "size_available": 67218722816,
            "size_total": 74735222784,
            "uuid": "588943e8-02c5-429b-a8d4-1b6ff390b051"
        },
        {
            "block_available": 16410821,
            "block_size": 4096,
            "block_total": 18245904,
            "block_used": 1835083,
            "device": "/dev/mapper/system-root",
            "fstype": "ext4",
            "inode_available": 4582572,
            "inode_total": 4644864,
            "inode_used": 62292,
            "mount": "/var/named/chroot/var/named",
            "options": "rw,seclabel,relatime,data=ordered,bind",
            "size_available": 67218722816,
            "size_total": 74735222784,
            "uuid": "588943e8-02c5-429b-a8d4-1b6ff390b051"
        },

Copy link
Collaborator

@ygalblum ygalblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@swapdisk swapdisk merged commit 2050852 into redhat-cop:main Jan 10, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants