-
Notifications
You must be signed in to change notification settings - Fork 137
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] bastille list.sh should change the JID column to be a numeric value #193
Comments
To me the reason looks that the jail name is most common to remain static. |
Having the same hostname twice, again is redundant. Also as I mentioned I don’t want to be typing in entire jail names, in either case, which may be very very long to console into a jail. Having a numeric value saves a lot of typing to get into a jail via console. ‘Bastille console 4’ beats ‘bastille console verylongjailnamethatidontwantohavetotypeineverysingletimeiwanttogetintotheconsoleofit’. Seriously this is a usability issue. |
I understand your point. One thing I do wonder about, is it really needed to use bastille instead of |
Please talk to @cedwards before changing a main functionality. |
@hackacad good that you mentioned that. Personally I think showing the jail names is a good thing, this matches the default config structure for jails. Other hand, I know when working on running jails using the id's is faster. Since bastille is a wrapper around the jail tools it would be nice to match the commands as close as possible. My idea for |
Marius, that is what I was saying. I think you need both a "jailname" and a numeric "jail id". The former for easily seeing what the jails purpose is i.e "PostgreSQL12.1" the latter for making it much faster to get to the console of said jail. I'm sorry if I didn't make that clear. |
If we do a bastille list we get this:
This is the same output as jls -N doing a jls you get
So you get and the JID and the hostname. So change jls -N to jls on line 40 in list.sh should give you what you want. To make sure you can use a numeric in the bastille console command i changed console.sh with the following patch.
|
Jonanhen, The patch is great! I originally wanted to see about using any part of the hostname like iocage supports. If the hostname was 'PostgreSQL12' one could do P, Po, Pos, etc to console in. But the jid # is much shorter, and is unique. The way iocage does it is great if you just have a few jails. But if you have 50 instances of 'PostgreSQL12' that kind of ruins using the hostname. So using the jail ID # is unique and far shorter to get access to the jail. 'bastille console 2048' for instance. I think that patch works beautifully. Thank you, very much, for that. Now we just need to change 'jls -N' to 'jls' as the default for 'bastille list'. |
It is far from perfect. So be carefull.
Op zo 11 okt. 2020 03:52 schreef X86BSD <notifications@github.com>:
… Jonanhen,
The patch is great! I originally wanted to see about using any part of the
hostname like iocage supports. If the hostname was 'PostgreSQL12' one could
do P, Po, Pos, etc to console in.
But the jid # is much shorter, and is unique. The way iocage does it is
great if you just have a few jails. But if you have 50 instances of
'PostgreSQL12' that kind of ruins using the hostname.
So using the jail ID # is unique and far shorter to get access to the
jail. 'bastille console 2048' for instance.
I think that patch works beautifully. Thank you, very much, for that.
Now we just need to change 'jls -N' to 'jls' as the default for 'bastille
list'.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#193 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADU43DZVWFUYWTGEHDV7RTSKEFXVANCNFSM4MGHWKFA>
.
|
fix merged to main branch of bastille. no reason for this patch going forward. |
@bmac2 Out of curiosity, what has been changed? |
Sorry, I found #612 myself. |
Doing a 'bastille list' has a column for JID, which currently uses the jails name as it was set during creation.
The problem is that the JID column and the hostname column appear to use the same value.
This seems awkward and the JID imo should be a numeric value. The reason being, when you have really long hostname's doing a 'bastille console reallyreallyreallylonghostname' is horrible and painful. It would be much easier, make more sense, and be more productive to the user to be able to see the numeric value of the JID column for the jail and simply do 'bastile console 4' for instance. Instead of typing in a really long hostname I think most would rather type in a much smaller number to get into the console.
Upon looking into this it seems you just need to drop "-N" from list.sh when jls is called.
I'm not sure why you want to print the "Hostname" twice on output.
What's the reasoning here?
The text was updated successfully, but these errors were encountered: