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

Plans on Thailand Production Reported to be Changing Status #1027

Open
samkanga opened this issue Dec 8, 2021 · 2 comments
Open

Plans on Thailand Production Reported to be Changing Status #1027

samkanga opened this issue Dec 8, 2021 · 2 comments
Assignees

Comments

@samkanga
Copy link

samkanga commented Dec 8, 2021

CHAI has reported that activated plans on Thailand Production are reverting to draft and they have to be reactivated again. A check from the OpenSRP DB confirms that there are recorded changes as the date_edited keeps on changing. A check on the nginx http access logs, it shows that there are PUT requests being made to the opensrp server. See sample query below:

cat /var/log/nginx/servermhealth.ddc.moph.go.th-https-access.log | grep -i /opensrp/rest/plans | tail -fn 100

      • [08/Dec/2021:20:16:16 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.186 0.184 - 23492
      • [08/Dec/2021:20:16:16 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.090 0.092 - 16813
      • [08/Dec/2021:20:16:17 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.070 0.068 - 13672
      • [08/Dec/2021:20:16:17 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.054 0.052 - 23596
      • [08/Dec/2021:20:16:18 +0700] "GET /opensrp/rest/plans/getAll?serverVersion=1601948939838&limit=2000 HTTP/1.1" 200 176477 "-" "okhttp/3.8.1" 0.401 0.400 - 1794
      • [08/Dec/2021:20:16:18 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.055 0.056 - 23596
      • [08/Dec/2021:20:16:20 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.095 0.096 - 23596
      • [08/Dec/2021:20:16:21 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.106 0.108 - 31743
      • [08/Dec/2021:20:16:21 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.257 0.256 - 23596
      • [08/Dec/2021:20:16:22 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.114 0.116 - 31743
      • [08/Dec/2021:20:16:22 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.061 0.060 - 17562
      • [08/Dec/2021:20:16:22 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.065 0.064 - 20718
      • [08/Dec/2021:20:16:23 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.102 0.100 - 28534
      • [08/Dec/2021:20:16:23 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.080 0.080 - 13977
      • [08/Dec/2021:20:16:24 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.063 0.064 - 20718
      • [08/Dec/2021:20:16:24 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.061 0.064 - 13977
      • [08/Dec/2021:20:16:25 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.078 0.076 - 23672
      • [08/Dec/2021:20:16:27 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.109 0.112 - 23672
      • [08/Dec/2021:20:16:27 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.077 0.076 - 20793
      • [08/Dec/2021:20:16:28 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.093 0.092 - 9822
      • [08/Dec/2021:20:16:28 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.063 0.064 - 23672
      • [08/Dec/2021:20:16:28 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.089 0.088 - 20793
      • [08/Dec/2021:20:16:29 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.061 0.060 - 13644
      • [08/Dec/2021:20:16:30 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.058 0.056 - 13644
      • [08/Dec/2021:20:16:31 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.080 0.080 - 14500
      • [08/Dec/2021:20:16:33 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.071 0.072 - 33085
      • [08/Dec/2021:20:16:33 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.085 0.084 - 14500
      • [08/Dec/2021:20:16:33 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.079 0.080 - 16915
      • [08/Dec/2021:20:16:33 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.114 0.116 - 13390
      • [08/Dec/2021:20:16:34 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.167 0.164 - 4594
      • [08/Dec/2021:20:16:34 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.064 0.064 - 16915
      • [08/Dec/2021:20:16:35 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.094 0.092 - 16915
      • [08/Dec/2021:20:16:36 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.104 0.104 - 17492
      • [08/Dec/2021:20:16:36 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.164 0.164 - 17492
      • [08/Dec/2021:20:16:37 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.090 0.092 - 14588
      • [08/Dec/2021:20:16:38 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.072 0.068 - 24870
      • [08/Dec/2021:20:16:39 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.065 0.064 - 24870
      • [08/Dec/2021:20:16:40 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.065 0.064 - 16272
      • [08/Dec/2021:20:16:40 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.086 0.084 - 24870
      • [08/Dec/2021:20:16:40 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.067 0.068 - 18641
      • [08/Dec/2021:20:16:41 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.086 0.084 - 16272
      • [08/Dec/2021:20:16:41 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.098 0.100 - 16829
      • [08/Dec/2021:20:16:42 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.052 0.048 - 31877
      • [08/Dec/2021:20:16:42 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.087 0.088 - 16829
      • [08/Dec/2021:20:16:44 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.061 0.060 - 31860
      • [08/Dec/2021:20:16:44 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.072 0.072 - 31877
      • [08/Dec/2021:20:16:45 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.096 0.096 - 9948
      • [08/Dec/2021:20:16:45 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.109 0.112 - 31860
      • [08/Dec/2021:20:16:46 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.098 0.100 - 9948
      • [08/Dec/2021:20:16:47 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.069 0.068 - 24667
      • [08/Dec/2021:20:16:47 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.066 0.064 - 28563
      • [08/Dec/2021:20:16:48 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.059 0.060 - 6491
      • [08/Dec/2021:20:16:48 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.095 0.096 - 24667
      • [08/Dec/2021:20:16:49 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.168 0.168 - 6491
      • [08/Dec/2021:20:16:51 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.077 0.076 - 6491
      • [08/Dec/2021:20:16:51 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.273 0.272 - 23651
      • [08/Dec/2021:20:16:51 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.072 0.072 - 23555
      • [08/Dec/2021:20:16:52 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.098 0.100 - 24574
      • [08/Dec/2021:20:16:52 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.075 0.072 - 23555
      • [08/Dec/2021:20:16:53 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.081 0.080 - 23501
      • [08/Dec/2021:20:16:53 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.119 0.120 - 24574
      • [08/Dec/2021:20:16:54 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.074 0.072 - 23501
      • [08/Dec/2021:20:16:55 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.063 0.064 - 13449
      • [08/Dec/2021:20:16:55 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.065 0.068 - 14345
      • [08/Dec/2021:20:16:55 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.088 0.088 - 23501
      • [08/Dec/2021:20:16:56 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.094 0.092 - 13449
      • [08/Dec/2021:20:16:58 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.100 0.100 - 10310
      • [08/Dec/2021:20:16:58 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.062 0.064 - 12220
      • [08/Dec/2021:20:16:59 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.089 0.092 - 10856
      • [08/Dec/2021:20:16:59 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.149 0.148 - 12220
      • [08/Dec/2021:20:17:00 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.066 0.068 - 10856
      • [08/Dec/2021:20:17:00 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.100 0.100 - 20800
      • [08/Dec/2021:20:17:01 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.069 0.068 - 20800
      • [08/Dec/2021:20:17:01 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.198 0.200 - 23629
      • [08/Dec/2021:20:17:02 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.083 0.084 - 23629
      • [08/Dec/2021:20:17:03 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.075 0.076 - 33285
      • [08/Dec/2021:20:17:04 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.063 0.060 - 33285
      • [08/Dec/2021:20:17:04 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.075 0.072 - 13525
      • [08/Dec/2021:20:17:05 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.079 0.080 - 33108
      • [08/Dec/2021:20:17:05 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.074 0.072 - 33108
      • [08/Dec/2021:20:17:08 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.077 0.076 - 23567
      • [08/Dec/2021:20:17:08 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.103 0.100 - 20763
      • [08/Dec/2021:20:17:08 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.072 0.072 - 17608
      • [08/Dec/2021:20:17:09 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.081 0.080 - 33108
      • [08/Dec/2021:20:17:09 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.159 0.160 - 23559
      • [08/Dec/2021:20:17:09 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.058 0.060 - 20763
      • [08/Dec/2021:20:17:11 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.085 0.084 - 23559
      • [08/Dec/2021:20:17:11 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.093 0.092 - 21230
      • [08/Dec/2021:20:17:13 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.074 0.076 - 31827
      • [08/Dec/2021:20:17:13 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.075 0.076 - 21230
      • [08/Dec/2021:20:17:14 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.081 0.080 - 14399
      • [08/Dec/2021:20:17:14 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.069 0.068 - 31827
      • [08/Dec/2021:20:17:15 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 400 113 "-" "okhttp/3.8.1" 0.123 0.120 - 10288
      • [08/Dec/2021:20:17:15 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.095 0.096 - 14399
      • [08/Dec/2021:20:17:16 +0700] "PUT /opensrp/rest/plans HTTP/1.1" 201 0 "-" "okhttp/3.8.1" 0.090 0.088 - 10754
@Rkareko Rkareko self-assigned this Dec 8, 2021
@Rkareko
Copy link
Contributor

Rkareko commented Dec 8, 2021

Queries on the opensrp db show plan server versions and date_edited values being updated after several minutes

select identifier, json->>'status' status, server_version, date_edited from core.plan where identifier in ('ca1503ef-3e98-435e-9f56-279049b3ed7c', '60f143bc-ba1e-4b34-90a9-6f073f827b3c', '0f7324d3-dc7b-4985-955c-0caa6f8a24db', '922315c9-f686-4f45-b9d1-77f92804964e');
              identifier              | status | server_version |       date_edited       
--------------------------------------+--------+----------------+-------------------------
 ca1503ef-3e98-435e-9f56-279049b3ed7c | active |  1601948937750 | 2021-12-08 19:33:11.176
 0f7324d3-dc7b-4985-955c-0caa6f8a24db | active |  1601948937627 | 2021-12-08 19:31:48.815
 60f143bc-ba1e-4b34-90a9-6f073f827b3c | active |  1601948938296 | 2021-12-08 19:46:51.037
 922315c9-f686-4f45-b9d1-77f92804964e | active |  1601948937901 | 2021-12-08 19:34:49.035

Another query for the same plans shows the following

select identifier, json->>'status' status, server_version, date_edited from core.plan where identifier in ('ca1503ef-3e98-435e-9f56-279049b3ed7c', '60f143bc-ba1e-4b34-90a9-6f073f827b3c', '0f7324d3-dc7b-4985-955c-0caa6f8a24db', '922315c9-f686-4f45-b9d1-77f92804964e');
              identifier              | status | server_version |       date_edited       
--------------------------------------+--------+----------------+-------------------------
 ca1503ef-3e98-435e-9f56-279049b3ed7c | active |  1601948938835 | 2021-12-08 19:52:46.347
 0f7324d3-dc7b-4985-955c-0caa6f8a24db | active |  1601948938704 | 2021-12-08 19:51:12.778
 60f143bc-ba1e-4b34-90a9-6f073f827b3c | active |  1601948938296 | 2021-12-08 19:46:51.037
 922315c9-f686-4f45-b9d1-77f92804964e | active |  1601948938969 | 2021-12-08 19:54:07.777

@Rkareko
Copy link
Contributor

Rkareko commented Dec 8, 2021

Graylog events found here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants