Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Don't start a jail on calling "iocage console" if it is not running already #856

Closed
Corvan opened this issue Feb 10, 2019 · 6 comments
Closed

Comments

@Corvan
Copy link
Contributor

Corvan commented Feb 10, 2019

Hey guys,

minor remark: similarly to this, iocage should IMHO not silently start a jail that is offline when I issue iocage console foo ...
Suggestion: error message "jail is down, use -f to force-start" or similar.

Kind regards,
Patrick

Originally posted by @pmhausen in #831 (comment)

@skarekrow
Copy link
Member

So the current behavior of exec and console do this, as I found it to be an inconvenience that if the jail wasn't running, my command still was not fired off. Changing that now could be a POLA violation as users may be abusing this for their own things, but I'm up for a discussion on why this is annoying behavior.

@igalic
Copy link
Contributor

igalic commented Feb 11, 2019

n.b.: in ioc we have a -s option for console and provision subcommands

@pmhausen
Copy link

OK, complete story ... :-)

I wanted to do iocage chroot into a shutdown jail. I use this frequently to do things like pkg install and similar with the hosts networking. Preparing "template" jails and stuff.
I got the error message that iocage chroot was deprecated and I should use iocage console.
Thinking, "hey, they merged the functions" I used iocage console when to my great surprise (think POLA) the jail was started ...

Kind regards
Patrick

@skarekrow
Copy link
Member

Fair enough :) Will implement this

skarekrow pushed a commit that referenced this issue Feb 15, 2019
Restores old behavior before the commands were folded into the lib.

Closes #856
FreeNAS Ticket: #75468
skarekrow pushed a commit that referenced this issue Feb 20, 2019
…le (#869)

* Require --force (-f) to start a jail when doing exec/console

Restores old behavior before the commands were folded into the lib.

Closes #856
FreeNAS Ticket: #75468

* Add usage in tests
@jsegaert
Copy link
Contributor

There's another occurrence where it may auto-start a jail, i.e. when getting a plugin property:
iocage get -P <property> <jail>

@skarekrow
Copy link
Member

@jsegaert Great catch as always, this is addressed in #878 👍

skarekrow added a commit that referenced this issue Sep 12, 2020
…le (#869)

* Require --force (-f) to start a jail when doing exec/console

Restores old behavior before the commands were folded into the lib.

Closes #856
FreeNAS Ticket: #75468

* Add usage in tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants