diff --git a/bin/prepare_test_env.sh b/bin/prepare_test_env.sh index 4773cac..605d199 100755 --- a/bin/prepare_test_env.sh +++ b/bin/prepare_test_env.sh @@ -66,7 +66,7 @@ $SUDO rm -rf /srv/{salt,pillar} $SUDO ln -s $PWD/salt /srv/salt $SUDO ln -s $PWD/pillar /srv/pillar ID=$(hostname -f) -printf "grains:\n city: nuremberg\n country: de\n hostusage: test\n salt_cluster: $SALT_CLUSTER\n virt_cluster: $VIRT_CLUSTER\n" > pillar/id/${ID//./_}.sls +printf "grains:\n city: nuremberg\n country: de\n hostusage: test\n reboot_safe: no\n salt_cluster: $SALT_CLUSTER\n virt_cluster: $VIRT_CLUSTER\n" > pillar/id/${ID//./_}.sls if [[ -n $HIGHSTATE ]]; then ROLES=$(bin/get_roles.py -o yaml) [[ -n $OS ]] && OS_GRAINS="osfullname: ${OS[0]}\nosmajorrelease: ${OS[1]}\nosrelease_info: [${OS[1]}, ${OS[2]}]\n" diff --git a/bin/test_custom_grains.py b/bin/test_custom_grains.py index 62e48f8..40e705a 100755 --- a/bin/test_custom_grains.py +++ b/bin/test_custom_grains.py @@ -33,7 +33,7 @@ def test_custom_grain(mygrains, sls, key, valid_values, status): status = error_msg(sls, key, valid_values) else: if valid_values and value not in valid_values: - status = error_msg(sls, key, valid_values) + status = error_msg(sls, key, map(str, valid_values)) return status diff --git a/pillar/id/anna_infra_opensuse_org.sls b/pillar/id/anna_infra_opensuse_org.sls index f447da4..cb36d0f 100644 --- a/pillar/id/anna_infra_opensuse_org.sls +++ b/pillar/id/anna_infra_opensuse_org.sls @@ -11,6 +11,7 @@ grains: - proxy - proxy_master - ntp + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju subrole_ntp: ntp2 diff --git a/pillar/id/baloo_infra_opensuse_org.sls b/pillar/id/baloo_infra_opensuse_org.sls index 8a1c15a..3726253 100644 --- a/pillar/id/baloo_infra_opensuse_org.sls +++ b/pillar/id/baloo_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - lists.o.o roles: - lists + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/boosters_infra_opensuse_org.sls b/pillar/id/boosters_infra_opensuse_org.sls index ac01f4a..7aea871 100644 --- a/pillar/id/boosters_infra_opensuse_org.sls +++ b/pillar/id/boosters_infra_opensuse_org.sls @@ -3,5 +3,6 @@ grains: country: de hostusage: - connect.o.o + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/chip_infra_opensuse_org.sls b/pillar/id/chip_infra_opensuse_org.sls index e4bba40..4ea37bd 100644 --- a/pillar/id/chip_infra_opensuse_org.sls +++ b/pillar/id/chip_infra_opensuse_org.sls @@ -6,5 +6,6 @@ grains: roles: - ns - ns_slave + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/community_infra_opensuse_org.sls b/pillar/id/community_infra_opensuse_org.sls index 0c72465..d3c46cb 100644 --- a/pillar/id/community_infra_opensuse_org.sls +++ b/pillar/id/community_infra_opensuse_org.sls @@ -7,5 +7,6 @@ grains: - doc.o.o - education.o.o - fontinfo.o.o + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/crtmgr_infra_opensuse_org.sls b/pillar/id/crtmgr_infra_opensuse_org.sls index d54c3c8..3306c45 100644 --- a/pillar/id/crtmgr_infra_opensuse_org.sls +++ b/pillar/id/crtmgr_infra_opensuse_org.sls @@ -5,6 +5,7 @@ grains: - crtmgr.o.o roles: - crtmgr + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju users: diff --git a/pillar/id/daffy1_infra_opensuse_org.sls b/pillar/id/daffy1_infra_opensuse_org.sls index c7802a4..52eb584 100644 --- a/pillar/id/daffy1_infra_opensuse_org.sls +++ b/pillar/id/daffy1_infra_opensuse_org.sls @@ -7,5 +7,6 @@ grains: - ha - login - login_master + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/daffy2_infra_opensuse_org.sls b/pillar/id/daffy2_infra_opensuse_org.sls index 6f1c3fd..149f76a 100644 --- a/pillar/id/daffy2_infra_opensuse_org.sls +++ b/pillar/id/daffy2_infra_opensuse_org.sls @@ -7,5 +7,6 @@ grains: - ha - login - login_slave + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/dale_infra_opensuse_org.sls b/pillar/id/dale_infra_opensuse_org.sls index d5b2a57..b3a4cca 100644 --- a/pillar/id/dale_infra_opensuse_org.sls +++ b/pillar/id/dale_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - events.o.o roles: - web_osem + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/duke_infra_opensuse_org.sls b/pillar/id/duke_infra_opensuse_org.sls index a43a41e..69771bc 100644 --- a/pillar/id/duke_infra_opensuse_org.sls +++ b/pillar/id/duke_infra_opensuse_org.sls @@ -3,5 +3,6 @@ grains: country: de hostusage: - future connect.o.o replacement + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/elsa_infra_opensuse_org.sls b/pillar/id/elsa_infra_opensuse_org.sls index 4716ca4..a9ebf7f 100644 --- a/pillar/id/elsa_infra_opensuse_org.sls +++ b/pillar/id/elsa_infra_opensuse_org.sls @@ -11,6 +11,7 @@ grains: - proxy - proxy_slave - ntp + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju subrole_ntp: ntp3 diff --git a/pillar/id/etherpad_infra_opensuse_org.sls b/pillar/id/etherpad_infra_opensuse_org.sls index 34fcc07..e95f651 100644 --- a/pillar/id/etherpad_infra_opensuse_org.sls +++ b/pillar/id/etherpad_infra_opensuse_org.sls @@ -3,5 +3,6 @@ grains: country: de hostusage: - etherpad.o.o + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/gcc2_infra_opensuse_org.sls b/pillar/id/gcc2_infra_opensuse_org.sls index a753740..fe07d8c 100644 --- a/pillar/id/gcc2_infra_opensuse_org.sls +++ b/pillar/id/gcc2_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - future replacement of gcc.o.o / gcc-stats.i.o.o roles: - web_gcc + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/icc_infra_opensuse_org.sls b/pillar/id/icc_infra_opensuse_org.sls index d65986c..74d982d 100644 --- a/pillar/id/icc_infra_opensuse_org.sls +++ b/pillar/id/icc_infra_opensuse_org.sls @@ -3,6 +3,7 @@ grains: country: de hostusage: - icc.o.o + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/keyserver1_infra_opensuse_org.sls b/pillar/id/keyserver1_infra_opensuse_org.sls index 076fc12..ac8717d 100644 --- a/pillar/id/keyserver1_infra_opensuse_org.sls +++ b/pillar/id/keyserver1_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - keyserver1.o.o roles: - web_keyserver + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/kruemel_infra_opensuse_org.sls b/pillar/id/kruemel_infra_opensuse_org.sls index 020e6fe..8841581 100644 --- a/pillar/id/kruemel_infra_opensuse_org.sls +++ b/pillar/id/kruemel_infra_opensuse_org.sls @@ -4,5 +4,6 @@ grains: hostusage: - planet.o.o - rendering of countdown.o.o (rsynced to community.infra.o.o) + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/kubic_infra_opensuse_org.sls b/pillar/id/kubic_infra_opensuse_org.sls index 2c28339..97952e4 100644 --- a/pillar/id/kubic_infra_opensuse_org.sls +++ b/pillar/id/kubic_infra_opensuse_org.sls @@ -3,5 +3,6 @@ grains: country: de hostusage: - kubic.o.o + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/lnt_infra_opensuse_org.sls b/pillar/id/lnt_infra_opensuse_org.sls index 6a81abc..9549f1c 100644 --- a/pillar/id/lnt_infra_opensuse_org.sls +++ b/pillar/id/lnt_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - lnt.o.o roles: - web_lnt + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/metrics_infra_opensuse_org.sls b/pillar/id/metrics_infra_opensuse_org.sls index 944e52b..5afadb5 100644 --- a/pillar/id/metrics_infra_opensuse_org.sls +++ b/pillar/id/metrics_infra_opensuse_org.sls @@ -3,5 +3,6 @@ grains: country: de hostusage: - metrics.o.o + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/mickey_infra_opensuse_org.sls b/pillar/id/mickey_infra_opensuse_org.sls index 6785e3a..a2e7135 100644 --- a/pillar/id/mickey_infra_opensuse_org.sls +++ b/pillar/id/mickey_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - gitlab.i.o.o roles: - web_gitlab + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/minnie_infra_opensuse_org.sls b/pillar/id/minnie_infra_opensuse_org.sls index 47a9521..3a3b23e 100644 --- a/pillar/id/minnie_infra_opensuse_org.sls +++ b/pillar/id/minnie_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - saltmaster roles: - saltmaster + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/monitor_infra_opensuse_org.sls b/pillar/id/monitor_infra_opensuse_org.sls index 94d35de..885f586 100644 --- a/pillar/id/monitor_infra_opensuse_org.sls +++ b/pillar/id/monitor_infra_opensuse_org.sls @@ -9,5 +9,6 @@ grains: - ircbot - syslog - monitoring + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/mufasa_infra_opensuse_org.sls b/pillar/id/mufasa_infra_opensuse_org.sls index df3430c..f412aaf 100644 --- a/pillar/id/mufasa_infra_opensuse_org.sls +++ b/pillar/id/mufasa_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - proxy-prv.o.o roles: - proxy + reboot_safe: unknown salt_cluster: opensuse virt_cluster: bryce diff --git a/pillar/id/narwal2_infra_opensuse_org.sls b/pillar/id/narwal2_infra_opensuse_org.sls index c71e073..9ec47e6 100644 --- a/pillar/id/narwal2_infra_opensuse_org.sls +++ b/pillar/id/narwal2_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - static.o.o roles: - web_static + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/narwal3_infra_opensuse_org.sls b/pillar/id/narwal3_infra_opensuse_org.sls index d104da8..f2b0310 100644 --- a/pillar/id/narwal3_infra_opensuse_org.sls +++ b/pillar/id/narwal3_infra_opensuse_org.sls @@ -8,5 +8,6 @@ grains: - studioexpress.o.o roles: - web_static + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/narwal5_infra_opensuse_org.sls b/pillar/id/narwal5_infra_opensuse_org.sls index f3f4d33..32c1dc4 100644 --- a/pillar/id/narwal5_infra_opensuse_org.sls +++ b/pillar/id/narwal5_infra_opensuse_org.sls @@ -7,5 +7,6 @@ grains: roles: - static_master - web_static + reboot_safe: yes salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/narwal6_infra_opensuse_org.sls b/pillar/id/narwal6_infra_opensuse_org.sls index c71e073..949dd16 100644 --- a/pillar/id/narwal6_infra_opensuse_org.sls +++ b/pillar/id/narwal6_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - static.o.o roles: - web_static + reboot_safe: yes salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/narwal7_infra_opensuse_org.sls b/pillar/id/narwal7_infra_opensuse_org.sls index c71e073..949dd16 100644 --- a/pillar/id/narwal7_infra_opensuse_org.sls +++ b/pillar/id/narwal7_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - static.o.o roles: - web_static + reboot_safe: yes salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/narwal_infra_opensuse_org.sls b/pillar/id/narwal_infra_opensuse_org.sls index c71e073..9ec47e6 100644 --- a/pillar/id/narwal_infra_opensuse_org.sls +++ b/pillar/id/narwal_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - static.o.o roles: - web_static + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/nuka_infra_opensuse_org.sls b/pillar/id/nuka_infra_opensuse_org.sls index 2881b59..bcd35f9 100644 --- a/pillar/id/nuka_infra_opensuse_org.sls +++ b/pillar/id/nuka_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - l10n.o.o roles: - weblate + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/obsreview_infra_opensuse_org.sls b/pillar/id/obsreview_infra_opensuse_org.sls index 3a1e1fa..1778ed0 100644 --- a/pillar/id/obsreview_infra_opensuse_org.sls +++ b/pillar/id/obsreview_infra_opensuse_org.sls @@ -3,5 +3,6 @@ grains: country: de hostusage: - future OBS related service + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/olaf_infra_opensuse_org.sls b/pillar/id/olaf_infra_opensuse_org.sls index ad9312e..9459226 100644 --- a/pillar/id/olaf_infra_opensuse_org.sls +++ b/pillar/id/olaf_infra_opensuse_org.sls @@ -6,5 +6,6 @@ grains: - scanner.o.o roles: - web_mirrors + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/pontifex2_infra_opensuse_org.sls b/pillar/id/pontifex2_infra_opensuse_org.sls index 5fca0f0..c11ed0c 100644 --- a/pillar/id/pontifex2_infra_opensuse_org.sls +++ b/pillar/id/pontifex2_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - download.o.o roles: - web_download + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/progress_infra_opensuse_org.sls b/pillar/id/progress_infra_opensuse_org.sls index 9c4e4ec..82453fa 100644 --- a/pillar/id/progress_infra_opensuse_org.sls +++ b/pillar/id/progress_infra_opensuse_org.sls @@ -3,5 +3,6 @@ grains: country: de hostusage: - future progress.o.o replacement + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/rafiki_infra_opensuse_org.sls b/pillar/id/rafiki_infra_opensuse_org.sls index ccb612f..6335130 100644 --- a/pillar/id/rafiki_infra_opensuse_org.sls +++ b/pillar/id/rafiki_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - future login3.o.o (provo login proxy) roles: - login + reboot_safe: unknown salt_cluster: opensuse virt_cluster: bryce diff --git a/pillar/id/redmine_infra_opensuse_org.sls b/pillar/id/redmine_infra_opensuse_org.sls index 7320858..3f2c283 100644 --- a/pillar/id/redmine_infra_opensuse_org.sls +++ b/pillar/id/redmine_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - progress.o.o roles: - web_progress + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/riesling2_infra_opensuse_org.sls b/pillar/id/riesling2_infra_opensuse_org.sls index 527a228..e57241d 100644 --- a/pillar/id/riesling2_infra_opensuse_org.sls +++ b/pillar/id/riesling2_infra_opensuse_org.sls @@ -7,5 +7,6 @@ grains: - mysql - wiki - wiki_readonly + reboot_safe: unknown salt_cluster: opensuse virt_cluster: bryce diff --git a/pillar/id/riesling_infra_opensuse_org.sls b/pillar/id/riesling_infra_opensuse_org.sls index 7dbe2d7..f4c71ff 100644 --- a/pillar/id/riesling_infra_opensuse_org.sls +++ b/pillar/id/riesling_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - en.o.o (all *.o.o wikis) roles: - wiki + reboot_safe: yes salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/rpmlint_infra_opensuse_org.sls b/pillar/id/rpmlint_infra_opensuse_org.sls index 885032f..03ac220 100644 --- a/pillar/id/rpmlint_infra_opensuse_org.sls +++ b/pillar/id/rpmlint_infra_opensuse_org.sls @@ -3,5 +3,6 @@ grains: country: de hostusage: - rpmlint.o.o + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/sarabi_infra_opensuse_org.sls b/pillar/id/sarabi_infra_opensuse_org.sls index 0680839..e05023a 100644 --- a/pillar/id/sarabi_infra_opensuse_org.sls +++ b/pillar/id/sarabi_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - elections.o.o roles: - web_elections + reboot_safe: yes salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/scar_infra_opensuse_org.sls b/pillar/id/scar_infra_opensuse_org.sls index 1837e0f..5f229c3 100644 --- a/pillar/id/scar_infra_opensuse_org.sls +++ b/pillar/id/scar_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - gate.o.o roles: - openvpn + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/simba_infra_opensuse_org.sls b/pillar/id/simba_infra_opensuse_org.sls index 139fa9b..3e5cd9d 100644 --- a/pillar/id/simba_infra_opensuse_org.sls +++ b/pillar/id/simba_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - gitlab runner roles: - worker_gitlab + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/tsp_infra_opensuse_org.sls b/pillar/id/tsp_infra_opensuse_org.sls index f901d47..c6506e2 100644 --- a/pillar/id/tsp_infra_opensuse_org.sls +++ b/pillar/id/tsp_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - future travel support program webapp replacement roles: - web_tsp + reboot_safe: unknown salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/id/water2_infra_opensuse_org.sls b/pillar/id/water2_infra_opensuse_org.sls index d769f48..713a613 100644 --- a/pillar/id/water2_infra_opensuse_org.sls +++ b/pillar/id/water2_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - en.o.o wiki search backend roles: - wikisearch + reboot_safe: unknown salt_cluster: opensuse virt_cluster: bryce diff --git a/pillar/id/water_infra_opensuse_org.sls b/pillar/id/water_infra_opensuse_org.sls index d1522a8..3837daf 100644 --- a/pillar/id/water_infra_opensuse_org.sls +++ b/pillar/id/water_infra_opensuse_org.sls @@ -5,5 +5,6 @@ grains: - en.o.o search backend roles: - wikisearch + reboot_safe: yes salt_cluster: opensuse virt_cluster: atreju diff --git a/pillar/valid_custom_grains.yaml b/pillar/valid_custom_grains.yaml index 9633f03..1fe9fa9 100644 --- a/pillar/valid_custom_grains.yaml +++ b/pillar/valid_custom_grains.yaml @@ -1,6 +1,10 @@ --- global: hostusage: [] + reboot_safe: + - yes + - no + - unknown salt_cluster: opensuse localized: de: