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

2016.3 mount vfstab support #34283

Merged
merged 10 commits into from
Jun 28, 2016
Merged

2016.3 mount vfstab support #34283

merged 10 commits into from
Jun 28, 2016

Conversation

sjorge
Copy link
Contributor

@sjorge sjorge commented Jun 24, 2016

What does this PR do?

Add vfstab support (Solaris like platform fstab format)

It bugged me the entire day I didn't fix the fstab parsing for Solaris like platforms, so I added support for vfstab.

New functions
mount.vfstab (wrapper for mount.fstab)
mount.rm_vfstab (wrapper for mount.rm_fstab)
mount.set_vfstab

The wrapper pass the correct file path (/etc/vfstab) to there parent function, the parent functions know how to parse the vfstab format by creating a _vfstab_entry class.

What issues does this PR fix or reference?

N/A

Previous Behavior

fstab returned nothing, rm_fstab and set_fstab did not work either.

New Behavior

vfstab, rm_vfstab en set_vfstab are now working.

Tests written?

Yes (mount.vfstab)

Affected version

  • 2016.3
  • develop

Introduce vfstab support for mount.fstab, entries for opts look a bit
weird. Default are '-' so it will end up as a list containing '-'.

I left this to keep 'opts' the same as for normal fstabs.

Example output:

    /dev/fd:
        ----------
        device:
            fd
        device_fsck:
            -
        fstype:
            fd
        mount_at_boot:
            no
        opts:
            - -
        pass_fsck:
            -
    /devices:
        ----------
        device:
            /devices
        device_fsck:
            -
        fstype:
            devfs
        mount_at_boot:
            no
        opts:
            - -
        pass_fsck:
            -
    /etc/dfs/sharetab:
        ----------
        device:
            sharefs
        device_fsck:
            -
        fstype:
            sharefs
        mount_at_boot:
            no
        opts:
            - -
        pass_fsck:
            -
    /proc:
        ----------
        device:
            /proc
        device_fsck:
            -
        fstype:
            proc
        mount_at_boot:
            no
        opts:
            - -
        pass_fsck:
            -
    /system/contract:
        ----------
        device:
            ctfs
        device_fsck:
            -
        fstype:
            ctfs
        mount_at_boot:
            no
        opts:
            - -
        pass_fsck:
            -
    /system/object:
        ----------
        device:
            objfs
        device_fsck:
            -
        fstype:
            objfs
        mount_at_boot:
            no
        opts:
            - -
        pass_fsck:
            -
    /tmp:
        ----------
        device:
            swap
        device_fsck:
            -
        fstype:
            tmpfs
        mount_at_boot:
            yes
        opts:
            - size=2048m
        pass_fsck:
            -
@sjorge
Copy link
Contributor Author

sjorge commented Jun 24, 2016

This has been bugging me since yesterday, had more time to night so bit the bullet and fixed the vfstab support too. More stuff coming this weekend, a runner if all goes well. (for develop, not sure I can also submit it against 2016.3)

@sjorge
Copy link
Contributor Author

sjorge commented Jun 25, 2016

So the test for rm_fstab was failing due to missing kernel, but it is still failing locally with a patched test.
I'm not sure why, but the test also fails without my changes to mount.py locally.

@sjorge
Copy link
Contributor Author

sjorge commented Jun 27, 2016

Seems to be a non-related test failure this time round :)

@sjorge
Copy link
Contributor Author

sjorge commented Jun 28, 2016

Can someone give jenkins a poke? @cachedout

@cachedout cachedout merged commit 80a659b into saltstack:2016.3 Jun 28, 2016
@sjorge sjorge deleted the 2016.3-mount-fstab branch June 28, 2016 19:45
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.

None yet

2 participants