From 908452776b4105b6ab6ced8e90ee468a198a65b9 Mon Sep 17 00:00:00 2001 From: Kevin Lingle Date: Fri, 18 Dec 2020 15:21:12 -0500 Subject: [PATCH] Merge juniper release to main branch --- CHANGELOG.md | 17 +++++++++++++++-- playbooks/viya-mmsu/README.md | 13 +++++++++++++ playbooks/viya-mmsu/viya-services-stop.yml | 8 ++++---- playbooks/viya-mmsu/viya-services-vars.yml | 3 ++- playbooks/viya-mmsu/viya-svs.sh | 12 ++++++++++-- .../archive_obsolete_log_folders.yml | 2 +- .../pre_upgrade/delete_mmlibs_caslib.yml | 1 + 7 files changed, 46 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bde8b4c..c81190a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,21 @@ # Changelog for SAS Viya ARK +## Viya35-ark-1.11 - December 18, 2020 +- **Summary**: + Bug fixes and a couple of enhancments. +- Issues addressed: + - SAS Multi-Machine Service Utilties + - VIYAARK-233 - MMSU: playbook encountered issue with starting sas-viya-spawner-default in multi-tenancy env + - VIYAARK-234 - MMSU: provide better readable information for status in multi-tenancy env + - VIYAARK-236 - MMSU: provide a check variable to disable pause timer when running stop playbook + - SAS Viya Upgrade Tasks Playbooks + - VIYAARK-41 - pre_upgrade fails if Viya 3.5 software order adds ModelServices + - VIYAARK-222 - Archive Obsolete Log Folders Playbook Fails on Power Linux +- Ansible Support: Ansible 2.8 - Ansible 2.10 + + + ## Viya35-ark-1.10 - October 20, 2020 - **Summary**: Changing range of Ansible versions supported. Enhancing obsolete log archiving. @@ -12,8 +27,6 @@ - VIYAARK-104 - Produce summary report for Archive Obsolete Folders playbook. - Ansible Support: Ansible 2.8 - Ansible 2.10 - - ## Viya35-ark-1.9 - September 30, 2020 - **Summary**: diff --git a/playbooks/viya-mmsu/README.md b/playbooks/viya-mmsu/README.md index 401f0f9..2fee1dc 100644 --- a/playbooks/viya-mmsu/README.md +++ b/playbooks/viya-mmsu/README.md @@ -64,5 +64,18 @@ ansible-playbook viya-ark/playbooks/viya-mmsu/viya-services-restart.yml ``` enable_stray_cleanup: true ``` +* When running playbook viya-services-stop.yml, there is a pause message for the stop confirmation: +``` + TASK [WARNING: All Viya services are about to be stopped!] + Pausing for 10 seconds + (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort) + [WARNING: All Viya services are about to be stopped!] + Press 'ctl+c' to interrupt the process. If no response, playbook will continue after 10 seconds: +``` + User may modify viya-services-vars.yml file as following to disable the pause timer or pass the variable through the command line. +``` + enable_pause_timer: false +``` + Copyright (c) 2019-2020, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 diff --git a/playbooks/viya-mmsu/viya-services-stop.yml b/playbooks/viya-mmsu/viya-services-stop.yml index 481520e..88f8b31 100644 --- a/playbooks/viya-mmsu/viya-services-stop.yml +++ b/playbooks/viya-mmsu/viya-services-stop.yml @@ -17,7 +17,7 @@ pause: seconds: "{{stop_pause_timer}}" prompt: "Press 'ctl+c' to interrupt the process. If no response, playbook will continue after {{stop_pause_timer}} seconds" - when: not ansible_check_mode + when: not ansible_check_mode and enable_pause_timer|bool == true - import_playbook: ../common/handle_hostgroup_hyphens.yml tags: @@ -53,12 +53,12 @@ - block: - - name: Stop SAS microservices - script: viya-svs.sh stopms - - name: Stop SAS multi-tenant services script: viya-svs.sh stopmt + - name: Stop SAS microservices + script: viya-svs.sh stopms + any_errors_fatal: true when: psflag.stdout != "" and not ansible_check_mode and enable_svs_alternative|bool != true diff --git a/playbooks/viya-mmsu/viya-services-vars.yml b/playbooks/viya-mmsu/viya-services-vars.yml index 9225b85..4ce9d78 100644 --- a/playbooks/viya-mmsu/viya-services-vars.yml +++ b/playbooks/viya-mmsu/viya-services-vars.yml @@ -8,11 +8,12 @@ # SPDX-License-Identifier: Apache-2.0 # --- -svs_label: 3.5.20200415 +svs_label: 3.5.20201204 ######################################### # Variables used in playbooks ######################################### consul_retry_count: 2 #retry counter +enable_pause_timer: true #pause timer enable_stray_cleanup: false #stray processes cleanup enable_svs_alternative: false #start/stop microservices using alternative script log_diskspace_minimum: 2097152000 #2GB diff --git a/playbooks/viya-mmsu/viya-svs.sh b/playbooks/viya-mmsu/viya-svs.sh index c857b83..087c60c 100755 --- a/playbooks/viya-mmsu/viya-svs.sh +++ b/playbooks/viya-mmsu/viya-svs.sh @@ -35,7 +35,7 @@ do_stopcas() do_stop() { local LIST=$* - NLIST= + local NLIST= for p in $LIST do if [[ $p =~ -viya-all-services|-consul-|-vault-|-httpproxy-|-rabbitmq-|-sasdatasvrc- ]]; then @@ -51,6 +51,13 @@ do_stop() do_startmt() { local LIST=$(ls sas-*-all-services 2>/dev/null| grep -v '\-viya\-') + if [[ -x "sas-viya-runlauncher-default" ]]; then + LIST="sas-viya-runlauncher-default $LIST" + fi + if [[ -x "sas-viya-spawner-default" ]]; then + LIST="sas-viya-spawner-default $LIST" + fi + do_start_common "$LIST" } @@ -152,7 +159,8 @@ do_svastatus() for f in $LIST do - /etc/init.d/$f status|sed "s|sas-services completed|$f completed|" + /etc/init.d/$f status| sed "s|sas-viya-all-services completed|$f completed|;\ + s|sas-services completed|$f completed|" done return 0 } diff --git a/playbooks/viya-upgrade/archive_obsolete_log_folders.yml b/playbooks/viya-upgrade/archive_obsolete_log_folders.yml index 8b9af77..a719573 100755 --- a/playbooks/viya-upgrade/archive_obsolete_log_folders.yml +++ b/playbooks/viya-upgrade/archive_obsolete_log_folders.yml @@ -159,7 +159,7 @@ loop: "{{folders_to_archive}}" register: package_status_rhel ignore_errors: true - when: ansible_distribution == redhat_os_name|string or ansible_distribution == oracle_os_name|string + when: ansible_os_family == redhat_os_name|string or ansible_os_family == oracle_os_name|string check_mode: no - name: "Create archive directory, {{viya_log_archive_path}}, if it doesn't exist" diff --git a/playbooks/viya-upgrade/pre_upgrade/delete_mmlibs_caslib.yml b/playbooks/viya-upgrade/pre_upgrade/delete_mmlibs_caslib.yml index a06751a..7f71450 100644 --- a/playbooks/viya-upgrade/pre_upgrade/delete_mmlibs_caslib.yml +++ b/playbooks/viya-upgrade/pre_upgrade/delete_mmlibs_caslib.yml @@ -242,6 +242,7 @@ - SAS_ADMIN_PASSWORD | default('') != '' - mm_exists is defined - mm_exists == true + - model_rep_version is defined - model_rep_version is version(modelrepo_shipped_version, '<') # If credentials were not provided, log a debug message and add an item to the summary