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

DISCOURSE_REDIS_USE_SSL default misbehaving #68144

Closed
djetelina opened this issue Jun 27, 2024 · 4 comments
Closed

DISCOURSE_REDIS_USE_SSL default misbehaving #68144

djetelina opened this issue Jun 27, 2024 · 4 comments
Assignees
Labels
discourse solved stale 15 days without activity tech-issues The user has a technical issue about an application

Comments

@djetelina
Copy link

Name and Version

bitnami/discourse 3.2.2

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Install the discourse chart from bitnami charts with defaults
  2. discourse won't be able to connect to redis, it will try to use ssl connection

What is the expected behavior?

Default "no" should evaluate as false and use non-ssl connection to redis

What do you see instead?

Somewhere along the way the variable evaluates truthy. Overriding the dafault with false fixes the issue.

Additional information

Original discovery can be found here: bitnami/charts#27476

I wanted to commit a PR, but I'll be honest, I can't see the mistakes that's causing this. The following line (262) in libdiscourse.sh:

is_boolean_yes "$DISCOURSE_REDIS_USE_SSL" && discourse_conf_set "redis_use_ssl" true

is editing the config file only if is_boolean_yes is truthy. Which it's not. So I'm not quite sure what's happening here.

The only fix I can manage is changing the default fallback for the env variable to false, but that goes against the standards as discussed in #4174 which probably introduced this issue.

So the question is, what am I not seeing? I'd really like to contribute a proper fix :)

@djetelina djetelina added the tech-issues The user has a technical issue about an application label Jun 27, 2024
@github-actions github-actions bot added the triage Triage is needed label Jun 27, 2024
@carrodher carrodher transferred this issue from bitnami/containers Jun 28, 2024
@carrodher carrodher transferred this issue from bitnami/charts Jun 28, 2024
@github-actions github-actions bot removed in-progress triage Triage is needed labels Jun 28, 2024
@github-actions github-actions bot assigned fmulero and unassigned carrodher Jun 28, 2024
@fmulero
Copy link
Collaborator

fmulero commented Jul 2, 2024

Hi @djetelina thanks for using bitnami/charts and trying to fix this problem.

I'd like to go to the basics, because I am not able to reproduce your issue. How did you find the issue? Could you share logs or
any evidence of the problem? These are the steps I followed with version 13.2.6:

# I disabled the livenessProbe because the initial load (database initialization and plugin compilation) it was taking more than expected 
$ helm install discourse bitnami/discourse --set discourse.livenessProbe.enabled=false
NAME: discourse
LAST DEPLOYED: Tue Jul  2 12:35:25 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: discourse
CHART VERSION: 13.2.6
APP VERSION: 3.2.2
** Please be patient while the chart is being deployed **Discourse can be accessed via port 80 on the following DNS name from within your cluster:

    discourse.default.svc.cluster.local

To connect to Discourse from outside the cluster, perform the following steps:

1.  Create a port-forward to the service:

    kubectl port-forward --namespace default svc/discourse 80:80 &
    echo "Discourse URL: http://127.0.0.1:80"

2. Open a browser and access Discourse using the obtained URL.

3. Get your Discourse login credentials by running:

    export DISCOURSE_PASSWORD=$(kubectl get secret --namespace "default" discourse-discourse -o jsonpath="{.data.discourse-password}" | base64 -d)
    echo User:     user
    echo Password: $DISCOURSE_PASSWORD

WARNING: There are "resources" sections in the chart not set. Using "resourcesPreset" is not recommended for production. For production installations, please set the following values according to your workload needs:
  - discourse.resources
  - sidekiq.resources
+info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

In my case, the Initialization process took around 6 min, after that I could login in to the application and use it without issues

@djetelina
Copy link
Author

That's even more strange, so the issue has more to do with our environment than I thought. The environment and values are present in the charts issue I linked. Butw how does any of this make sense and what could even be wrong with the env that it's misbehaving in this way - I don't know.

Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Jul 19, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discourse solved stale 15 days without activity tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

4 participants