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

[ENHANCEMENT] provide a command line interface to the rcorder strings #747

Open
SchaichAlonso opened this issue Nov 24, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SchaichAlonso
Copy link

SchaichAlonso commented Nov 24, 2024

Is your feature request related to a problem? Please describe.
#629 has introduced rcorder(8) jail startup ordering support.

While something like

sed -i bak $'1i\\\n# PROVIDE: db\n' /usr/local/bastille/jails/db/jail.conf
sed -i bak $'1i\\\n# REQUIRE: db\n' /usr/local/bastille/jails/alfa/jail.conf

can be used to "enable" alfa's dependency on db in the example of #629 in a somewhat automated way , the /usr/local/bastille/jails/ prefix of the jail config file name passed to sed(1) is a deployment-specific setting tunable in bastille's config file.

Describe the solution you'd like
The bastille command line utility should have the ability to modify the jail.conf files and add/remove/printout the rcorder contraints of it's jails. For jails with multiple rcorder constraints, it should be able to remove the constraints individually, e.g.

# REQUIRE: db named
# REQUIRE: nginx
# PROVIDE: dyndns
dyndnsjail {
... 

after imaginary bastille rcorder dyndns remove require db should leave

# REQUIRE: named
# REQUIRE: nginx
# PROVIDE: dyndns
dyndnsjail {
...

Describe alternatives you've considered
Manually editing the jail configs... which is prone to mistakes.

Additional context
Eventually, the destruction of jails that have other jails depending on them should emit a diagnostic, as should the attempt to add a require statement that has no jail provide-ing it (yet).

@SchaichAlonso SchaichAlonso added the enhancement New feature or request label Nov 24, 2024
@bmac2 bmac2 added the help wanted Extra attention is needed label Dec 21, 2024
@tschettervictor
Copy link
Collaborator

I'm wondering whether it would be better to use "priority" as iocage does instead of the current rcorder implementation.

This could mean having an additional parameter but just thinking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants