20938742 Change certain parameters pertaining to zfssa drivers in cinder.conf s11u2-sru
authorThanukrishnamurthy Madhusudhanan<thanukrishnamurthy.madhusudha@oracle.com>
Wed, 29 Apr 2015 14:14:32 -0600
branchs11u2-sru
changeset 4216 27e9e7478812
parent 4215 c0c7615b4511
child 4217 631d20122b9c
20938742 Change certain parameters pertaining to zfssa drivers in cinder.conf
components/openstack/cinder/files/cinder-upgrade
components/openstack/glance/files/glance-upgrade
--- a/components/openstack/cinder/files/cinder-upgrade	Wed Apr 29 12:54:24 2015 -0700
+++ b/components/openstack/cinder/files/cinder-upgrade	Wed Apr 29 14:14:32 2015 -0600
@@ -43,6 +43,9 @@
     ('DEFAULT', 'logdir'): ('DEFAULT', 'log_dir'),
     ('DEFAULT', 'num_iscsi_scan_tries'):
         ('DEFAULT', 'num_volume_device_scan_tries'),
+    ('DEFAULT', 'zfssa_host'): ('DEFAULT', 'san_ip'),
+    ('DEFAULT', 'zfssa_auth_user'): ('DEFAULT', 'san_login'),
+    ('DEFAULT', 'zfssa_auth_password'): ('DEFAULT', 'san_password'),
     ('DEFAULT', 'db_backend'): ('database', 'backend'),
     ('DEFAULT', 'sql_connection'): ('database', 'connection'),
     ('DATABASE', 'sql_connection'): ('database', 'connection'),
--- a/components/openstack/glance/files/glance-upgrade	Wed Apr 29 12:54:24 2015 -0700
+++ b/components/openstack/glance/files/glance-upgrade	Wed Apr 29 14:14:32 2015 -0600
@@ -117,10 +117,12 @@
         sys.exit(smf_include.SMF_EXIT_ERR_FATAL)
 
     cursor = db.cursor()
+    cursor.execute("SET foreign_key_checks = 0")
     cursor.execute("ALTER DATABASE %s CHARACTER SET = 'utf8'" %
                    engine.url.database)
     cursor.execute("ALTER DATABASE %s COLLATE = 'utf8_general_ci'" %
                    engine.url.database)
+    cursor.execute("SET foreign_key_checks = 1")
     cursor.execute("SHOW tables")
     res = cursor.fetchall()
     if res:
@@ -172,6 +174,7 @@
         for key, value in section_items:
             # keep a copy of the old value
             oldvalue = value
+            oldsection = section
 
             if mapping is not None:
                 section, key = update_mapping(section, key, mapping)
@@ -202,6 +205,7 @@
             if not new.has_option(section, key) or \
                '%SERVICE' in new.get(section, key):
                 new.set(section, key, value)
+            section = oldsection
 
     # copy the old conf file to a backup
     today = datetime.now().strftime("%Y%m%d%H%M%S")