diff --git a/manifests/function/baremetal-operator/entrypoint/ironic-entrypoint b/manifests/function/baremetal-operator/entrypoint/ironic-entrypoint index ffd84b808..ce91e3839 100644 --- a/manifests/function/baremetal-operator/entrypoint/ironic-entrypoint +++ b/manifests/function/baremetal-operator/entrypoint/ironic-entrypoint @@ -2,7 +2,11 @@ cp -f /shared/ironic.conf /etc/ironic/ironic.conf -ironic-dbsync --config-file /etc/ironic/ironic.conf upgrade +DB_VERSION="$(ironic-dbsync --config-file /etc/ironic/ironic.conf version)" +if [ "${DB_VERSION}" == "None" ]; +then + ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema +fi /usr/bin/ironic-conductor & /usr/bin/ironic-api &