Skip to content

Commit

Permalink
Merge "Ensure that upper constraints are always applied"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Oct 22, 2016
2 parents 5a76f0c + 46258cc commit 4bbb23a
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 0 deletions.
32 changes: 32 additions & 0 deletions playbooks/common-tasks/set-upper-constraints.yml
@@ -0,0 +1,32 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This set of tasks checks whether the repo is up yet. If it is it
# will use the compiled upper constraints available there. If it
# is not yet up, then it will use the upstream upper constraints
# for the SHA currently pinned.

- name: Test internal repo URL for the current upper constraints file
uri:
url: "{{ pip_install_upper_constraints }}"
method: "HEAD"
register: upper_constraints_check
failed_when: false

- name: Set pip install upper constraints
set_fact:
pip_install_upper_constraints: >-
http://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?id={{ requirements_git_install_branch | regex_replace(' #.*$','') }}
when: upper_constraints_check.status != 200
3 changes: 3 additions & 0 deletions playbooks/inventory/group_vars/all.yml
Expand Up @@ -46,6 +46,9 @@ pip_links:
- { name: "openstack_release", link: "{{ openstack_repo_url }}/os-releases/{{ openstack_release }}/" }
pip_lock_to_internal_repo: "{{ (pip_links | length) >= 1 }}"

# The upper constraints to apply to all pip installations
pip_install_upper_constraints: "{{ openstack_repo_url }}/os-releases/{{ openstack_release }}/requirements_constraints.txt"

## OpenStack source options
# URL for the frozen internal openstack repo.
repo_server_port: 8181
Expand Down
3 changes: 3 additions & 0 deletions playbooks/lxc-hosts-setup.yml
Expand Up @@ -19,6 +19,7 @@
max_fail_percentage: 20
user: root
pre_tasks:
- include: common-tasks/set-upper-constraints.yml
- name: Check the state of the default LXC service log directory
stat:
path: "/var/log/lxc"
Expand Down Expand Up @@ -49,6 +50,8 @@
rsyslog_client_config_name: "99-lxc-rsyslog-client.conf"
tags:
- rsyslog
vars_files:
- defaults/repo_packages/openstack_services.yml
vars:
pip_lock_to_internal_repo: False
tags:
Expand Down
5 changes: 5 additions & 0 deletions playbooks/repo-build.yml
Expand Up @@ -31,6 +31,9 @@
user: root
serial: 1
pre_tasks:

- include: common-tasks/set-upper-constraints.yml

- name: Load local packages
debug:
msg: "Loading Packages"
Expand Down Expand Up @@ -108,6 +111,8 @@
when:
- "groups['repo_servers_{{ ansible_architecture }}'] | length > 0"
- "inventory_hostname == groups['repo_servers_{{ ansible_architecture }}'][0]"
vars_files:
- defaults/repo_packages/openstack_services.yml
vars:
pkg_locations:
- ../
Expand Down
4 changes: 4 additions & 0 deletions playbooks/repo-server.yml
Expand Up @@ -20,6 +20,8 @@
user: root
pre_tasks:

- include: common-tasks/set-upper-constraints.yml

- name: Check if the git cache exists on deployment host
local_action:
module: stat
Expand Down Expand Up @@ -62,6 +64,8 @@
rsyslog_client_config_name: "99-lsyncd-rsyslog-client.conf"
tags:
- rsyslog
vars_files:
- defaults/repo_packages/openstack_services.yml
vars:
is_metal: "{{ properties.is_metal|default(false) }}"
tags:
Expand Down
4 changes: 4 additions & 0 deletions playbooks/unbound-install.yml
Expand Up @@ -18,13 +18,17 @@
- unbound_all
gather_facts: "{{ gather_facts | default(True) }}"
user: root
pre_tasks:
- include: common-tasks/set-upper-constraints.yml
roles:
- role: "unbound"
tags:
- unbound_server
- role: "system_crontab_coordination"
tags:
- "system-crontab-coordination"
vars_files:
- defaults/repo_packages/openstack_services.yml
vars:
is_metal: "{{ properties.is_metal|default(false) }}"

Expand Down

0 comments on commit 4bbb23a

Please sign in to comment.