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

Cannot reassign variable r at volume.pp:264 #18

Closed
zstyblik opened this issue Aug 5, 2015 · 0 comments · Fixed by #21
Closed

Cannot reassign variable r at volume.pp:264 #18

zstyblik opened this issue Aug 5, 2015 · 0 comments · Fixed by #21

Comments

@zstyblik
Copy link

zstyblik commented Aug 5, 2015

Hello,

you really shouldn't reuse variable names, because once variable is declared/assigned in Puppet, it can't be changed. You have used variable $r for replica, therefore you can't use it later to store options which won't be removed.

            $r = join( keys($remove), ', ' )
            notice("NOT REMOVING the following options for volume ${title}: ${r}.")

Fix is fairly easy. Just use different name for variable in question.

zstyblik pushed a commit to zstyblik/puppet-gluster that referenced this issue Aug 8, 2015
Commit fixes reuse of variable name in volume.pp. Variable name $r has been used
earlier to store replica information earlier and been (re)used to store
information about removed options later. Such thing is prohibited by Puppet.

Closes voxpupuli#18
@skpy skpy closed this as completed in #21 Aug 10, 2015
cegeka-jenkins pushed a commit to cegeka/puppet-gluster that referenced this issue Jul 20, 2018
Commit fixes reuse of variable name in volume.pp. Variable name $r has been used
earlier to store replica information earlier and been (re)used to store
information about removed options later. Such thing is prohibited by Puppet.

Closes voxpupuli#18
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 a pull request may close this issue.

1 participant