Merge "Make strict dependencies between cluster tasks"

This commit is contained in:
Jenkins 2016-06-09 21:12:51 +00:00 committed by Gerrit Code Review
commit ef80c4a9a8
3 changed files with 15 additions and 11 deletions

View File

@ -20,7 +20,8 @@
version: 2.1.0
groups: [controller]
cross-depends:
- name: primary-cluster
yaql_exp: >
[{name=>'primary-cluster', role=>$.roles.select('primary-' + $)}]
required_for: [deploy_end]
requires: [hosts, firewall, deploy_start]
condition:

View File

@ -12,7 +12,7 @@
switch(
(
('mongo' in $.roles) or ('primary-mongo' in $.roles)
) => [
) => [
{name=>'configure_default_route',role=>'self'}
],
true => [
@ -26,7 +26,7 @@
switch(
(
('mongo' in $.roles) or ('primary-mongo' in $.roles)
) => [
) => [
{name=>'netconfig',role=>'self'},
{name=>'post_deployment_start',role=>'self'}
],
@ -65,17 +65,23 @@
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig_pre.rb
test_post:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig_post.rb
# Run netconfig task on all nodes (except controllers and mongo) after virtual_ips.
# Thus we make sure that our default gateway (mgmt VIP) is up before configuring
# Run netconfig task on all nodes (except mongo and vrouter VIP roles) after virtual_ips.
# Thus we make sure that our default gateway (vrouter VIP) is up before configuring
# routing on nodes.
cross-depends:
yaql_exp: >
switch(
(
$.roles.any($.matches('(primary-)?(controller|mongo)'))
or ($.network_metadata.get('vips',{}).get('management') = null)
$.roles.any($.matches('^(primary-)?(mongo)$'))
or ($.network_metadata.get('vips',{}).get('vrouter',{}).get('ipaddr') = null)
or (
len($.roles.toSet().intersect($.network_metadata.get('vips',{}).get('vrouter',{}).get('node_roles').toSet())) > 0
)
) => [],
true => [{name =>'virtual_ips'}]
true => [{
name => 'virtual_ips',
role => $.network_metadata.get('vips',{}).get('vrouter',{}).get('node_roles')
}]
)
- id: connectivity_tests

View File

@ -6,9 +6,6 @@
requires: [primary-cluster,cluster]
condition:
yaql_exp: "changedAny($.network_metadata, $.network_scheme, $.roles)"
cross-depends:
- name: /(primary-)?cluster$/
role: self
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/virtual_ips/virtual_ips.pp
puppet_modules: /etc/puppet/modules