You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maybe I'm just not getting the logic of this module (if so please correct me!), but I think there is an error in the way this module handles the repository version (at least for Debian systems).
Starting in init.pp, I can specify two parameters concerning the package version number to be installed: release and version. (BTW: at the top of the file only one of them is documented)
But init.pp itself passes only version onto ::gluster::install:
class { '::gluster::install':
server => $server,
server_package => $server_package,
client => $client,
client_package => $client_package,
version => $version,
repo => $repo,
}
Because install.pp can only handle version, but not release.
This makes sense as ::gluster::install deals with installing the packages, but not setting up the repositories.
However, the availability of the release parameter in init.pp lead me to assume I can configure both the packages and the repository through the main package (because enabling or disabling the repository is also possible through init.pp), like so:
class { '::gluster':
server => true,
client => true,
repo => true,
release => '4.1',
version => '4.1',
}
This will simply lead to the creation of the file /etc/apt/sources.list.d/glusterfs-4.1.list:
# This file is managed by Puppet. DO NOT EDIT.
# glusterfs-4.1
deb [arch=amd64] http://download.gluster.org/pub/gluster/glusterfs/3.12/LATEST/Debian/stretch/amd64/apt/ stretch main
Which is obviously not what I wanted (the URL points to gluster 3.12).
This happens because install.pp includes repo.pp (if that has not already been done), but only passes the version parameter onto repo.pp.
if $repo {
# install the correct repo
if ! defined ( Class['::gluster::repo'] ) {
class { '::gluster::repo':
version => $version,
}
}
}
Since repo.pp does then not know about the release parameter I specified in init.pp, it simply uses the default from params.pp:
Hello,
maybe I'm just not getting the logic of this module (if so please correct me!), but I think there is an error in the way this module handles the repository version (at least for Debian systems).
Starting in init.pp, I can specify two parameters concerning the package version number to be installed:
release
andversion
. (BTW: at the top of the file only one of them is documented)puppet-gluster/manifests/init.pp
Line 44 in 72a80cd
But
init.pp
itself passes onlyversion
onto::gluster::install
:Because install.pp can only handle
version
, but notrelease
.This makes sense as
::gluster::install
deals with installing the packages, but not setting up the repositories.However, the availability of the
release
parameter ininit.pp
lead me to assume I can configure both the packages and the repository through the main package (because enabling or disabling the repository is also possible throughinit.pp
), like so:This will simply lead to the creation of the file
/etc/apt/sources.list.d/glusterfs-4.1.list
:Which is obviously not what I wanted (the URL points to gluster 3.12).
This happens because
install.pp
includesrepo.pp
(if that has not already been done), but only passes theversion
parameter ontorepo.pp
.Since repo.pp does then not know about the
release
parameter I specified ininit.pp
, it simply uses the default from params.pp:puppet-gluster/manifests/params.pp
Line 27 in 72a80cd
Can someone please confirm or deny this observation?
I'd be happy to discuss and submit a PR.
The text was updated successfully, but these errors were encountered: