Details
-
Type:
Bug
-
Status: Done
-
Priority:
Low
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.1.0, 3.1.0-report, 3.0.1
-
Labels:
-
Story Points:2
-
Backlog:yes
-
Days in progress:0
Description
There is a race condition when running the demo script where deployments service may not be ready when the script creates the initial user. As a consequence the "create_organization" workflow fails on all retries because the service is not reachable and the end result is a data inconsistency (you won't be able to create the user because it already (partially) exists, but only in tenantadm database).
Relevant logs from workflows-worker:
time="2021-07-07T10:20:11Z" level=info msg="Message bus: New job (60e57fdb70b095adeb68ecfe) with workflow create_organization" file=entry.go func="logrus.(*Entry).Infof" line=351 time="2021-07-07T10:20:11Z" level=info msg="Worker: processing job 60e57fdb70b095adeb68ecfe workflow create_organization" file=entry.go func="logrus.(*Entry).Infof" line=351 time="2021-07-07T10:20:11Z" level=info msg="60e57fdb70b095adeb68ecfe: started, create_organization" file=entry.go func="logrus.(*Entry).Infof" line=351 time="2021-07-07T10:20:11Z" level=info msg="60e57fdb70b095adeb68ecfe: started, create_organization task :create_tenant" file=entry.go func="logrus.(*Entry).Infof" line=351 time="2021-07-07T10:20:11Z" level=info msg="processTask: calling http task: POST http://mender-device-auth:8080/api/internal/v1/devauth/tenants" file=entry.go func="logrus.(*Entry).Infof" line=351 time="2021-07-07T10:20:12Z" level=info msg="60e57fdb70b095adeb68ecfe: started, create_organization task :create_tenant_deployments" file=entry.go func="logrus.(*Entry).Infof" line=351 time="2021-07-07T10:20:12Z" level=info msg="processTask: calling http task: POST http://mender-deployments:8080/api/internal/v1/deployments/tenants" file=entry.go func="logrus.(*Entry).Infof" line=351 time="2021-07-07T10:20:12Z" level=error msg="error: Post \"http://mender-deployments:8080/api/internal/v1/deployments/tenants\": dial tcp 172.19.0.16:8080: connect: connection refused" file=entry.go func="logrus.(*Entry).Errorf" line=367