components/openstack/neutron/files/neutron-server
branchs11u3-sru
changeset 6035 c9748fcc32de
parent 4625 18adb92d4193
child 6031 1aaf20a19738
--- a/components/openstack/neutron/files/neutron-server	Mon May 16 14:46:20 2016 +0200
+++ b/components/openstack/neutron/files/neutron-server	Fri May 20 17:42:29 2016 -0400
@@ -1,6 +1,6 @@
 #!/usr/bin/python2.7
 
-# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 #    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
@@ -18,9 +18,20 @@
 import sys
 
 import smf_include
+from subprocess import CalledProcessError, check_call
 
 
 def start():
+    # sync the database to have the Kilo schema
+    cmd = ["/usr/bin/neutron-db-manage", "--config-file",
+           "/etc/neutron/neutron.conf", "--config-file",
+           "/etc/neutron/plugins/evs/evs_plugin.ini", "upgrade", "head"]
+    try:
+        check_call(cmd)
+    except CalledProcessError as err:
+        print "Unable to create database for Neutron: %s" % err
+        sys.exit(smf_include.SMF_EXIT_ERR_CONFIG)
+
     # verify paths are valid
     for f in sys.argv[2:4]:
         if not os.path.exists(f) or not os.access(f, os.R_OK):