Skip to content

Allow configuring redis start_down and set_replicaof independently

Dustin Collins requested to merge 7381-add-omit-slaveof-attr-redis into master

What does this MR do?

Adds a redis['set_replicaof'] attributes that configures whether the replicaof <masterip> <masterport> line in redis.conf is rendered.

The attribute defaults to false, and is set to true when redis['ha'] is set to true, unless redis['master'] is set to true (default). With redis['ha'] set to false, the set_replicaof attribute can be toggled to true or false independently.

As suggested in https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/merge_requests/2707#note_1232269487, I also added a new redis['start_down'] attribute. We should be able to deprecate the redis['ha'] attribute, which as noted in that discussion is a holdover attribute that mostly controls start_down behavior.

Related issues

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened

Closes #7381 (closed)

Edited by Dustin Collins

Merge request reports