Skip to content

[4.0] haproxy: Check for existence of "content[:stick]"#274

Merged
stefannica merged 1 commit intocrowbar:stable/4.0from
stefannica:bug-1062889
Nov 7, 2017
Merged

[4.0] haproxy: Check for existence of "content[:stick]"#274
stefannica merged 1 commit intocrowbar:stable/4.0from
stefannica:bug-1062889

Conversation

@stefannica
Copy link
Contributor

(backports #258)

After a cowbar-ha update, the 'stick' attribute introduced in PR #209 is missing from the existing node[:haproxy][sections] entries, which may result in errors such as:

Chef::Mixin::Template::TemplateError
------------------------------------
undefined method `[]' for nil:NilClass

This PR adds checks for the existence of the 'stick' attribute before dereferencing it.

Fixes bsc#1062889.

After a cowbar-ha update, the 'stick' attribute introduced in
commit #65d0ee6f is missing from the existing node[:haproxy][sections]
entries, which may result in errors such as:

Chef::Mixin::Template::TemplateError
------------------------------------
undefined method `[]' for nil:NilClass

This commit adds checks for the existence of the 'stick' attribute
before dereferencing it.
(cherry picked from commit d2ac9b1)
@stefannica
Copy link
Contributor Author

@stefannica stefannica merged commit 1ff4633 into crowbar:stable/4.0 Nov 7, 2017
@stefannica stefannica deleted the bug-1062889 branch November 7, 2017 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants