Gerrit Replica + health check plugin

162 views
Skip to first unread message

elzoc...@gmail.com

unread,
Jun 24, 2021, 12:13:06 PM6/24/21
to Repo and Gerrit Discussion
Hi all, 

Gerrit 3.3.4, I am trying to setup a replica. 
I am using the healthcheck plugin to monitor the main and failover Gerrit servers, so was planning to do the same for the replicas.
Unfortunately I am getting a 404 instead of a 200 with a json. 

In [1] is the healthcheck call for my new Gerrit instance, created from a prod backup so not in replica mode (with container.replica = false). All good, just like prod.
In [2] the same call on the same instance but with container.replica = true. Call return a 404.

Doing some testing I saw that on a new install of Gerrit, everything by default the healthcheck was working in replica mode, so doing some config diffs, I tried to remove the last 'r/' from httpd.listenUrl = proxy-https://*:8081/r/     obviously that's not a production solution as all the infra / manifests / ... need that '/r/' but... 
In [3], it is the same as [2]  (without the 'r/' as I removed it from the listenUrl).  it works. 
(Note: strangely the json is pretty-printed).

Any idea ?

Thanks,
Cedric.



HTTP/1.1 200 OK
Date: Thu, 24 Jun 2021 15:46:31 GMT
X-Frame-Options: DENY
Content-Disposition: attachment
X-Content-Type-Options: nosniff
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 491

)]}'
{"elapsed":90,"blockedthreads":{"result":"passed","ts":1624549591366,"elapsed":12},"auth":{"result":"disabled","ts":1624549591360,"elapsed":0},"querychanges":{"result":"disabled","ts":1624549591359,"elapsed":0},"jgit":{"result":"passed","ts":1624549591290,"elapsed":49},"deadlock":{"result":"passed","ts":1624549591362,"elapsed":3},"activeworkers":{"result":"passed","ts":1624549591361,"elapsed":1},"projectslist":{"result":"passed","ts":1624549591339,"elapsed":19},"ts":1624549591288}


HTTP/1.1 404 Not Found
X-Frame-Options: DENY
Content-Type: text/plain;charset=iso-8859-1
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Thu, 24 Jun 2021 15:44:31 GMT
Content-Length: 9


[3] 
HTTP/1.1 200 OK
Date: Thu, 24 Jun 2021 15:56:36 GMT
X-Frame-Options: DENY
Content-Length: 673

)]}'
{
  "elapsed": 43,
  "blockedthreads": {
    "result": "passed",
    "ts": 1624550196787,
    "elapsed": 5
  },
  "auth": {
    "result": "disabled",
    "ts": 1624550196783,
...

Luca Milanesio

unread,
Jun 24, 2021, 12:24:40 PM6/24/21
to Repo and Gerrit Discussion, Luca Milanesio, elzoc...@gmail.com

On 24 Jun 2021, at 17:13, elzoc...@gmail.com <elzoc...@gmail.com> wrote:

Hi all, 

Gerrit 3.3.4, I am trying to setup a replica. 
I am using the healthcheck plugin to monitor the main and failover Gerrit servers, so was planning to do the same for the replicas.
Unfortunately I am getting a 404 instead of a 200 with a json. 

Which version of the plugin are you running?


In [1] is the healthcheck call for my new Gerrit instance, created from a prod backup so not in replica mode (with container.replica = false). All good, just like prod.
In [2] the same call on the same instance but with container.replica = true. Call return a 404.

Doing some testing I saw that on a new install of Gerrit, everything by default the healthcheck was working in replica mode, so doing some config diffs, I tried to remove the last 'r/' from httpd.listenUrl = proxy-https://*:8081/r/     obviously that's not a production solution as all the infra / manifests / ... need that '/r/' but... 
In [3], it is the same as [2]  (without the 'r/' as I removed it from the listenUrl).  it works. 
(Note: strangely the json is pretty-printed).

Can you raise a bug for this?
The plugin is doing some “magic” on replicas and I may have forgotten a non-root path for the magic to work.

Luca.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/cc5de6bb-61fc-490b-ac6b-27e3bb417cden%40googlegroups.com.

elzoc...@gmail.com

unread,
Jun 24, 2021, 12:29:02 PM6/24/21
to Repo and Gerrit Discussion
Le jeudi 24 juin 2021 à 17:24:40 UTC+1, lucamilanesio a écrit :

On 24 Jun 2021, at 17:13, elzoc...@gmail.com <elzoc...@gmail.com> wrote:

Hi all, 

Gerrit 3.3.4, I am trying to setup a replica. 
I am using the healthcheck plugin to monitor the main and failover Gerrit servers, so was planning to do the same for the replicas.
Unfortunately I am getting a 404 instead of a 200 with a json. 

Which version of the plugin are you running?

My Prod is on v3.3.0-9-g383ddf0b58,   so first tests were with that. then I tried the latest on stable3.3. v3.3.0-20-gd3387e44ca.   bellow curls are on latest.

 


In [1] is the healthcheck call for my new Gerrit instance, created from a prod backup so not in replica mode (with container.replica = false). All good, just like prod.
In [2] the same call on the same instance but with container.replica = true. Call return a 404.

Doing some testing I saw that on a new install of Gerrit, everything by default the healthcheck was working in replica mode, so doing some config diffs, I tried to remove the last 'r/' from httpd.listenUrl = proxy-https://*:8081/r/     obviously that's not a production solution as all the infra / manifests / ... need that '/r/' but... 
In [3], it is the same as [2]  (without the 'r/' as I removed it from the listenUrl).  it works. 
(Note: strangely the json is pretty-printed).

Can you raise a bug for this?
The plugin is doing some “magic” on replicas and I may have forgotten a non-root path for the magic to work.

Ok will do. 
Thanks,

elzoc...@gmail.com

unread,
Jun 24, 2021, 12:57:49 PM6/24/21
to Repo and Gerrit Discussion
Le jeudi 24 juin 2021 à 17:29:02 UTC+1, elzoc...@gmail.com a écrit :
Le jeudi 24 juin 2021 à 17:24:40 UTC+1, lucamilanesio a écrit :

On 24 Jun 2021, at 17:13, elzoc...@gmail.com <elzoc...@gmail.com> wrote:

Hi all, 

Gerrit 3.3.4, I am trying to setup a replica. 
I am using the healthcheck plugin to monitor the main and failover Gerrit servers, so was planning to do the same for the replicas.
Unfortunately I am getting a 404 instead of a 200 with a json. 

Which version of the plugin are you running?

My Prod is on v3.3.0-9-g383ddf0b58,   so first tests were with that. then I tried the latest on stable3.3. v3.3.0-20-gd3387e44ca.   bellow curls are on latest.

 


In [1] is the healthcheck call for my new Gerrit instance, created from a prod backup so not in replica mode (with container.replica = false). All good, just like prod.
In [2] the same call on the same instance but with container.replica = true. Call return a 404.

Doing some testing I saw that on a new install of Gerrit, everything by default the healthcheck was working in replica mode, so doing some config diffs, I tried to remove the last 'r/' from httpd.listenUrl = proxy-https://*:8081/r/     obviously that's not a production solution as all the infra / manifests / ... need that '/r/' but... 
In [3], it is the same as [2]  (without the 'r/' as I removed it from the listenUrl).  it works. 
(Note: strangely the json is pretty-printed).

Can you raise a bug for this?
The plugin is doing some “magic” on replicas and I may have forgotten a non-root path for the magic to work.

Ok will do. 

I tried to raise a bug https://bugs.chromium.org/p/gerrit/issues/list,  New Issue, Template Bug Report, I filled everything but when I clicked on Submit issue, a wheel spinned for a sec and that's it, no reload, nothing appeared on the dashboard. 
tried on both Safari and Goggle Chrome same result.   attaching a copy/paste of what I filled in if you want to try.  hopefully it really didn't work and they are not waiting moderation else I might have raised a few of them 😅

Tks,

C.
healthcheck.txt

elzoc...@gmail.com

unread,
Jun 25, 2021, 4:57:23 AM6/25/21
to Repo and Gerrit Discussion
Le jeudi 24 juin 2021 à 17:57:49 UTC+1, elzoc...@gmail.com a écrit :
Le jeudi 24 juin 2021 à 17:29:02 UTC+1, elzoc...@gmail.com a écrit :
Le jeudi 24 juin 2021 à 17:24:40 UTC+1, lucamilanesio a écrit :

On 24 Jun 2021, at 17:13, elzoc...@gmail.com <elzoc...@gmail.com> wrote:

Hi all, 

Gerrit 3.3.4, I am trying to setup a replica. 
I am using the healthcheck plugin to monitor the main and failover Gerrit servers, so was planning to do the same for the replicas.
Unfortunately I am getting a 404 instead of a 200 with a json. 

Which version of the plugin are you running?

My Prod is on v3.3.0-9-g383ddf0b58,   so first tests were with that. then I tried the latest on stable3.3. v3.3.0-20-gd3387e44ca.   bellow curls are on latest.

 


In [1] is the healthcheck call for my new Gerrit instance, created from a prod backup so not in replica mode (with container.replica = false). All good, just like prod.
In [2] the same call on the same instance but with container.replica = true. Call return a 404.

Doing some testing I saw that on a new install of Gerrit, everything by default the healthcheck was working in replica mode, so doing some config diffs, I tried to remove the last 'r/' from httpd.listenUrl = proxy-https://*:8081/r/     obviously that's not a production solution as all the infra / manifests / ... need that '/r/' but... 
In [3], it is the same as [2]  (without the 'r/' as I removed it from the listenUrl).  it works. 
(Note: strangely the json is pretty-printed).

Can you raise a bug for this?
The plugin is doing some “magic” on replicas and I may have forgotten a non-root path for the magic to work.

Ok will do. 

I tried to raise a bug https://bugs.chromium.org/p/gerrit/issues/list,  New Issue, Template Bug Report, I filled everything but when I clicked on Submit issue, a wheel spinned for a sec and that's it, no reload, nothing appeared on the dashboard. 
tried on both Safari and Goggle Chrome same result.   attaching a copy/paste of what I filled in if you want to try.  hopefully it really didn't work and they are not waiting moderation else I might have raised a few of them 😅



Retried now,  left the default template and it worked, I guess there is a bug with the Bug Report  template (maybe because it does not have a default CC?).

Tks,
Reply all
Reply to author
Forward
0 new messages