-
Notifications
You must be signed in to change notification settings - Fork 100
THREESCALE-9564 redis 6 #839
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Skipping CI for Draft Pull Request. |
Contributor
VerificationInstall
oc wait --for=condition=available apimanager/apimanager1 --timeout=-1s
apimanager.apps.3scale.net/apimanager1 condition met
oc get is backend-redis -o jsonpath='{.status.tags}' | yq e -P
- items:
- created: "2023-07-19T10:20:11Z"
dockerImageReference: quay.io/centos7/redis-6-centos7@sha256:57c885ef27fac78209e23828e2ab30558518dc543a99149e12dbd8745568cbda
generation: 2
image: sha256:57c885ef27fac78209e23828e2ab30558518dc543a99149e12dbd8745568cbda
tag: "2.14"
oc logs $(oc get pods --selector deploymentconfig=backend-listener -o name) | grep /transactions
10.131.2.47 - - [19/Jul/2023 10:27:35 UTC] "GET /transactions/authrep.xml?service_token=73c09af519e51a45c2c941913d1b630d694aa44c8a4a762c7ed409a0c36afae9&service_id=2&usage%5Bhits%5D=1&user_key=64399c2b3b48c3a0f15238264c72bc3f HTTP/1.1" 200 - 0.009157371 0 0 0 12 19 7 - "rejection_reason_header=1&limit_headers=1&no_body=1"Upgrade
oc wait --for=condition=available apimanager/apimanager1 --timeout=-1s
apimanager.apps.3scale.net/apimanager1 condition met
oc get is backend-redis -o jsonpath='{.status.tags}' | yq e -P
- items:
- created: "2023-07-19T10:45:58Z"
dockerImageReference: centos/redis-5-centos7@sha256:7e12e362a6430f8831a445b26181285c3d36df29b1fdd2abe1247d5068905129
generation: 2
image: sha256:7e12e362a6430f8831a445b26181285c3d36df29b1fdd2abe1247d5068905129
tag: "2.13"
oc logs $(oc get pods --selector deploymentconfig=backend-listener -o name) | grep /transactions
10.131.2.47 - - [19/Jul/2023 10:27:35 UTC] "GET /transactions/authrep.xml?service_token=73c09af519e51a45c2c941913d1b630d694aa44c8a4a762c7ed409a0c36afae9&service_id=2&usage%5Bhits%5D=1&user_key=64399c2b3b48c3a0f15238264c72bc3f HTTP/1.1" 200 - 0.009157371 0 0 0 12 19 7 - "rejection_reason_header=1&limit_headers=1&no_body=1"
oc get $(oc get pods --selector deploymentconfig=backend-redis -o name) -o jsonpath='{.spec.containers[0].image}' | yq e -P
quay.io/centos7/redis-6-centos7@sha256:57c885ef27fac78209e23828e2ab30558518dc543a99149e12dbd8745568cbda
oc logs $(oc get pods --selector deploymentconfig=backend-redis -o name)
---> 10:59:11 Processing Redis configuration files ...
---> 10:59:11 WARNING: setting REDIS_PASSWORD is recommended
---> 10:59:11 Sourcing post-init.sh ...
---> 10:59:11 Cleaning up environment variable REDIS_PASSWORD ...
---> 10:59:11 Running final exec -- Only Redis logs after this point
1:C 19 Jul 2023 10:59:11.956 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 19 Jul 2023 10:59:11.956 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 19 Jul 2023 10:59:11.956 # Configuration loaded
1:M 19 Jul 2023 10:59:11.957 * Running mode=standalone, port=6379.
1:M 19 Jul 2023 10:59:11.957 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 19 Jul 2023 10:59:11.957 # Server initialized
1:M 19 Jul 2023 10:59:11.957 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').
1:M 19 Jul 2023 10:59:11.958 * DB loaded from append only file: 0.001 seconds
1:M 19 Jul 2023 10:59:11.958 * Ready to accept connections
oc logs $(oc get pods --selector deploymentconfig=backend-listener -o name)| grep /transaction
# This returned nothing guessing its because the pod restated, so I curl the endpoint and looks like that worked
curl "https://api-3scale-apicast-staging.apps.aucunnin-ccs.edy6.s1.devshift.org:443/?user_key=0b176e8c876412ca46259e155c2d9c10"
{
"method": "GET",
"path": "/",
"args": "user_key=0b176e8c876412ca46259e155c2d9c10",
"body": "",
"headers": {
"HTTP_VERSION": "HTTP/1.1",
"HTTP_HOST": "echo-api.3scale.net",
"HTTP_X_REAL_IP": "10.128.6.35",
"HTTP_X_3SCALE_PROXY_SECRET_TOKEN": "Shared_secret_sent_from_proxy_to_API_backend_a26851cbd2a98244",
"HTTP_USER_AGENT": "curl/7.85.0",
"HTTP_ACCEPT": "*/*",
"HTTP_X_FORWARDED_HOST": "api-3scale-apicast-staging.apps.aucunnin-ccs.edy6.s1.devshift.org",
"HTTP_X_FORWARDED_PORT": "443",
"HTTP_X_FORWARDED_PROTO": "https",
"HTTP_FORWARDED": "for=185.167.180.230;host=api-3scale-apicast-staging.apps.aucunnin-ccs.edy6.s1.devshift.org;proto=https",
"HTTP_X_FORWARDED_FOR": "185.167.180.230,13.39.92.158",
"HTTP_X_ENVOY_EXTERNAL_ADDRESS": "13.39.92.158",
"HTTP_X_REQUEST_ID": "af2938c4-81bb-4a8a-964f-f4fe4fe85e4c",
"HTTP_X_ENVOY_EXPECTED_RQ_TIMEOUT_MS": "15000"
},
"uuid": "db49efdc-91e1-4352-8449-b3c4aad7ea9e"
}%
oc logs $(oc get pods --selector deploymentconfig=backend-listener -o name)| grep /transaction
10.131.2.57 - - [19/Jul/2023 11:04:17 UTC] "GET /transactions/authrep.xml?service_id=2&service_token=cfc1b75591f9d69caeafde7d5093c5c2d35e7f839d893320970ce6a880587ab2&usage%5Bhits%5D=1&user_key=0b176e8c876412ca46259e155/lgtm |
austincunningham
approved these changes
Jul 19, 2023
|
Code Climate has analyzed commit 8e66442 and detected 4 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Support Redis 6 for internal databases. System and Backend redis are upgraded to Redis 6
Fixes https://issues.redhat.com/browse/THREESCALE-9564
The upgrade should only happen when redis is used as internal database, either for backend or system.
From the Redis 6 release notes
Command level compatibility should not be an issue for 3scale, as there is support for Redis 6 since 3scale 2.11.
Verification Steps: Fresh install
Requires openshift (oc CLI) session
Create new project
wildcardDomainmust be something valid (only if it is going to be used later). Usually${PROJECT_NAME}.apps.${CLUSTER_DOMAIN}The above "wait" ensures the pods are up and running.
quay.io/centos7/redis-6-centos7Verification Steps: Upgrade from 2.13
Requires openshift (oc CLI) session
Create new project
wildcardDomainmust be something valid (only if it is going to be used later). Usually${PROJECT_NAME}.apps.${CLUSTER_DOMAIN}The above "wait" ensures the pods are up and running.
centos/redis-5-centos7During upgrade, some pods my restart and report error. That is expected as redis is being replaced and living pods will see connections being dropped.
Wait until all pods are up&running.
oc waitdoes not work during upgrade because all the deploymentconfigs will report as available (they have at least one available pod up&running) during the upgrade.quay.io/centos7/redis-6-centos7Note on the line "DB loaded from append only file: 0.016 seconds". It seems that redis just loads the append only file as if it was generated by another redis 6 instance. Seems that the format has not change since redis 5, hence updating data file is not even needed.