Merge "Use Swift venv Python interpreter"

This commit is contained in:
Jenkins
2016-02-02 16:27:07 +00:00
committed by Gerrit Code Review
4 changed files with 10 additions and 24 deletions

View File

@@ -51,7 +51,7 @@
- swift-rings-contents
- name: "build rings for account/container from contents files"
command: "/usr/bin/python /etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/{{ item }}.contents"
command: "/etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/{{ item }}.contents"
with_items:
- account
- container
@@ -65,7 +65,7 @@
- swift-rings-build
- name: "build rings for account/container from contents files"
command: "/usr/bin/python /etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/{{ item[0] }}.contents -r {{ item[1] }}"
command: "/etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/{{ item[0] }}.contents -r {{ item[1] }}"
with_nested:
- [ 'account', 'container' ]
- swift_managed_regions
@@ -79,7 +79,7 @@
- swift-rings-build
- name: "build rings for storage policies from contents files"
command: "/usr/bin/python /etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/object-{{ item.policy.index }}.contents"
command: "/etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/object-{{ item.policy.index }}.contents"
with_items:
- "{{ swift.storage_policies }}"
when: swift_managed_regions is not defined
@@ -92,7 +92,7 @@
- swift-rings-build
- name: "build rings for storage policies from contents files"
command: "/usr/bin/python /etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/object-{{ item[0].policy.index }}.contents -r {{ item[1] }}"
command: "/etc/swift/scripts/swift_rings.py -f /etc/swift/scripts/object-{{ item[0].policy.index }}.contents -r {{ item[1] }}"
with_nested:
- "{{ swift.storage_policies }}"
- swift_managed_regions

View File

@@ -44,7 +44,7 @@
- swift-rings-scripts
- name: "Ensure contents file matches ring after ring sync for account/container"
command: "/usr/bin/python /etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/{{ item }}.contents"
command: "/etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/{{ item }}.contents"
with_items:
- account
- container
@@ -58,7 +58,7 @@
- swift-rings-check
- name: "Ensure contents file matches ring after ring sync for account/container"
command: "/usr/bin/python /etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/{{ item[0] }}.contents -r {{ item[1] }}"
command: "/etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/{{ item[0] }}.contents -r {{ item[1] }}"
with_nested:
- [ 'account', 'container' ]
- swift_managed_regions
@@ -72,7 +72,7 @@
- swift-rings-check
- name: "Ensure contents file matches ring after ring sync for storage policies"
command: "/usr/bin/python /etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/object-{{ item.policy.index }}.contents"
command: "/etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/object-{{ item.policy.index }}.contents"
with_items:
- "{{ swift.storage_policies }}"
when: swift_managed_regions is not defined
@@ -85,7 +85,7 @@
- swift-rings-check
- name: "Ensure contents file matches ring after ring sync for storage policies"
command: "/usr/bin/python /etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/object-{{ item[0].policy.index }}.contents -r {{ item[1] }}"
command: "/etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/object-{{ item[0].policy.index }}.contents -r {{ item[1] }}"
with_nested:
- "{{ swift.storage_policies }}"
- swift_managed_regions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!{{ swift_venv_enabled | bool | ternary(swift_venv_bin + "/", "/usr/bin/env ") }}python
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,13 +19,6 @@ from os.path import exists
import os
{% if swift_venv_enabled | bool %}
activate_this = os.path.expanduser("{{ swift_venv_bin }}/activate_this.py")
execfile(activate_this, dict(__file__=activate_this))
{% endif %}
from swift.cli.ringbuilder import main as rb_main
import json

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!{{ swift_venv_enabled | bool | ternary(swift_venv_bin + "/", "/usr/bin/env ") }}python
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,13 +19,6 @@ from os.path import exists
import os
{% if swift_venv_enabled | bool %}
activate_this = os.path.expanduser("{{ swift_venv_bin }}/activate_this.py")
execfile(activate_this, dict(__file__=activate_this))
{% endif %}
import json
import pickle
import sys