Browse Source

Merge "Remove old repos from compute on preupgrade stage"

changes/20/386620/1
Jenkins Gerrit Code Review 3 years ago
parent
commit
64177e3a87
2 changed files with 29 additions and 1 deletions
  1. +18
    -0
      deployment/puppet/octane_tasks/files/delete_section.py
  2. +11
    -1
      deployment/puppet/octane_tasks/graphs/orig/preupgrade-compute.yaml

+ 18
- 0
deployment/puppet/octane_tasks/files/delete_section.py View File

@@ -0,0 +1,18 @@
#!/usr/bin/python

import yaml
import sys

target_file = sys.argv[1]
section = sys.argv[2]
subsection = sys.argv[3]

try:
with open(target_file,'r+') as f:
data = yaml.load(f)
del data[section][subsection]

with open(target_file,'w+') as f:
yaml.dump(data,f,default_flow_style=False)
except KeyError as e:
print "Failed to find key: {0}".format(e)

+ 11
- 1
deployment/puppet/octane_tasks/graphs/orig/preupgrade-compute.yaml View File

@@ -56,7 +56,7 @@
type: puppet
version: 2.1.0
groups: [compute]
requires: [cleanup_existing_repos, rsync_latest_puppet, override_repos_in_hiera]
requires: [cleanup_existing_repos, rsync_latest_puppet, override_repos_in_hiera, remove_hiera_section_repo_setup]
required_for: []
parameters:
puppet_manifest: /etc/fuel/octane/latest_modules/osnailyfacter/modular/fuel_pkgs/setup_repositories.pp
@@ -85,6 +85,16 @@
puppet_modules: /etc/fuel/octane/puppet:/etc/puppet/modules
timeout: 360

- id: remove_hiera_section_repo_setup
type: shell
version: 2.1.0
groups: [compute]
requires: [rsync_octane]
required_for: []
parameters:
cmd: python /etc/fuel/octane/puppet/octane_tasks/files/delete_section.py /etc/astute.yaml repo_setup repos
timeout: 60

- id: remove_hiera_override
type: shell
version: 2.1.0


Loading…
Cancel
Save