snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.5k stars 3.07k forks source link

Cluster Kubernetes #10915

Open Luis-P-C opened 2 years ago

Luis-P-C commented 2 years ago

Debug mode

Describe the bug

Hello,

I've configured a SnipeIT K8s Cluster. Everything its working OK but I check if I configure two or more pods the user sessions ends sudently, and without sense.

With just one pod, like I said, everything its working fine and the session dosent expire.

This "issue" its because snipeIT dont allow Cluster mode??

Reproduction steps

1.Configure two or more PODs Sessions expire sudently 2.Configure one pod All OK

Expected behavior

Configure a Kubernetes Cluster with two or more Pods

Screenshots

No response

Snipe-IT Version

v6.0.0-RC-5 build 6772 (g7cbcd2d95)

Operating System

ubuntu

Web Server

Apache

PHP Version

7.4.3

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

welcome[bot] commented 2 years ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

snipe commented 2 years ago

AFAIK, we don't do anything to not allow cluster mode. Using Snipe-IT on K8s is a pretty uncommon use case, so we don't optimize for it either.

Luis-P-C commented 2 years ago

AFAIK, we don't do anything to not allow cluster mode. Using Snipe-IT on K8s is a pretty uncommon use case, so we don't optimize for it either.

Hello Snipe! Thanks for your reply.

I am doing a K8s Cluster for a study project for my university. If everything goes well, I would like to implement it in production in my work.

I have checked this "bug" and I would just like to share my experience in case someone else has it.

Thanks a lot for your help

Regards,

uberbrady commented 2 years ago

You would need to use a different session back-end - probabaly Redis or Memcache. Though "Database" would work too. See: https://laravel.com/docs/9.x/session#configuration - you should be able to twiddle some .env vars and then the sessions will live in a centralized location.

Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
uberbrady commented 2 years ago

(the default session store is file-based so that won't work if you have more than one application server)

Luis-P-C commented 2 years ago

(the default session store is file-based so that won't work if you have more than one application server)

Hi! Thanks a lot for your support!

Im going to check what you comment about different session back-end :)

Thnks