Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foreman-puppet: don't run db:migrate in postinst #7225

Merged
merged 1 commit into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions plugins/ruby-foreman-puppet/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ruby-foreman-puppet (2.0.0~alpha.2-2) stable; urgency=low

* don't run db:migrate in postinst

-- Evgeni Golov <evgeni@debian.org> Thu, 04 Nov 2021 15:47:06 +0100

ruby-foreman-puppet (2.0.0~alpha.2-1) stable; urgency=low

* 2.0.0~alpha.2 released
Expand Down
15 changes: 4 additions & 11 deletions plugins/ruby-foreman-puppet/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,10 @@ else
fi
fi

# DB migrate/seed after install
if [ -f /usr/share/foreman/config/database.yml ]; then
if [ ! -z "${DEBUG}" ]; then
/usr/sbin/foreman-rake db:migrate || true
/usr/sbin/foreman-rake db:seed || true
/usr/sbin/foreman-rake apipie:cache:index || true
else
/usr/sbin/foreman-rake db:migrate >> $LOGFILE 2>&1 || true
/usr/sbin/foreman-rake db:seed >> $LOGFILE 2>&1 || true
/usr/sbin/foreman-rake apipie:cache:index >> $LOGFILE 2>&1 || true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, I guess this should still happen?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think we should keep, I wondered if this should be the plugin version of it like RPM?

https://github.com/theforeman/foreman-packaging/blob/rpm/develop/packages/foreman/foreman/foreman.spec#L911

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah (and no), the line you're linking to is the compile step, not the index step

fi
if [ ! -z "${DEBUG}" ]; then
/usr/sbin/foreman-rake apipie:cache:index || true
else
/usr/sbin/foreman-rake apipie:cache:index >> $LOGFILE 2>&1 || true
fi

PLUGIN_ROOT=`$BUNDLE show $PLUGIN`
Expand Down