Skip to content

Commit

Permalink
Merge pull request #563 from blallau/fix562
Browse files Browse the repository at this point in the history
🐛SQLite: fix Ironic container restarting issue
  • Loading branch information
metal3-io-bot authored Sep 20, 2024
2 parents 7dfbbdf + fcceb4a commit 181b3a9
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 181b3a9

Please sign in to comment.