I noticed that after a successful module update, the devices inventory on the production server still shows the old artifact until the device does its next inventory poll. Is there a way to force the device to do an inventory poll with the production server using a state script or some other way? Or would this be a feature request for the mender client. It would also be useful to have a way for the production server to check a devices inventory without waiting on the InventoryPollIntervalSeconds on the device.
I’m not 100% sure if it works from within a state script, but you should be able to call mender -send-inventory
, which will send a signal to the running daemon to do just that.
I’m not 100% sure if it works from within a state script, but you should be able to call
mender -send-inventory
, which will send a signal to the running daemon to do just that.
Note that this option is only available in the upcoming 2.1 release.
I tried the master and 2.1.0b1 branches which both have this option in them. Neither of them worked from the command line. The log is below…
I also tried it from the module Cleanup state. Showed similar in the log.
I also tried it from the ArtifactCommit_Leave and when finished it tacked on a “_INCONSITENT” to the end of the artifact name.
My production server I believe I updated to 2.0 when I first updated the mender client to 2.0. Not sure how to tell what version I am on though… Does this require an the production server to be updated as well?
Aug 15 17:48:36 machine mender[12073]: time=“2019-08-15T17:48:36Z” level=debug msg=“SIGUSR2 signal received.” module=main
Aug 15 17:48:36 machine mender[12073]: time=“2019-08-15T17:48:36Z” level=debug msg=“Sent wake up!” module=main
Aug 15 17:48:36 machine mender[12073]: time=“2019-08-15T17:48:36Z” level=info msg=“forced wake-up from sleep” module=state
Aug 15 17:48:36 machine mender[12073]: time=“2019-08-15T17:48:36Z” level=info msg=“State transition: check-wait [Idle] -> update-check [Sync]” module=mender
Aug 15 17:48:36 machine mender[12073]: time=“2019-08-15T17:48:36Z” level=debug msg=“statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds” module=executor
Aug 15 17:48:36 machine mender[12073]: time=“2019-08-15T17:48:36Z” level=debug msg=“handle update check state” module=state
Aug 15 17:48:36 machine mender[12073]: time=“2019-08-15T17:48:36Z” level=debug msg=“Returning artifact name my-artifact-name from database.” module=device
Aug 15 17:48:36 machine mender[12073]: time=“2019-08-15T17:48:36Z” level=debug msg=“Read data from device manifest file: device_type=my-device-type” module=device
Aug 15 17:48:36 machine mender[12073]: level=info msg=“forced wake-up from sleep” module=state
I updated the production server and it still doesn’t update the device artifact_name on the web page when I run that command on the client. The only way I can get it to update is restart the client mender or set the poll setting to a value like 60 seconds and it will update the webpage…
Can you share a picture of what field that is not updated?
artifact_name
is displayed in two locations, and they are not reported by the same call I believe.
The “Current software” name is reported by mender -check-update
, the other one with the mender -send-inventory
call.
Oki I gave it a go as well, and can confirm that running mender --send-inventory
does not update update anything in the GUI.
The log of mender --send-inventory
:
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="SIGUSR2 signal received." module=main
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="Sent wake up!" module=main
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=info msg="forced wake-up from sleep" module=state
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]" module=mender
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds" module=executor
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="handle update check state" module=state
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="Returning artifact name from /etc/mender/artifact_info file." module=device
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="Read data from device manifest file: artifact_name=release-1" module=device
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="Current manifest data: release-1" module=device
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="Read data from device manifest file: device_type=raspberrypi4" module=device
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="Current manifest data: raspberrypi4" module=device
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="Received response:204 No Content" module=client_update
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="No update available" module=client_update
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="no updates available" module=mender
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=info msg="State transition: update-check [Sync] -> check-wait [Idle]" module=mender
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds" module=executor
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds" module=executor
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="handle check wait state" module=state
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="check wait state; next checks: (update: 2019-08-16 11:28:09.732368987 +0000 UTC m=+7201.620589261) (inventory: 2019-08-16 11
:28:09.438930094 +0000 UTC m=+7201.327150590)" module=state
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="next check: 2019-08-16 11:28:09.438930094 +0000 UTC m=+7201.327150590:inventory-update, (2019-08-16 09:30:51.895103005 +0000
UTC m=+163.783323463)" module=state
Aug 16 09:30:51 raspberrypi4 mender[465]: time="2019-08-16T09:30:51Z" level=debug msg="waiting 1h57m17.543827127s for the next state" module=state
Though running mender -check-update
seem to update the GUI (both inventory data and “Current software”).
Log from mender -check-update
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=debug msg="SIGUSR1 signal received." module=main
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=info msg="forced wake-up from sleep" module=state
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]" module=mender
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=debug msg="statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds" module=executor
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=debug msg="statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds" module=executor
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=debug msg="Sent wake up!" module=main
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=debug msg="Returning artifact name from /etc/mender/artifact_info file." module=device
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=debug msg="Read data from device manifest file: artifact_name=release-1" module=device
Aug 16 09:32:46 raspberrypi4 mender[465]: time="2019-08-16T09:32:46Z" level=debug msg="Current manifest data: release-1" module=device
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="Read data from device manifest file: device_type=raspberrypi4" module=device
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="Current manifest data: raspberrypi4" module=device
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="inventory update sent, response &{200 OK 200 HTTP/1.1 1 1 map[Cache-Control:[no-cache, no-store] Connection:[keep-alive] Con
tent-Encoding:[gzip] Content-Length:[0] Content-Security-Policy:[default-src https: data: 'unsafe-inline' 'unsafe-eval'] Content-Type:[application/json; charset=utf-8] Date:[Fri, 16 Aug 2019 09:32:47 GMT] Pragma
:[no-cache] Referrer-Policy:[strict-origin] Server:[openresty/1.13.6.2] Strict-Transport-Security:[max-age=31536000; includeSubdomains] Vary:[Accept-Encoding] X-Content-Type-Options:[nosniff] X-Frame-Options:[SA
MEORIGIN] X-Inventory-Version:[master_4df2b05342b264e72934b727eba8df5752a313e2] X-Men-Requestid:[59fd1b7c-6eae-4b2f-8976-ae7997ea04a3] X-Xss-Protection:[1; mode=block]] 0x1b8a050 0 [] false false map[] 0x1b74180
0x1bce000}" module=client_inventory
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="inventory refresh complete" module=state
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=info msg="State transition: inventory-update [Sync] -> check-wait [Idle]" module=mender
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds" module=executor
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="handle check wait state" module=state
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="check wait state; next checks: (update: 2019-08-16 11:28:09.732368987 +0000 UTC m=+7201.620589261) (inventory: 2019-08-16 11
:58:09.438930094 +0000 UTC m=+9001.327150590)" module=state
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="next check: 2019-08-16 11:28:09.732368987 +0000 UTC m=+7201.620589261:update-check, (2019-08-16 09:32:47.729141174 +0000 UTC
m=+279.617361540)" module=state
Aug 16 09:32:47 raspberrypi4 mender[465]: time="2019-08-16T09:32:47Z" level=debug msg="waiting 1h55m22.003227721s for the next state" module=state
@kacf, any idea what is going on here?
Update:
Running the following:
mender --send-inventory
mender --send-inventory
Seems to trigger something being sent and GUI is updated.
I’ll defer this to @oleorhagen, though he won’t be back for another week.
Captured some server side logs as well, on the device I ran:
mender -send-inventory
mender -send-inventory
mender -send-inventory
mender -send-inventory
Here are the server logs:
mender-api-gateway_1 | 172.18.0.1 - - [16/Aug/2019:14:04:33 +0000] "GET /api/management/v1/inventory/devices/5d56b5d77b41c80001b8b025 HTTP/1.1" 200 501 "https://localhost/ui/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-" request ID "51fe4599-f65f-496b-895a-89533baca8d5" 0.005
mender-device-auth_1 | time="2019-08-16T14:04:34Z" level=info msg="200 3048μs POST /api/internal/v1/devauth/tokens/verify HTTP/1.0 - Go-http-client/1.1" device_id=5d56b5d77b41c80001b8b025 file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=175703d1-e445-4abd-85a2-06d6c548c9ba
mender-inventory_1 | time="2019-08-16T14:04:34Z" level=info msg="200 6326μs PATCH /api/0.1.0/attributes HTTP/1.0 - Go-http-client/1.1" device_id=5d56b5d77b41c80001b8b025 file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=175703d1-e445-4abd-85a2-06d6c548c9ba
mender-api-gateway_1 | 192.168.1.188 - - [16/Aug/2019:14:04:34 +0000] "PATCH /api/devices/v1/inventory/device/attributes HTTP/1.1" 200 0 "-" "Go-http-client/1.1" "-" request ID "175703d1-e445-4abd-85a2-06d6c548c9ba" 0.012
mender-useradm_1 | time="2019-08-16T14:04:42Z" level=info msg="200 4416μs POST /api/internal/v1/useradm/auth/verify HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=05216ed3-91f8-4b25-a58b-2deaa9db3a26 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-useradm_1 | time="2019-08-16T14:04:42Z" level=info msg="200 3654μs POST /api/internal/v1/useradm/auth/verify HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=bfda440d-5123-4cec-ba14-b7e254ebe103 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-api-gateway_1 | 172.18.0.1 - - [16/Aug/2019:14:04:42 +0000] "GET /api/management/v2/devauth/devices/count?status=accepted HTTP/1.1" 200 40 "https://localhost/ui/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-" request ID "05216ed3-91f8-4b25-a58b-2deaa9db3a26" 0.012
mender-useradm_1 | time="2019-08-16T14:04:42Z" level=info msg="200 5232μs POST /api/internal/v1/useradm/auth/verify HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=8f485c86-a643-4cc2-885d-e0ae601a1ff4 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-api-gateway_1 | 172.18.0.1 - - [16/Aug/2019:14:04:42 +0000] "GET /api/management/v2/devauth/devices/count?status=rejected HTTP/1.1" 200 40 "https://localhost/ui/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-" request ID "bfda440d-5123-4cec-ba14-b7e254ebe103" 0.018
mender-device-auth_1 | time="2019-08-16T14:04:42Z" level=info msg="200 3052μs GET /api/management/v2/devauth/devices/count?status=accepted HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=05216ed3-91f8-4b25-a58b-2deaa9db3a26 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-device-auth_1 | time="2019-08-16T14:04:42Z" level=info msg="200 9358μs GET /api/management/v2/devauth/devices/count?status=rejected HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=bfda440d-5123-4cec-ba14-b7e254ebe103 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-device-auth_1 | time="2019-08-16T14:04:42Z" level=info msg="200 3479μs GET /api/management/v2/devauth/devices/count?status=pending HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=8f485c86-a643-4cc2-885d-e0ae601a1ff4 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-api-gateway_1 | 172.18.0.1 - - [16/Aug/2019:14:04:42 +0000] "GET /api/management/v2/devauth/devices/count?status=pending HTTP/1.1" 200 40 "https://localhost/ui/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-" request ID "8f485c86-a643-4cc2-885d-e0ae601a1ff4" 0.016
mender-device-auth_1 | time="2019-08-16T14:04:42Z" level=info msg="200 1503μs GET /api/management/v2/devauth/devices/count?status=preauthorized HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=2a7027ad-636f-465d-a411-79d23801aff5 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-useradm_1 | time="2019-08-16T14:04:42Z" level=info msg="200 1740μs POST /api/internal/v1/useradm/auth/verify HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=2a7027ad-636f-465d-a411-79d23801aff5 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-api-gateway_1 | 172.18.0.1 - - [16/Aug/2019:14:04:42 +0000] "GET /api/management/v2/devauth/devices/count?status=preauthorized HTTP/1.1" 200 40 "https://localhost/ui/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-" request ID "2a7027ad-636f-465d-a411-79d23801aff5" 0.005
mender-useradm_1 | time="2019-08-16T14:04:43Z" level=info msg="200 2421μs POST /api/internal/v1/useradm/auth/verify HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=83f46ecc-35c4-4bf7-87e1-34a007dfc081 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-device-auth_1 | time="2019-08-16T14:04:43Z" level=info msg="200 9315μs GET /api/management/v2/devauth/devices?page=1&per_page=20&status=accepted HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=83f46ecc-35c4-4bf7-87e1-34a007dfc081 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-api-gateway_1 | 172.18.0.1 - - [16/Aug/2019:14:04:43 +0000] "GET /api/management/v2/devauth/devices?status=accepted&per_page=20&page=1 HTTP/1.1" 200 1191 "https://localhost/ui/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-" request ID "83f46ecc-35c4-4bf7-87e1-34a007dfc081" 0.015
mender-useradm_1 | time="2019-08-16T14:04:43Z" level=info msg="200 3973μs POST /api/internal/v1/useradm/auth/verify HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=63dfec6c-b1a0-4416-8c8c-9677725602f4 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-inventory_1 | time="2019-08-16T14:04:43Z" level=info msg="200 3271μs GET /api/0.1.0/devices/5d56b4a07b41c80001b8b01f HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=63dfec6c-b1a0-4416-8c8c-9677725602f4 user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-useradm_1 | time="2019-08-16T14:04:43Z" level=info msg="200 5551μs POST /api/internal/v1/useradm/auth/verify HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=9bc2b4ee-ef26-46aa-831d-0ed4f286919e user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-api-gateway_1 | 172.18.0.1 - - [16/Aug/2019:14:04:43 +0000] "GET /api/management/v1/inventory/devices/5d56b4a07b41c80001b8b01f HTTP/1.1" 200 526 "https://localhost/ui/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-" request ID "63dfec6c-b1a0-4416-8c8c-9677725602f4" 0.011
mender-inventory_1 | time="2019-08-16T14:04:43Z" level=info msg="200 3034μs GET /api/0.1.0/devices/5d56b5d77b41c80001b8b025 HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=9bc2b4ee-ef26-46aa-831d-0ed4f286919e user_id=c7416265-ab26-430c-8657-b6bf217ca08a
mender-api-gateway_1 | 172.18.0.1 - - [16/Aug/2019:14:04:43 +0000] "GET /api/management/v1/inventory/devices/5d56b5d77b41c80001b8b025 HTTP/1.1" 200 503 "https://localhost/ui/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-" request ID "9bc2b4ee-ef26-46aa-831d-0ed4f286919e" 0.013
mender-device-auth_1 | time="2019-08-16T14:04:44Z" level=info msg="200 2564μs POST /api/internal/v1/devauth/tokens/verify HTTP/1.0 - Go-http-client/1.1" device_id=5d56b5d77b41c80001b8b025 file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=09c9d1bd-3408-4bbf-a977-752dad580e35
mender-deployments_1 | time="2019-08-16T14:04:44Z" level=info msg="204 3163μs GET /api/devices/v1/deployments/device/deployments/next?artifact_name=release-15&device_type=raspberrypi4 HTTP/1.0 - Go-http-client/1.1" device_id=5d56b5d77b41c80001b8b025 file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=09c9d1bd-3408-4bbf-a977-752dad580e35
mender-api-gateway_1 | 192.168.1.188 - - [16/Aug/2019:14:04:44 +0000] "GET /api/devices/v1/deployments/device/deployments/next?artifact_name=release-15&device_type=raspberrypi4 HTTP/1.1" 204 0 "-" "Go-http-client/1.1" "-" request ID "09c9d1bd-3408-4bbf-a977-752dad580e35" 0.010
mender-device-auth_1 | time="2019-08-16T14:04:46Z" level=info msg="200 2736μs POST /api/internal/v1/devauth/tokens/verify HTTP/1.0 - Go-http-client/1.1" device_id=5d56b5d77b41c80001b8b025 file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=4173f2bb-43ce-47a8-b779-807e27f058ea
mender-inventory_1 | time="2019-08-16T14:04:46Z" level=info msg="200 5901μs PATCH /api/0.1.0/attributes HTTP/1.0 - Go-http-client/1.1" device_id=5d56b5d77b41c80001b8b025 file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=4173f2bb-43ce-47a8-b779-807e27f058ea
mender-api-gateway_1 | 192.168.1.188 - - [16/Aug/2019:14:04:46 +0000] "PATCH /api/devices/v1/inventory/device/attributes HTTP/1.1" 200 0 "-" "Go-http-client/1.1" "-" request ID "4173f2bb-43ce-47a8-b779-807e27f058ea" 0.011
I can only see 2 PATCH /api/devices/v1/inventory/device/attributes
calls on the server.
It does work if you send it twice in a row. It also worked in the cleanup state of the module and in an ArtifactCommit_Leave state script. It updated the current software in the Deployment Progress as well as the other two locations.
I have created a bug report for this to make sure someone follows up.