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

Support configuration repositories when using mount #177

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

traylenator
Copy link
Contributor

@traylenator traylenator commented Jun 27, 2023

Pull Request (PR) description

This patch only comes into play when using the mount_method of mount rather than the default autofs.

It is now possible to specify that one particular repository on a client is the configuration repository and must be mounted first before all other repositories. This should happen during puppets initial configuration of CvmFS and also at reboot.

class{'cvmfs':
  mount_method => 'mount',
  config_repo  => 'cvmfs-config.example.org',
}
cmvfs::mount{'myrepo.example.org':}
cmvfs::mount{'cvmfs-config.example.org':}

In this example the repository cvmfs-config.example.org will be mounted before myrepo.example.org.

Note there is all ways at most one configuration repository per client.

This Pull Request (PR) fixes the following issues

Fixes: #176

In addition a couple of parameters to cvmfs::mount are made bettter:

  • mount_method to cvmfs::mount never made sense and setting it is pointless unless also set in the main class.
    deprecate the parameter. It will still be accepted now but is redundant. It was already documented as 'DO NOT SET'.
  • mount_options now defaults to an Array of options but a String is still accepted for now.

@traylenator traylenator added the enhancement New feature or request label Jun 27, 2023
@olifre
Copy link
Contributor

olifre commented Jul 1, 2023

👍
We have also hit this, and for now, we've used:

        # always mount config repository containing information about other repositories
        cvmfs::mount { 'cvmfs-config.cern.ch': }

        # mount requested repositories
        cvmfs::mount { $mounts:
                # ensure cvmfs-config.cern.ch is mounted first,
                # see https://cvmfs.readthedocs.io/en/stable/cpt-configure.html#mounting
                mount_options   => 'defaults,_netdev,nodev,x-systemd.requires-mounts-for=/cvmfs/cvmfs-config.cern.ch',
                require         => Cvmfs::Mount['cvmfs-config.cern.ch'],
        }

Having this in the module proper is a good improvement.

@traylenator traylenator marked this pull request as ready for review August 16, 2023 15:13
Copy link
Contributor

@olifre olifre left a comment

Choose a reason for hiding this comment

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

This looks great, I also really like the two improvements (mount_options as array and deprecation of mount_method on cvmfs::mount.
I only added two small nits, but these should not prevent this from being merged 😉 .

REFERENCE.md Outdated Show resolved Hide resolved
manifests/init.pp Outdated Show resolved Hide resolved
This patch only comes into play when using the `mount_method` of `mount`
rather than the default autofs.

It is now possible to specify that one particular repository on a client
is the configuration repository and must be mounted first before all
other repositories. This should happen during puppets initial
configuration of CvmFS and also at reboot.

```puppet
class{'cvmfs':
  mount_method => 'mount',
  config_repo  => 'cvmfs-config.example.org',
}
cmvfs::mount{'myrepo.example.org':}
cmvfs::mount{'cvmfs-config.example.org':}
```

In this example the repository `cvmfs-config.example.org` will
be mounted before `myrepo.example.org`.

Note there is all ways at most one configuration repository per client.

Fixes: voxpupuli#176
@olifre
Copy link
Contributor

olifre commented Feb 2, 2024

Thanks, that lookgs good to me, nice to finally have all occurrences of CVMFS consistent 👍 .

@traylenator traylenator merged commit 0ddce5f into voxpupuli:master Feb 2, 2024
28 checks passed
@traylenator traylenator deleted the config branch February 2, 2024 21:06
@olifre olifre mentioned this pull request Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration repositories should be mounted first
2 participants