components/openstack/cinder/files/cinder-volume
branchs11-update
changeset 3077 3e8d5f02f4a0
parent 3028 5e73a3a3f66a
child 4049 150852e281c4
--- a/components/openstack/cinder/files/cinder-volume	Mon Apr 14 14:24:04 2014 -0700
+++ b/components/openstack/cinder/files/cinder-volume	Tue Apr 15 07:31:13 2014 -0700
@@ -14,40 +14,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import ConfigParser
 import os
 
 import smf_include
 
-from subprocess import CalledProcessError, Popen, PIPE, check_call
-
 
 def start():
-    """ checks cinder's conf file for the ZFSISCSIDriver.  If it's found, make
-    sure svc:/network/iscsi/target:default is online.
-
-    """
-    parser = ConfigParser.ConfigParser()
-    parser.read("/etc/cinder/cinder.conf")
-    driver = parser.get("DEFAULT", "volume_driver")
-    if driver == "cinder.volume.drivers.solaris.zfs.ZFSISCSIDriver":
-        iscsi_svc = "svc:/network/iscsi/target:default"
-        cmd = ["/usr/bin/svcs", "-H", "-o", "state", iscsi_svc]
-        try:
-            p = Popen(cmd, stdout=PIPE, stderr=PIPE)
-            output, error = p.communicate()
-        except CalledProcessError:
-            print "%s not found.  Is it installed?" % iscsi_svc
-            return smf_include.SMF_EXIT_ERR_CONFIG
-
-        if output.strip() != "online":
-            cmd = ["/usr/sbin/svcadm", "enable", "-rs", iscsi_svc]
-            try:
-                check_call(cmd)
-            except CalledProcessError as err:
-                print "enabling %s failed:  %s" % (iscsi_svc, err)
-                return smf_include.SMF_EXIT_ERR_CONFIG
-
     smf_include.smf_subprocess("/usr/bin/pfexec /usr/lib/cinder/cinder-volume")
 
 if __name__ == "__main__":