components/openstack/swift/patches/manager.patch
author Drew Fisher <drew.fisher@oracle.com>
Fri, 13 Jun 2014 09:10:23 -0700
branchs11-update
changeset 3178 77584387a894
parent 3135 0a68f5e884e0
child 3998 5bd484384122
permissions -rw-r--r--
PSARC/2014/207 OpenStack Glance Update to Havana PSARC/2014/208 OpenStack Cinder Update to Havana PSARC/2014/209 OpenStack Keystone Update to Havana PSARC/2014/210 OpenStack Nova Update to Havana 18416146 Neutron agents (L3 and DHCP) should cleanup resources when they are disabled 18562372 Failed to create a new project under Horizon 18645763 ZFSSA Cinder Driver support 18686327 evs agent silently ignores user-specified pool allocation ranges 18702697 fibre channel volumes should be supported in the cinder volume driver 18734289 nova won't terminate failed kz deployments 18738371 cinder-volume:setup should account for commented-out zfs_volume_base 18738374 cinder-volume:setup should check for existence of configuration file 18826190 nova-compute fails due to nova.utils.to_bytes 18855698 Update OpenStack to Havana 2013.2.3 18855710 Update python-cinderclient to 1.0.9 18855743 Update python-keystoneclient to 0.8.0 18855754 Update python-neutronclient to 2.3.4 18855764 Update python-novaclient to 2.17.0 18855793 Update python-swiftclient to 2.1.0 18856992 External networks can be deleted even when floating IP addresses are in use 18857784 bake in some more openstack configuration 18884923 Incorrect locale facets in python modules for openstack 18913890 the error in _get_view_and_lun may cause the failure of deleting volumes 18943044 Disable 'Security Groups' tab in Horizon dashboard 18969275 problem in SERVICE/KEYSTONE
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3135
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     1
We want to put the swift server executables in /usr/lib/swift, which means
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     2
that we need to be able to call them from there.  We do so by using the
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     3
"executable" keyword argument to subprocess.Popen() (and allow for it to be
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     4
mocked out during testing).
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     5
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     6
This patch is not suitable for pushing upstream.
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     7
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     8
diff --git a/swift/common/manager.py b/swift/common/manager.py
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     9
--- a/swift/common/manager.py
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    10
+++ b/swift/common/manager.py
3178
77584387a894 PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents: 3135
diff changeset
    11
@@ -534,7 +534,8 @@ class Server():
3135
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    12
                 re_out = subprocess.PIPE
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    13
             else:
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    14
                 re_out = open(os.devnull, 'w+b')
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    15
-        proc = subprocess.Popen(args, stdout=re_out, stderr=re_err)
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    16
+        proc = subprocess.Popen(args, stdout=re_out, stderr=re_err,
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    17
+            executable='/usr/lib/swift/' + self.cmd)
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    18
         pid_file = self.get_pid_file_name(conf_file)
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    19
         write_file(pid_file, proc.pid)
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    20
         self.procs.append(proc)
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    21
diff --git a/test/unit/common/test_manager.py b/test/unit/common/test_manager.py
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    22
--- a/test/unit/common/test_manager.py
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    23
+++ b/test/unit/common/test_manager.py
3178
77584387a894 PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents: 3135
diff changeset
    24
@@ -858,7 +858,7 @@ class TestServer(unittest.TestCase):
3135
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    25
         class MockProc():
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    26
 
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    27
             def __init__(self, pid, args, stdout=MockProcess.NOTHING,
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    28
-                         stderr=MockProcess.NOTHING):
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    29
+                         stderr=MockProcess.NOTHING, executable=None):
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    30
                 self.pid = pid
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    31
                 self.args = args
0a68f5e884e0 PSARC 2014/050 OpenStack Swift (OpenStack Object Storage Service)
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    32
                 self.stdout = stdout