Skip to content

Commit

Permalink
Merge pull request #566 from metal3-io-bot/cherry-pick-563-to-release…
Browse files Browse the repository at this point in the history
…-24.1

🐛SQLite: fix Ironic container restarting issue
  • Loading branch information
metal3-io-bot authored Sep 30, 2024
2 parents 12cad12 + e10acd6 commit 760254f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/ironic-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ run_ironic_dbsync()
done
else
# SQLite does not support some statements. Fortunately, we can just create
# the schema in one go instead of going through an upgrade.
ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema
# the schema in one go if not already created, instead of going through an 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
fi
}

Expand Down

0 comments on commit 760254f

Please sign in to comment.