-
Notifications
You must be signed in to change notification settings - Fork 217
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
[v3.1.x] Issues during pod restart process after upgrading helm resources #397
Comments
@Prasadi-R as per my observations, the following were noted (just to note, I used the WSO2 API Management deployment pattern 1 deployment to investigate this issue).
As per the example, the In the given case, the new Publisher-DevPortal instance will attempt to use the H2 based local Carbon DB which is persisted (as per Solr indexing requirements) and is being used by the older Pod version. Ideally, the old Pod needs to be deleted in order for the relevant file to be released from usage and for the new Pod to start using it. As per my understanding, thus the highlighted issue occurs. |
After a series of internal discussions, the following options were deduced as solutions for the issue discussed.
First, it is important to state that this option forces us to use Kubernetes Deployment resources as We evaluated this option with WSO2 API Manager deployment pattern 1 for version We made about 6 update attempts on existing API Manager Pods and every update worked successfully. Thus, we can conclude that this option works fine for the discussed scenario.
Under this option, we may be able to stick to using Kubernetes StatefulSet resources to define the deployments by sticking to the approach suggested in this article provided by @ThilinaManamgoda. Hence, using this option will ease the effort of scaling the Publisher and DevPortal deployments than option 1 although this can be considered a less occurring use case for the given profiles, as per my understanding. Though this option is yet to be evaluated, the user may have to bear the overhead of maintaining additional, externalized databases under this approach.
|
As per further tests, it was noticed that this error persists even during the usage of |
The discussed issue had been reported by a number of users in numerous Kubernetes deployments, over the past few weeks. As per the last few meetings on this matter we had we decided to use the following steps to avoid this issue.
We decided to use this resource type due to the availability of the Recreate update strategy, which is not an update strategy option in StatefulSet based deployments.
During the internal upgrade test attempts running API Manager pattern 1 deployments in AWS EKS and GKE Kubernetes services (at least 10 upgrade attempts in each service), we encountered this issue with low frequency compared to previous approaches. But considering the intermittent occurrence of this error, we decided to #416. Furthermore, it was agreed to conduct an internal evaluation of the product issue causing this and attempt to fix it. Also, the following were suggested as practices which we could adopt in future releases.
Update as of 2020-09-01: Please refer to the official WSO2 container guide for recommended, tried and tested storage options. Please feel free to share your thoughts and concerns with regards to this discussed matter. |
As per #397 (comment), we will moving this issue to a future milestone since, this issue has not been completely resolved yet. |
Description:
The following errors were observed in the wso2carbon.log file when restarting API-Manager pods after a helm upgrade. This causes the API-M pods does not restart successfully.
[2020-06-03 11:58:14,952] ERROR - RegistryContext ||Unable to get instance of the registry context org.wso2.carbon.registry.core.exceptions.RegistryException: Unable to connect to Data Source at org.wso2.carbon.registry.core.config.RegistryConfigurationProcessor.populateRegistryConfig(RegistryConfigurationProcessor.java:165) ~[org.wso2.carbon.registry.core_4.6.0.jar:?] ..... Caused by: org.h2.jdbc.JdbcSQLNonTransientException: IO Exception: null [90028-199] at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) ~[h2_1.4.199.wso2v1.jar:?] ..... Caused by: java.lang.IllegalStateException: Could not open file nio:/home/wso2carbon/solr/database/WSO2CARBON_DB.mv.db [1.4.199/1] at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883) ~[h2_1.4.199.wso2v1.jar:?] ..... Caused by: java.io.IOException: No locks available at sun.nio.ch.FileDispatcherImpl.lock0(Native Method) ~[?:?]
There are several warning messages related to failed to mount errors, observed in the pod descriptions.
Affected Product Version:
Helm Resources For WSO2 API Manager version
3.1.0.2
OS, DB, other environment details and versions:
AWS EKS, Google Cloud (GKE)
The text was updated successfully, but these errors were encountered: