Skip to content
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

enable a "bad" feature make the whole tenant down #17549

Open
canadacubachina opened this issue Mar 3, 2025 · 8 comments
Open

enable a "bad" feature make the whole tenant down #17549

canadacubachina opened this issue Mar 3, 2025 · 8 comments
Labels

Comments

@canadacubachina
Copy link
Contributor

Describe the bug

when i enable a feature which produces error, then the whole tenant get 500 in spite of diff. URLs.
Interesting thing , my Default site always get 500, but other tenant site still work smoothly.

Orchard Core version

2.1.4

To Reproduce

Expected behavior

at least , I can login to the admin panel to disable the feature

Logs and screenshots

Image

@hishamco
Copy link
Member

hishamco commented Mar 4, 2025

It depends. What is the issue that causes the crash?

@Piedone
Copy link
Member

Piedone commented Mar 5, 2025

Since you can write any code in a module, you can also write code that e.g. causes an unhandled exception on every page load.

What do you think can be a solution?

@canadacubachina
Copy link
Contributor Author

I run it locally with SQLite , and enable the feature , it worked very well without exception, got green notification on the top

@hishamco
Copy link
Member

hishamco commented Mar 6, 2025

Check the logs

@Piedone
Copy link
Member

Piedone commented Mar 7, 2025

I run it locally with SQLite , and enable the feature , it worked very well without exception, got green notification on the top

Sorry, but this doesn't help to understand your suggestion for cases when a module contains seriously breaking. To reiterate:

Since you can write any code in a module, you can also write code that e.g. causes an unhandled exception on every page load.
What do you think can be a solution?

@canadacubachina
Copy link
Contributor Author

Since you can write any code in a module, you can also write code that e.g. causes an unhandled exception on every page load.

What do you think can be a solution?

Actually , I answered your question which meant that my code was no problem , at least locally.

the stange thing is even clicking enable a feature get 500 for that feature , it should not influence the whole got 500 with any urls. orchardcore should isolate it.
another possibilty is my azure is on free tier, but this also does not make sense to me. if it is too small unstable server, it will not give out 500

@Piedone
Copy link
Member

Piedone commented Mar 7, 2025

The fundamental problem, or circumstance, is, that when you extend OC with your module, you implement part of an ASP.NET Core app in C#. OC only provides you with the way to selectively enable/disable that part, but otherwise, you have all the power of C# and .NET available. Thus, you can ultimately break that app, since your code runs as part of the app, it's not an isolated environment like an Android app.

But the specific case of getting an exception right there on the features screen after enabling a feature (and similarly for themes) is something we could guard against, and roll back the enable. This would at least prevent a module from breaking the app immediately in a way that you can't recover from the admin.

@canadacubachina
Copy link
Contributor Author

canadacubachina commented Mar 8, 2025

Now i can verify that this is not the issue from my module.
this time, I enable OrchardCore_DataProtection_Azure, perhaps I did not provide OrchardCore__OrchardCore_DataProtection_Azure__BlobName, it gave out An error occurred while executing this request.
But now , even go to https://managingportal.azurewebsites.net/ecommerce/admin
or https://managingportal.azurewebsites.net/ecommerce
it always show: An error occurred while executing this request. make the whole tenant down which is serious issue.
My default is still running
ecommerce is my tenant.
Image

@canadacubachina canadacubachina changed the title enable a bad feature make the whole tenant down enable a "bad" feature make the whole tenant down Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants