Closed matthieumarrast closed 7 months ago
I tried to launch the command manually and it works:
[mfbase@4985b50695d2:~] $ psql -U plugin_foo -h /home/mfbase/var -p 7432 -f /tmp/alter_user.872 -v "ON_ERROR_STOP=1" metwork
ALTER ROLE
Same problem with container metwork/mfbaseplugins-centos8-buildimage:release_2.2
I don't reproduce with metwork/mfbaseplugins-centos8-buildimage:release_2.2
with a plugin produced inside the container with bootstrap_plugin.py
, make release
and copy of the plugin on /etc/metwork.config.d/mfbase/plugins/
I don't reproduce with
metwork/mfbaseplugins-centos8-buildimage:release_2.2
with a plugin produced inside the container withbootstrap_plugin.py
,make release
and copy of the plugin on/etc/metwork.config.d/mfbase/plugins/
Try with below commands:
docker run -it metwork/mfbaseplugins-centos8-buildimage:release_2.2 bash
su - mfbase
bootstrap_plugin.py create foo
cd foo/
make release
exit
mv /home/mfbase/foo/foo-0.0.1-1.metwork.mfbase.plugin /etc/metwork.config.d/mfbase/plugins/
service metwork start mfbase
su - mfbase
plugins.list
psql -U plugin_foo -p 7432 -h localhost
During mfbase initialization, a - (pre)Starting mfbase services...
is done with command mfbase.start NOINIT
During this start the plugin is installed whereas the metwork database is created afterward.
If we look in the mfbase.start
script we notice that when NOINIT is provided the plugins must not be installed.
It has been forgotten for mfbase.
Update mfbase.start
to not install plugins when NOINIT is provided:
if test ${RES} -eq 0 && test "${NOINIT}" = "0"; then
_install_or_update_configured_plugins.py
fi
Problem
Start container
metwork/mfbaseplugins-rocky9-image:release_2.2
Put a plugin plugin file in the provsionning feature
/etc/metwork.config.d/mfbase/plugins/
Start mfbase.
Check plugin is installed:
Try to connect to plugin's database:
Observation 1: during mfbase start, no log about the plugin installation.
Observation 2: psql commands remains in the
/tmp/
directory:-> the error happen during the
batch_psql
command, when the password is updated in https://github.com/metwork-framework/mfbase/blob/master/adm/_create_plugin_database.sh => why "metwork" database does not exist whereas it is created inmfbase.init
!!??Solution
To Be Determined
Action
Add an Unitary Test.