package-manager
package-manager copied to clipboard
Plugin packages installed in bro clusters may deploy broken symlinks
Plugins contain unconditionally loaded scripts that enable basic functionality, which are handled differently than non-plugin package's bro scripts. When plugin packages are installed in a bro cluster, there is the potential for the cluster to fail to start because those scripts are placed in $prefix/bro/lib/bro/plugins/packages/$package_name/scripts
, which is a symlink to the state_dir
. As far as I'm aware, bro-pkg
does not replicate information to other cluster members.
I would expect either bro-pkg
or broctl
(via install
) to transparently handle this situation, but I also would not expect those tools to touch a user's home directory.
In my situation, to fix this issue I chose to set state_dir
to $prefix/bro/lib/bro-pkg
, which is then automatically deployed by broctl install
. I'm not sure what guarantees bro-pkg
has, but for clustered environment I feel that this is a fairly clean solution (since all clusters that I'm aware of depend on broctl
). I would not be a fan of replicating data stored in state_dir
uniformly, given the current default is ~/.bro-pkg
, but I am open to other solutions.