Skip to content

Commit

Permalink
Revert "Bug 1902653: Wait for expected number of drivers starting API"
Browse files Browse the repository at this point in the history
  • Loading branch information
dtantsur committed Feb 25, 2021
1 parent 0a289d7 commit e6df0a6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions scripts/runironic-api
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,4 @@ export IRONIC_DEPLOYMENT="API"

. /bin/configure-ironic.sh

# Wait for ironic to load all expected drivers
# the DB query returns the number of unique hardware_type in the conductor_hardware_interfaces table
CONF_DRIVERS=$(crudini --get /etc/ironic/ironic.conf DEFAULT enabled_hardware_types | tr ',' '\n' | wc -l)
while true ; do
DB_DRIVERS=$(mysql -p$MARIADB_PASSWORD -u ironic -h 127.0.0.1 ironic -e 'select count( DISTINCT hardware_type) from conductor_hardware_interfaces' -B -s --ssl || echo 0)
[ "$DB_DRIVERS" -ge "$CONF_DRIVERS" ] && break
echo "Waiting for $CONF_DRIVERS expected drivers"
sleep 5
done

exec /usr/bin/ironic-api --config-file /usr/share/ironic/ironic-dist.conf ${IRONIC_CONFIG_OPTIONS}

0 comments on commit e6df0a6

Please sign in to comment.