SOLVED after truenas reboot now all apps have muliple pods

Grinas

Contributor
Joined
May 4, 2017
Messages
174
So i have a number of apps some are created from docker images, some truenas scale apps and some truecharts app,

After restarting truenas some of the app now have 2 pods one which you can access and one which you can not. If i stop the app and start it again it again ends up with 2 pods one i can access and one i can not.

error i am getting is "This container does not accept shell access, try a different one."

PODS
pods-available.png

WORKING POD
workign-pod.png

NON WORKING POD ERROR
failed-pod.png
 

redders

Cadet
Joined
Sep 21, 2023
Messages
4
So i have a number of apps some are created from docker images, some truenas scale apps and some truecharts app,

After restarting truenas some of the app now have 2 pods one which you can access and one which you can not. If i stop the app and start it again it again ends up with 2 pods one i can access and one i can not.

error i am getting is "This container does not accept shell access, try a different one."

PODS
View attachment 70384
WORKING POD
View attachment 70385
NON WORKING POD ERROR
View attachment 70386
also having this issue, not sure if working as intended or if an actual issue but would be nice not to have many pods open for each app.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
I'm also experiencing this behavior.
The issue for me is that i use cronjobs to send commands to the apps, such as anti-virus scans to the clamav app.

Since the clamav app has 2 pods, my script sometimes fails to identify which of the 2 pods is the active one and exits with an error.

Does anybody knows how can the old pods be killed so the apps only have 1 pod? I have the feeling there is a setting somewhere to do this which I'm missing.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
I Think i just answered my own question.
In my system, the following settings stopped apps from being deployed with multiple pods.
1699353817472.png

1699353777714.png


After that, click save and start the app.
Now apps are deployed with 1 pod.

Disclaimer, I haven't being able to find good documentation about what these settings do. Therefore, i don't know if I'm doing something I'm not supposed to do.

I would appreciate any comments from people more knowledgeable than me on this.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
I was mistaken.
I rebooted the system and the apps deployed with 2 pods.

1699354647262.png


I don't know why it worked before but that is not important.

Can anybody help find out how to deploy apps without multiple pods?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I would try the TrueCharts Discord for theses questions. Also if I remember correctly, they advise not to use the "Stop all" checkbox and use heavyscript instead. But I am not 100% sure about this.

Lots of documentation here:
 

majorgear

Dabbler
Joined
Mar 13, 2012
Messages
36
I'm getting this behavior on some of my custom apps ( I don't use charts at all ). Do I need to reboot to remove the "extra" pod?
 

Grinas

Contributor
Joined
May 4, 2017
Messages
174
rebooting did not remove the extra pods for me. they would persist after all reboots.


#####RESOLUTION#####
How i resolved it was do a backup of my truenas config and do a clean truenas install.

Then restore the backup and i now no longer have multiple pods for some containers.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I'm also experiencing this behavior.
The issue for me is that i use cronjobs to send commands to the apps, such as anti-virus scans to the clamav app.

Since the clamav app has 2 pods, my script sometimes fails to identify which of the 2 pods is the active one and exits with an error.

Does anybody knows how can the old pods be killed so the apps only have 1 pod? I have the feeling there is a setting somewhere to do this which I'm missing.
Your script needs fixed then. You can check the status of the pod with an option. If you post the relevant part of the script here, I can probably enhance it for you. All of mine check the pod status as I've had that happen before too.
 

murzik

Dabbler
Joined
Jun 25, 2017
Messages
39
rebooting did not remove the extra pods for me. they would persist after all reboots.


#####RESOLUTION#####
How i resolved it was do a backup of my truenas config and do a clean truenas install.

Then restore the backup and i now no longer have multiple pods for some containers.
That did not work for me. Did clean install on 2 servers, but still have multiple pods after reboot.
 

dgrigo

Dabbler
Joined
Sep 22, 2022
Messages
29
I'm also experiencing this behavior.
The issue for me is that i use cronjobs to send commands to the apps, such as anti-virus scans to the clamav app.

Since the clamav app has 2 pods, my script sometimes fails to identify which of the 2 pods is the active one and exits with an error.

Does anybody knows how can the old pods be killed so the apps only have 1 pod? I have the feeling there is a setting somewhere to do this which I'm missing.
Add this before your script ?
This clean the not working pods :
sudo k3s kubectl get pod --all-namespaces | awk '{if ($4 != "Running") system ("sudo k3s kubectl -n " $1 " delete pods " $2 " --grace-period=0 " " --force ")}'

Personally I use it as post init script and after reboot I have only 1 pod running.
 
Last edited:
Top