jails Remove dying jail

How do you remove it ? jls -ad shows a lists of the same jail. jls doesn't output anything once the jail is stopped.
 
Yeah exactly. It displays dying jails even after running jail -r [ID] multiple times.. Only way to 'clear' it is to reboot the system.
 
Here's what it currently looks like:

Code:
[root@manis ~/staging]# jls
   JID  IP Address      Hostname                      Path
     8                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]# jls -ad
   JID  IP Address      Hostname                      Path
     1                  ukyo                          /vm/hosts/jail/ukyo
     8                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]# jail -vr 1
ukyo: removed
[root@manis ~/staging]# jls -ad  
   JID  IP Address      Hostname                      Path
     1                  ukyo                          /vm/hosts/jail/ukyo
     8                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]# jexec -U root 1 /bin/sh                   
jexec: jail 1 is dying
[root@manis ~/staging]#

So the active jail is '8' and the dying jail is '1'. And '1' is stuck infinitely until a reboot..
 
Here's what it currently looks like:

Code:
[root@manis ~/staging]# jls
   JID  IP Address      Hostname                      Path
     8                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]# jls -ad
   JID  IP Address      Hostname                      Path
     1                  ukyo                          /vm/hosts/jail/ukyo
     8                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]# jail -vr 1
ukyo: removed
[root@manis ~/staging]# jls -ad  
   JID  IP Address      Hostname                      Path
     1                  ukyo                          /vm/hosts/jail/ukyo
     8                  ukyo                          /vm/hosts/jail/ukyo

So the active jail is '8' and the dying jail is '1'. And '1' is stuck infinitely until a reboot..
They do both point to same path and have same hostnames. 🤔 Maybe that's the cause of the problem. Can you try killing one of them via JID value if possible? I don't know how to do it, though.
 
Btw, I don't have allow.dying configure in either /etc/jail.conf or /etc/jail.conf.d/ukyo.conf
 
They do both point to same path and have same hostnames. 🤔 Maybe that's the cause of the problem. Can you try killing one of them via JID value if possible? I don't know how to do it, though.
Like this ?
Code:
[root@manis ~/staging]# jexec 1 kill -TERM -1   
jexec: jail 1 is dying
[root@manis ~/staging]# jexec 1 kill -KILL -1
jexec: jail 1 is dying
[root@manis ~/staging]#
 
Sorry, you already killed a jail via JID value already in your #6th post, i didn't see it. Maybe try not to have unique two jails? I don't have much jail knowledge but i think it's causing because your jails are kind of unique.

Code:
jail -vr 1
 
It get's worst :>

Code:
[root@manis ~/staging]# service jail stop ukyo                                                                             Stopping jails: ukyo.
[root@manis ~/staging]# ps auxJ ukyo                                                 
ps: Invalid jail id: ukyo       
[root@manis ~/staging]# jls
   JID  IP Address      Hostname                      Path                                           
[root@manis ~/staging]# jls -ad                  
   JID  IP Address      Hostname                      Path
     1                  ukyo                          /vm/hosts/jail/ukyo
     8                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]# service jail start ukyo
Starting jails: ukyo.
[root@manis ~/staging]# jls
   JID  IP Address      Hostname                      Path
     9                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]# jls -ad
   JID  IP Address      Hostname                      Path
     1                  ukyo                          /vm/hosts/jail/ukyo
     8                  ukyo                          /vm/hosts/jail/ukyo
     9                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]# jail -vr 1 8
ukyo: removed
ukyo: removed
[root@manis ~/staging]# jls -ad
   JID  IP Address      Hostname                      Path
     1                  ukyo                          /vm/hosts/jail/ukyo
     8                  ukyo                          /vm/hosts/jail/ukyo
     9                  ukyo                          /vm/hosts/jail/ukyo
[root@manis ~/staging]#
[root@manis ~/staging]# ps auxJ 1
ps: Invalid jail id: 1
[root@manis ~/staging]# ps auxJ 8
ps: Invalid jail id: 8
[root@manis ~/staging]#
 
Sorry, you already killed a jail via JID value already in your #6th post, i didn't see it. Maybe try not to have unique two jails? I don't have much jail knowledge but i think it's causing because your jails are kind of unique.

Code:
jail -vr 1
I only have one jail..what is you see is a dying JID of the same jail instance. And when I start the jail, it just uses a new JID while the previous JID's remain in dying state and get's cleared upon a reboot.
 
Back
Top