Conversation
chef/cookbooks/sahara/recipes/sql.rb
Outdated
| group node[:sahara][:group] | ||
| # We only do the sync the first time, and only if we're not doing HA or if we | ||
| # are the founder of the HA cluster (so that it's really only done once). | ||
| only_if { !node[:sahara][:db_synced] && (!ha_enabled || CrowbarPacemakerHelper.is_cluster_founder?(node)) } |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. 109/100
ada2163 to
639c97f
Compare
| = t(".logging_header") | ||
| = boolean_field :verbose | ||
| = boolean_field :debug | ||
| = boolean_field :use_syslog No newline at end of file |
There was a problem hiding this comment.
Files should end with a trailing newline
There was a problem hiding this comment.
Do we usually expose the use_syslog setting? I think it's hidden for all other barclamps.
There was a problem hiding this comment.
Indeed, other barclamps do not expose this. But we still have the switch in the configuration to enable or disable it based on node[barclamp][:use_syslog], so why not expose it to the user and set it to a default value? And if we want it to be always false (because of supportconfig?) then whyset a switch instead of setting it to false on the template directly?
Knowing that we do not have a central logging system in place for crowbar, enabling this means that there is a cheap and easy way for customers to use syslog as forwarder to set up their own centralized log management.
| end | ||
|
|
||
| saharas = search(:node, "roles:sahara-server") || [] | ||
| use_sahara = saharas.empty? ? false: true |
There was a problem hiding this comment.
Style/SpaceAroundOperators: Surrounding space missing for operator :. (https://github.com/bbatsov/ruby-style-guide#spaces-operators)
440c9fc to
0e1531c
Compare
|
|
||
| api: { | ||
| bind_host: !node[:sahara][:ha][:enabled] && node[:sahara][:api][:bind_open_address] ? "0.0.0.0" : @ip, | ||
| bind_port: node[:sahara][:ha][:enabled] ? node[:sahara][:ha][:ports][:api_port].to_i : node[:sahara][:api][:bind_port].to_i, |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. 138/100
441b902 to
4b44a47
Compare
| api: { | ||
| bind_host: !node[:sahara][:ha][:enabled] && | ||
| node[:sahara][:api][:bind_open_address] ? "0.0.0.0" : @ip, | ||
| bind_port: node[:sahara][:ha][:enabled] ? |
There was a problem hiding this comment.
Style/MultilineTernaryOperator: Avoid multi-line ternary operators, use if or unless instead. (https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary)
4b44a47 to
eab9fc2
Compare
|
goddammit hound |
c0aec6b to
bd96e27
Compare
|
waiting for #523 |
chef/cookbooks/sahara/recipes/ha.rb
Outdated
|
|
||
| transaction_objects = [] | ||
|
|
||
| api_primitive = "sahara-api" |
There was a problem hiding this comment.
Continuing the discussion from #480 (comment):
@vuntz I thougth that while we need the API to be HA with a VIP and everything, we dont really need the engine to have a VIP as we can deploy it to X nodes without any repercussions so there is really no need to have it checked out and controlled by pacemaker?
I may be wrong in this, but as far as I undertand the arch of sahara, there should be no need for the engine to be controlled under pacemaker.
So that's based on a wrong assumption: we don't put services in pacemaker for the VIP, but because we want pacemaker to manage the service, restart it when needed and do something when things are awfully wrong.
So yes, we want sahara-engine to be handled in pacemaker (but not part of haproxy).
Btw, that's what we do in other barclamps too. Look at nova-scheduler, for instance.
There was a problem hiding this comment.
So that's based on a wrong assumption: we don't put services in pacemaker for the VIP, but because we want pacemaker to manage the service, restart it when needed and do something when things are awfully wrong.
I see. So pacemaker is our service watchdog only when the cloud is on HA.
Will change this to get the engine in pacemaker and run the HA recipe from the role instead.
2589db6 to
a067483
Compare
| default[:sahara][:ha][:engine][:ra] = if ["rhel", "suse"].include? node[:platform_family] | ||
| "lsb:openstack-sahara-engine" | ||
| else | ||
| "lsb:sahara-engine" |
There was a problem hiding this comment.
Style/IndentationWidth: Use 2 (not 1) spaces for indentation. (https://github.com/bbatsov/ruby-style-guide#spaces-indentation)
There was a problem hiding this comment.
Style/IndentationWidth: Use 2 (not 1) spaces for indentation. (https://github.com/bbatsov/ruby-style-guide#spaces-indentation)
a067483 to
ec3d0f5
Compare
|
@Itxaka |
ec3d0f5 to
4b7587a
Compare
|
Thanks @toabctl should be fixed. That was a very dumb mistake :D |
|
I retriggered gating with |
|
+1 |
4b7587a to
1a4b3ed
Compare
1a4b3ed to
198e5fa
Compare
|
Retriggered with want_sahara. Did a mistake and set the port to the host and the host to the port so the service wasnt coming up :D |
|
+1 |
This is basically #365 fixed and improved upon.