Open gluesmith2021 opened 9 months ago
Thank you for your detailed analysis!
Indeed this is an oversight. As you might have experienced yourself, it was really cumbersome to create the Dockerfiles and make them work with the installer.
In the long run I'd like to eliminate the installer but that is far future an no one is working on this. What makes this hard is that we want to support more than the latest ubuntu distribution, but still need the newest packages. Another thing are the docker images which need to be build.
I think that many of the things the installer does can be replaced by packaging the things ourselves and publish them in a PPA but I don't currently have time for that.
Regarding your problem we can probably fix this but this won't make the installer more docker firendly/less hacky. So while your problem will be solved the underlying problem remains.
I'd suggest to add a parameter to AbstractPluginInstaller
to skip the distribution check.
Are you willing to open a PR?
Observed Issue
After following instruction from readme, FACT does run but some analysis plugins don't because they require docker images that can't be pulled. For instance,
file_system_metadata
fails with the following error:Identified Cause
Plugins never get a chance to be installed by
start.py pull
. So for the above plugin example, the required localfact/fs_metadata
docker image is never built by the plugin code as it should.This happens because
distribution_check(allow_unsupported=False)
is called for any plugin installer being instantiated.distribution_check
then callssys.exit(1)
becausefact-core-script
docker image is based on the "unsupported" Alpine.In details
(code snippets below are from
fact-core-script
image):start.py pull
on the host runs/opt/FACT_core/src/install.py --backend-docker-images --frontend-docker-images
in fact-core-script container.In
install.py
, methodinstall()
has the following :skip_docker=False
,none_chosen=True
, and both checkedargs.xyz
areTrue
as well.check_distribution
emits warnings about the unsupported distribution (because the script docker image uses an "unsupported" Alpine), that we can ignore (as mentioned in issue #24 among others)install_docker_images()
which in turns callbackend_install_docker_images()
: runs finebackend_install_plugin_docker_images()
: fails!_install_plugins()
ininstall/backend.py
withinstall_docker_images()
for each plugin found in theplugins
folder.Now, in the above example, with
file_system_metadata
plugin, there is:The base class
AbstractPluginInstaller
is initialized with:Here
distribution=None
socheck_distribution()
is called with default parameters, that ischeck_distribution(allow_unsupported=False)
Then the distribution check fails with
This obviously occurs on the first plugin installer that is instantiated, and the whole installation aborts at that point.
While a human could ignore "unsupported distribution" warnings as mentioned in #24 , the installer does not, and aborts. It does not seem to be the "intended behavior" as some plugins can't run if they are not previously installed from the above.